共用方式為


TensorPrimitives.IndexOfMin 方法

定義

多載

IndexOfMin(ReadOnlySpan<Single>)

在指定的張量中搜尋最小單精度浮點數的索引。

IndexOfMin<T>(ReadOnlySpan<T>)

搜尋指定之張量中最小數位的索引。

IndexOfMin(ReadOnlySpan<Single>)

來源:
TensorPrimitives.cs
來源:
TensorPrimitives.Single.cs
來源:
TensorPrimitives.Single.cs

在指定的張量中搜尋最小單精度浮點數的索引。

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

參數

x
ReadOnlySpan<Single>

以範圍表示的張量。

傳回

x中最小專案的索引,如果 x 是空的,則為 -1。

備註

最小元素的判斷符合 IEEE 754:2019 'minimum' 函式。 如果有任何等於 NaN 的值存在,則會傳回第一個的索引。 負 0 被視為小於正 0。

這個方法可能會呼叫基礎 C 運行時間,或採用目前架構特有的指示。 不同操作系統或架構之間的確切結果可能會有所不同。

適用於

IndexOfMin<T>(ReadOnlySpan<T>)

來源:
TensorPrimitives.IndexOfMin.cs
來源:
TensorPrimitives.IndexOfMin.cs

搜尋指定之張量中最小數位的索引。

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

類型參數

T

參數

x
ReadOnlySpan<T>

以範圍表示的張量。

傳回

x中最小專案的索引,如果 x 是空的,則為 -1。

備註

最小元素的判斷符合 IEEE 754:2019 'minimum' 函式。 如果有任何等於 NaN 的值存在,則會傳回第一個的索引。 負 0 被視為小於正 0。

這個方法可能會呼叫基礎 C 運行時間,或採用目前架構特有的指示。 不同操作系統或架構之間的確切結果可能會有所不同。

適用於