Vector<T>.Addition Operator

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

Addition(T, Vector<T>) Adds a vector and a constant.
Addition(Vector<T>, T) Adds a vector and a constant.
Addition(Vector<T>, Vector<T>) Adds two vectors.

Addition(T, Vector<T>) Operator

Adds a vector and a constant.
C#
public static Vector<T> operator +(
	T value,
	Vector<T> vector
)

Parameters

value  T
The constant.
vector  Vector<T>
A vector.

Return Value

Vector<T>
A vector whose elements are the sum of the corresponding elements of vector and value.

Exceptions

ArgumentNullException

vector is null.

Addition(Vector<T>, T) Operator

Adds a vector and a constant.
C#
public static Vector<T> operator +(
	Vector<T> vector,
	T value
)

Parameters

vector  Vector<T>
A vector.
value  T
The constant.

Return Value

Vector<T>
A vector whose elements are the sum of the corresponding elements of vector and value.

Exceptions

ArgumentNullException

vector is null.

Addition(Vector<T>, Vector<T>) Operator

Adds two vectors.
C#
public static Vector<T> operator +(
	Vector<T> left,
	Vector<T> right
)

Parameters

left  Vector<T>
The first vector.
right  Vector<T>
The second vector.

Return Value

Vector<T>
A vector whose elements are the sum of the corresponding elements of left and right.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

left and right do not have the same length.

See Also