Прочетете на английски

Споделяне чрез


Tensor.Equals Method

Definition

Overloads

Equals<T>(ReadOnlyTensorSpan<T>, ReadOnlyTensorSpan<T>)

Compares the elements of two ReadOnlyTensorSpan<T> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size before they are compared. It returns a TensorSpan<T> where the value is true if the elements are equal and false if they are not."/>

Equals<T>(ReadOnlyTensorSpan<T>, T)

Compares the elements of two ReadOnlyTensorSpan<T> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size before they are compared. It returns a TensorSpan<T> where the value is true if the elements are equal and false if they are not."/>

Equals<T>(ReadOnlyTensorSpan<T>, ReadOnlyTensorSpan<T>, TensorSpan<Boolean>)

Compares the elements of two ReadOnlyTensorSpan<T> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size before they are compared. It returns a TensorSpan<T> where the value is true if the elements are equal and false if they are not."/>

Equals<T>(ReadOnlyTensorSpan<T>, T, TensorSpan<Boolean>)

Compares the elements of two ReadOnlyTensorSpan<T> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size before they are compared. It returns a TensorSpan<T> where the value is true if the elements are equal and false if they are not."/>

Equals<T>(ReadOnlyTensorSpan<T>, ReadOnlyTensorSpan<T>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Compares the elements of two ReadOnlyTensorSpan<T> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size before they are compared. It returns a TensorSpan<T> where the value is true if the elements are equal and false if they are not."/>

C#
public static System.Numerics.Tensors.Tensor<bool> Equals<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IEqualityOperators<T,T,bool>;

Type Parameters

T

Parameters

Returns

A TensorSpan<T> where the value is true if the elements are equal and false if they are not.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Equals<T>(ReadOnlyTensorSpan<T>, T)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Compares the elements of two ReadOnlyTensorSpan<T> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size before they are compared. It returns a TensorSpan<T> where the value is true if the elements are equal and false if they are not."/>

C#
public static System.Numerics.Tensors.Tensor<bool> Equals<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y) where T : System.Numerics.IEqualityOperators<T,T,bool>;

Type Parameters

T

Parameters

y
T

Second value to compare.

Returns

A TensorSpan<T> where the value is true if the elements are equal and false if they are not.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Equals<T>(ReadOnlyTensorSpan<T>, ReadOnlyTensorSpan<T>, TensorSpan<Boolean>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Compares the elements of two ReadOnlyTensorSpan<T> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size before they are compared. It returns a TensorSpan<T> where the value is true if the elements are equal and false if they are not."/>

C#
public static ref readonly System.Numerics.Tensors.TensorSpan<bool> Equals<T>(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y, in System.Numerics.Tensors.TensorSpan<bool> destination) where T : System.Numerics.IEqualityOperators<T,T,bool>;

Type Parameters

T

Parameters

destination
TensorSpan<Boolean>

Returns

A TensorSpan<T> where the value is true if the elements are equal and false if they are not.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Equals<T>(ReadOnlyTensorSpan<T>, T, TensorSpan<Boolean>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Compares the elements of two ReadOnlyTensorSpan<T> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size before they are compared. It returns a TensorSpan<T> where the value is true if the elements are equal and false if they are not."/>

C#
public static ref readonly System.Numerics.Tensors.TensorSpan<bool> Equals<T>(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y, in System.Numerics.Tensors.TensorSpan<bool> destination) where T : System.Numerics.IEqualityOperators<T,T,bool>;

Type Parameters

T

Parameters

y
T

Second value to compare.

destination
TensorSpan<Boolean>

Returns

A TensorSpan<T> where the value is true if the elements are equal and false if they are not.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)