/// <summary> /// Subtracts two matrixes element-by-element. /// </summary> /// <param name="lhs">The left hand side of the subtraction operation.</param> /// <param name="rhs">The right hand side of the subtraction operation.</param> /// <returns>The difference of <paramref name="lhs"/> and <paramref name="rhs"/>.</returns> /// <exception cref="InvalidOperationException"> /// Thrown if the dimensions of <paramref name="lhs"/> and <paramref name="rhs"/> /// are not the same. /// </exception> public static Matrix operator -(Matrix lhs, Matrix rhs) { if (lhs == null) { throw new ArgumentNullException("lhs"); } if (rhs == null) { throw new ArgumentNullException("rhs"); } return(MatrixProcessor.Subtract(lhs, rhs)); }
public Vector Subtract(Vector b) { return(MatrixProcessor.Subtract(this, b)); }
/// <summary> /// Returns a matrix which is the result of the instance minus the <paramref name="value"/>. /// </summary> /// <param name="value">The matrix to subtract.</param> /// <returns>For matrix A, A - value.</returns> public Matrix Subtract(Matrix value) { return(MatrixProcessor.Subtract(this, value)); }