Tensor.Distance<T> 方法

定义

计算 Euclidean 空间中两个点之间的距离,指定为非空的相等长度的数字张量。

public:
generic <typename T>
 where T : System::Numerics::IRootFunctions<T> static T Distance(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x, System::Numerics::Tensors::ReadOnlyTensorSpan<T> % y);
public static T Distance<T> (scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IRootFunctions<T>;
static member Distance : ReadOnlyTensorSpan * ReadOnlyTensorSpan -> 'T (requires 'T :> System.Numerics.IRootFunctions<'T>)
Public Function Distance(Of T As IRootFunctions(Of T)) (ByRef x As ReadOnlyTensorSpan(Of T), ByRef y As ReadOnlyTensorSpan(Of T)) As T

类型参数

T

参数

返回

T

适用于