Edit

Share via


Tensor.CosineSimilarity Method

Definition

Overloads

CosineSimilarity<T>(Tensor<T>, Tensor<T>)
CosineSimilarity<T>(ReadOnlyTensorSpan<T>, ReadOnlyTensorSpan<T>, TensorSpan<T>)

CosineSimilarity<T>(Tensor<T>, Tensor<T>)

Source:
TensorExtensions.cs
public:
generic <typename T>
 where T : System::Numerics::IRootFunctions<T> static System::Numerics::Tensors::Tensor<T> ^ CosineSimilarity(System::Numerics::Tensors::Tensor<T> ^ left, System::Numerics::Tensors::Tensor<T> ^ right);
public static System.Numerics.Tensors.Tensor<T> CosineSimilarity<T> (System.Numerics.Tensors.Tensor<T> left, System.Numerics.Tensors.Tensor<T> right) where T : System.Numerics.IRootFunctions<T>;
static member CosineSimilarity : System.Numerics.Tensors.Tensor<'T (requires 'T :> System.Numerics.IRootFunctions<'T>)> * System.Numerics.Tensors.Tensor<'T (requires 'T :> System.Numerics.IRootFunctions<'T>)> -> System.Numerics.Tensors.Tensor<'T (requires 'T :> System.Numerics.IRootFunctions<'T>)> (requires 'T :> System.Numerics.IRootFunctions<'T>)
Public Function CosineSimilarity(Of T As IRootFunctions(Of T)) (left As Tensor(Of T), right As Tensor(Of T)) As Tensor(Of T)

Type Parameters

T

Parameters

left
Tensor<T>
right
Tensor<T>

Returns

Applies to

CosineSimilarity<T>(ReadOnlyTensorSpan<T>, ReadOnlyTensorSpan<T>, TensorSpan<T>)

Source:
TensorExtensions.cs
public:
generic <typename T>
 where T : System::Numerics::IRootFunctions<T> static System::Numerics::Tensors::TensorSpan<T> ^ CosineSimilarity(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % left, System::Numerics::Tensors::ReadOnlyTensorSpan<T> % right, System::Numerics::Tensors::TensorSpan<T> % destination);
public static ref readonly System.Numerics.Tensors.TensorSpan<T> CosineSimilarity<T> (scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> left, scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> right, in System.Numerics.Tensors.TensorSpan<T> destination) where T : System.Numerics.IRootFunctions<T>;
static member CosineSimilarity : ReadOnlyTensorSpan * ReadOnlyTensorSpan * TensorSpan -> TensorSpan (requires 'T :> System.Numerics.IRootFunctions<'T>)
Public Function CosineSimilarity(Of T As IRootFunctions(Of T)) (ByRef left As ReadOnlyTensorSpan(Of T), ByRef right As ReadOnlyTensorSpan(Of T), ByRef destination As TensorSpan(Of T)) As TensorSpan(Of T)

Type Parameters

T

Parameters

destination
TensorSpan<T>

Returns

Applies to