TensorPrimitives.HammingBitDistance<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Computes the bitwise Hamming distance between two equal-length tensors of values.
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
Type Parameters
- T
Parameters
The first tensor, represented as a span.
The second tensor, represented as a span.
Returns
The number of bits that differ between the two spans.
Exceptions
x
and y
must not be empty.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.