/// <summary> /// A = A<sup>s</sup> <=> A[row,col] = System.Math.Pow(A[row,col], s) /// </summary> /// <param name="A">the matrix to modify.</param> /// <param name="s">the scalar; can have any value.</param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix2D Pow(DoubleMatrix2D A, double s) { return A.Assign(F1.Pow(s)); }
/// <summary> /// A = A / s <=> A[i] = A[i] / s /// </summary> /// <param name="A">the matrix to modify.</param> /// <param name="s">the scalar; can have any value.</param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix1D Div(DoubleMatrix1D A, double s) { return A.Assign(F1.Div(s)); }
/// <summary> /// A = -A <=> A[row,col] = -A[row,col] /// </summary> /// <param name="A"></param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix2D Negate(DoubleMatrix2D A) { return A.Assign(F1.Mult(-1)); }
/// <summary> /// A = A + s <=> A[i] = A[i] + s /// </summary> /// <param name="A">the matrix to modify.</param> /// <param name="s">the scalar; can have any value.</param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix1D Plus(DoubleMatrix1D A, double s) { return A.Assign(F1.Plus(s)); }
/// <summary> /// A = A * s <=> A[row,col] = A[row,col] * s /// </summary> /// <param name="A">the matrix to modify.</param> /// <param name="s">the scalar; can have any value.</param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix2D Mult(DoubleMatrix2D A, double s) { return A.Assign(F1.Mult(s)); }
/// <summary> /// A = A - s <=> A[row,col] = A[row,col] - s /// </summary> /// <param name="A">the matrix to modify.</param> /// <param name="s">the scalar; can have any value.</param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix2D Minus(DoubleMatrix2D A, double s) { return A.Assign(F1.Minus(s)); }
/// <summary> /// A[row,col] = A[row,col] < s ? 1 : 0 /// </summary> /// <param name="A">the matrix to modify.</param> /// <param name="s">the scalar; can have any value.</param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix2D Less(DoubleMatrix2D A, double s) { return A.Assign(F1.Less(s)); }
/// <summary> /// A[row,col] = A[row,col] > s ? 1 : 0 /// </summary> /// <param name="A">the matrix to modify.</param> /// <param name="s">the scalar; can have any value.</param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix2D Greater(DoubleMatrix2D A, double s) { return A.Assign(F1.Greater(s)); }
/// <summary> /// A[row,col] = A[row,col] == s ? 1 : 0; ignores tolerance. /// </summary> /// <param name="A">the matrix to modify.</param> /// <param name="s">the scalar; can have any value.</param> /// <returns><i>A</i> (for convenience only).</returns> public static DoubleMatrix2D Equals(DoubleMatrix2D A, double s) { return A.Assign(F1.Equals(s)); }