예제 #1
0
 /// <summary>
 /// A = A<sup>s</sup> &lt;=> 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));
 }
예제 #2
0
 /// <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));
 }
예제 #3
0
 /// <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));
 }
예제 #4
0
 /// <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));
 }
예제 #5
0
 /// <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));
 }
예제 #6
0
 /// <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));
 }
예제 #7
0
 /// <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));
 }
예제 #8
0
 /// <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));
 }
예제 #9
0
 /// <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));
 }