TensorPrimitives.HammingBitDistance<T> 方法

定义

计算两个等长张量值之间的按位哈明距离。

public:
generic <typename T>
 where T : System::Numerics::IBinaryInteger<T> static long HammingBitDistance(ReadOnlySpan<T> x, ReadOnlySpan<T> y);
public static long HammingBitDistance<T> (ReadOnlySpan<T> x, ReadOnlySpan<T> y) where T : System.Numerics.IBinaryInteger<T>;
static member HammingBitDistance : ReadOnlySpan<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> * ReadOnlySpan<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> -> int64 (requires 'T :> System.Numerics.IBinaryInteger<'T>)
Public Shared Function HammingBitDistance(Of T As IBinaryInteger(Of T)) (x As ReadOnlySpan(Of T), y As ReadOnlySpan(Of T)) As Long

类型参数

T

参数

x
ReadOnlySpan<T>

第一个张量,表示为范围。

y
ReadOnlySpan<T>

第二个张量,表示为范围。

返回

两个范围之间不同位数。

例外

xy 不得为空。

适用于