TensorPrimitives.IndexOfMin 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.
Overloads
IndexOfMin(ReadOnlySpan<Single>) |
Searches for the index of the smallest single-precision floating-point number in the specified tensor. |
IndexOfMin<T>(ReadOnlySpan<T>) |
Searches for the index of the smallest number in the specified tensor. |
IndexOfMin(ReadOnlySpan<Single>)
- Source:
- TensorPrimitives.cs
- Source:
- TensorPrimitives.Single.cs
- Source:
- TensorPrimitives.Single.cs
Searches for the index of the smallest single-precision floating-point number in the specified tensor.
public:
static int IndexOfMin(ReadOnlySpan<float> x);
public static int IndexOfMin (ReadOnlySpan<float> x);
static member IndexOfMin : ReadOnlySpan<single> -> int
Public Shared Function IndexOfMin (x As ReadOnlySpan(Of Single)) As Integer
Parameters
The tensor, represented as a span.
Returns
The index of the minimum element in x
, or -1 if x
is empty.
Remarks
The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value equal to NaN is present, the index of the first is returned. Negative 0 is considered smaller than positive 0.
This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.
Applies to
IndexOfMin<T>(ReadOnlySpan<T>)
Searches for the index of the smallest number in the specified tensor.
public:
generic <typename T>
where T : System::Numerics::INumber<T> static int IndexOfMin(ReadOnlySpan<T> x);
public static int IndexOfMin<T> (ReadOnlySpan<T> x) where T : System.Numerics.INumber<T>;
static member IndexOfMin : ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> -> int (requires 'T :> System.Numerics.INumber<'T>)
Public Shared Function IndexOfMin(Of T As INumber(Of T)) (x As ReadOnlySpan(Of T)) As Integer
Type Parameters
- T
Parameters
The tensor, represented as a span.
Returns
The index of the minimum element in x
, or -1 if x
is empty.
Remarks
The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value equal to NaN is present, the index of the first is returned. Negative 0 is considered smaller than positive 0.
This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.