forked from tsai/mathnet-numerics
7 changed files with 77 additions and 29 deletions
@ -0,0 +1,27 @@ |
|||
/// <summary> |
|||
/// Computes the dot product of x and y. |
|||
/// </summary> |
|||
/// <param name="x">The vector x.</param> |
|||
/// <param name="y">The vector y.</param> |
|||
/// <returns>The dot product of x and y.</returns> |
|||
/// <remarks>This is equivalent to the DOT BLAS routine.</remarks> |
|||
[SecuritySafeCritical] |
|||
public override <#=dataType#> DotProduct(<#=dataType#>[] x, <#=dataType#>[] y) |
|||
{ |
|||
if (y == null) |
|||
{ |
|||
throw new ArgumentNullException("y"); |
|||
} |
|||
|
|||
if (x == null) |
|||
{ |
|||
throw new ArgumentNullException("x"); |
|||
} |
|||
|
|||
if (x.Length != y.Length) |
|||
{ |
|||
throw new ArgumentException(Resources.ArgumentArraysSameLength); |
|||
} |
|||
|
|||
return SafeNativeMethods.<#=prefix#>_dot_product(x.Length, x, y); |
|||
} |
|||
Loading…
Reference in new issue