Tensor<T>.Equality Operator

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3

Overload List

Equality(T, Tensor<T>) Compares a scalar and a tensor for equality..
Equality(Tensor<T>, T) Compares a tensor and a scalar for equality..
Equality(Tensor<T>, Tensor<T>) Determines whether two tensors are equal.

Equality(T, Tensor<T>) Operator

Compares a scalar and a tensor for equality..
C#
public static Tensor<bool> operator ==(
	T left,
	Tensor<T> right
)

Parameters

left  T
A scalar that serves as the left operand.
right  Tensor<T>
A tensor that serves as the right operand.

Return Value

Tensor<Boolean>
A tensor of the same shape as right whose elements are equal to the of left and the corresponding elements of right.

Exceptions

ArgumentNullException

right is null.

Equality(Tensor<T>, T) Operator

Compares a tensor and a scalar for equality..
C#
public static Tensor<bool> operator ==(
	Tensor<T> left,
	T right
)

Parameters

left  Tensor<T>
A tensor that serves as the left operand.
right  T
A scalar that serves as the right operand.

Return Value

Tensor<Boolean>
A tensor of the same shape as left whose elements are equal to the of the corresponding elements of left and right.

Exceptions

Equality(Tensor<T>, Tensor<T>) Operator

Determines whether two tensors are equal.
C#
public static bool operator ==(
	Tensor<T>? left,
	Tensor<T>? right
)

Parameters

left  Tensor<T>
The first tensor to compare, or null.
right  Tensor<T>
The second tensor to compare, or null.

Return Value

Boolean
true if left and right have the same shape and elements; otherwise false.

See Also