private s_matrix_norm ( byte norm, int rows, int columns, [ a, [ work ) : float | ||
norm | byte | |
rows | int | |
columns | int | |
a | [ | |
work | [ | |
return | float |
public override float MatrixNorm(Norm norm, int rows, int columns, float[] matrix, float[] work) { if (matrix == null) { throw new ArgumentNullException("matrix"); } if (rows <= 0) { throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); } if (columns <= 0) { throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); } if (matrix.Length < rows * columns) { throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows * columns), "matrix"); } if (work.Length < rows) { throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows), "work"); } return(SafeNativeMethods.s_matrix_norm((byte)norm, rows, columns, matrix, work)); }
public override double MatrixNorm(Norm norm, int rows, int columns, float[] matrix) { if (matrix == null) { throw new ArgumentNullException(nameof(matrix)); } if (rows <= 0) { throw new ArgumentException(Resources.ArgumentMustBePositive, nameof(rows)); } if (columns <= 0) { throw new ArgumentException(Resources.ArgumentMustBePositive, nameof(columns)); } if (matrix.Length < rows * columns) { throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows * columns), nameof(matrix)); } return(SafeNativeMethods.s_matrix_norm((byte)norm, rows, columns, matrix)); }
public override double MatrixNorm(Norm norm, int rows, int columns, float[] matrix) { if (matrix == null) { throw new ArgumentNullException(nameof(matrix)); } if (rows <= 0) { throw new ArgumentException("Value must be positive.", nameof(rows)); } if (columns <= 0) { throw new ArgumentException("Value must be positive.", nameof(columns)); } if (matrix.Length < rows * columns) { throw new ArgumentException($"The given array is too small. It must be at least {rows * columns} long.", nameof(matrix)); } return(SafeNativeMethods.s_matrix_norm((byte)norm, rows, columns, matrix)); }