Share via


TensorPrimitives.IndexOfMin Method

Definition

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

x
ReadOnlySpan<Single>

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>)

Source:
TensorPrimitives.IndexOfMin.cs
Source:
TensorPrimitives.IndexOfMin.cs

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

x
ReadOnlySpan<T>

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