Vector<T>.Subtraction Operator

Definition

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

Overload List

Subtraction(T, Vector<T>) Subtracts a vector from a constant.
Subtraction(Vector<T>, T) Subtracts a constant from a vector.
Subtraction(Vector<T>, Vector<T>) Subtracts two vectors.

Subtraction(T, Vector<T>) Operator

Subtracts a vector from 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 difference between the corresponding elements of vector and value.

Exceptions

ArgumentNullException

vector is null.

Subtraction(Vector<T>, T) Operator

Subtracts a constant from a vector.
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 difference of the corresponding elements of vector and value.

Exceptions

ArgumentNullException

vector is null.

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

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

Parameters

left  Vector<T>
The vector to subtract from.
right  Vector<T>
The vector to subtract.

Return Value

Vector<T>
A vector whose elements are equal to the corresponding element of left minus the corresponding element of right.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

left and right do not have the same length.

See Also