/// <summary> /// Adds two matrixes element-by-element. /// </summary> /// <param name="lhs">The left hand side of the addition operation.</param> /// <param name="rhs">The right hand side of the addition operation.</param> /// <returns>The sum 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.Add(lhs, rhs)); }
public Vector Add(Vector b) { return(MatrixProcessor.Add(this, b)); }
/// <summary> /// Returns a matrix which is the result of the instance plus the <paramref name="value"/>. /// </summary> /// <param name="value">The matrix to add.</param> /// <returns>For matrix A, A + value.</returns> public Matrix Add(Matrix value) { return(MatrixProcessor.Add(this, value)); }