Each() public static method

Performs an element wise operation on the input Matrix.
public static Each ( Matrix m, double>.Func fnElementWiseOp ) : Matrix
m Matrix Matrix.
fnElementWiseOp double>.Func Function to apply.
return Matrix
Esempio n. 1
0
 /// <summary>
 /// Performs an element-wise operation on the input Matrices.
 /// </summary>
 /// <param name="m1">First Matrix.</param>
 /// <param name="m2">Second Matrix.</param>
 /// <param name="fnElementWiseOp">Operation to perform on the value from the first and second matrices.</param>
 /// <returns>A Matrix.</returns>
 public static Matrix Each(this Matrix m1, Matrix m2, Func <double, double, double> fnElementWiseOp)
 {
     return(Matrix.Each(m1, m2, fnElementWiseOp));
 }
Esempio n. 2
0
 /// <summary>
 /// Performs an element wise operation on the input Matrix.
 /// </summary>
 /// <param name="m">Matrix.</param>
 /// <param name="fnElementWiseOp">Function to apply to each cell specified by the value and cell coordinates.</param>
 /// <returns>A Matrix.</returns>
 public static Matrix Each(this Matrix m, Func <double, int, int, double> fnElementWiseOp)
 {
     return(Matrix.Each(m, fnElementWiseOp));
 }