TensorPrimitives.Min 方法

定义

重载

Min(ReadOnlySpan<Single>)

在指定的张量中搜索最小单精度浮点数。

Min(ReadOnlySpan<Single>, ReadOnlySpan<Single>, Span<Single>)

计算指定张量中单精度浮点数的元素最小值。

Min<T>(ReadOnlySpan<T>, T, Span<T>)

计算指定张量中数字的按元素计算的最小值。

Min<T>(ReadOnlySpan<T>)

搜索指定张量中的最小数字。

Min<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Span<T>)

计算指定张量中数字的按元素计算的最小值。

Min(ReadOnlySpan<Single>)

Source:
TensorPrimitives.cs
Source:
TensorPrimitives.Single.cs
Source:
TensorPrimitives.Single.cs

在指定的张量中搜索最小单精度浮点数。

public:
 static float Min(ReadOnlySpan<float> x);
public static float Min (ReadOnlySpan<float> x);
static member Min : ReadOnlySpan<single> -> single
Public Shared Function Min (x As ReadOnlySpan(Of Single)) As Single

参数

x
ReadOnlySpan<Single>

张量,表示为范围。

返回

x中的最小元素。

例外

x 长度必须大于零。

注解

最小元素的确定与 IEEE 754:2019“minimum”函数匹配。 如果存在任何值等于 NaN,则返回第一个值。 负 0 被视为小于正 0。

此方法可以调用基础 C 运行时,或使用特定于当前体系结构的说明。 不同的操作系统或体系结构之间的确切结果可能有所不同。

适用于

Min(ReadOnlySpan<Single>, ReadOnlySpan<Single>, Span<Single>)

Source:
TensorPrimitives.cs
Source:
TensorPrimitives.Single.cs
Source:
TensorPrimitives.Single.cs

计算指定张量中单精度浮点数的元素最小值。

public:
 static void Min(ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination);
public static void Min (ReadOnlySpan<float> x, ReadOnlySpan<float> y, Span<float> destination);
static member Min : ReadOnlySpan<single> * ReadOnlySpan<single> * Span<single> -> unit
Public Shared Sub Min (x As ReadOnlySpan(Of Single), y As ReadOnlySpan(Of Single), destination As Span(Of Single))

参数

x
ReadOnlySpan<Single>

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

y
ReadOnlySpan<Single>

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

destination
Span<Single>

目标张量,表示为范围。

例外

ydestination 引用重叠的内存位置,并且不在同一位置开始。

注解

此方法有效地计算 destination[i] = MathF.Max(x[i], y[i])

最大元素的确定与 IEEE 754:2019“maximum”函数匹配。 如果任一值等于 NaN,则该值存储为结果。 正 0 被视为大于负 0。

此方法可以调用基础 C 运行时,或使用特定于当前体系结构的说明。 不同的操作系统或体系结构之间的确切结果可能有所不同。

适用于

Min<T>(ReadOnlySpan<T>, T, Span<T>)

Source:
TensorPrimitives.Min.cs
Source:
TensorPrimitives.Min.cs

计算指定张量中数字的按元素计算的最小值。

public:
generic <typename T>
 where T : System::Numerics::INumber<T> static void Min(ReadOnlySpan<T> x, T y, Span<T> destination);
public static void Min<T> (ReadOnlySpan<T> x, T y, Span<T> destination) where T : System.Numerics.INumber<T>;
static member Min : ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> * 'T * Span<'T (requires 'T :> System.Numerics.INumber<'T>)> -> unit (requires 'T :> System.Numerics.INumber<'T>)
Public Shared Sub Min(Of T As INumber(Of T)) (x As ReadOnlySpan(Of T), y As T, destination As Span(Of T))

类型参数

T

参数

x
ReadOnlySpan<T>

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

y
T

第二个张量,表示为标量。

destination
Span<T>

目标张量,表示为范围。

例外

xdestination 引用重叠的内存位置,并且不在同一位置开始。

注解

此方法有效地计算 destination[i] = T.Max(x[i], y)

最大元素的确定与 IEEE 754:2019“maximum”函数匹配。 如果任一值等于 NaN,则该值存储为结果。 正 0 被视为大于负 0。

此方法可以调用基础 C 运行时,或使用特定于当前体系结构的说明。 不同的操作系统或体系结构之间的确切结果可能有所不同。

适用于

Min<T>(ReadOnlySpan<T>)

Source:
TensorPrimitives.MaxMagnitude.cs
Source:
TensorPrimitives.Min.cs

搜索指定张量中的最小数字。

public:
generic <typename T>
 where T : System::Numerics::INumber<T> static T Min(ReadOnlySpan<T> x);
public static T Min<T> (ReadOnlySpan<T> x) where T : System.Numerics.INumber<T>;
static member Min : ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> -> 'T (requires 'T :> System.Numerics.INumber<'T>)
Public Shared Function Min(Of T As INumber(Of T)) (x As ReadOnlySpan(Of T)) As T

类型参数

T

参数

x
ReadOnlySpan<T>

张量,表示为范围。

返回

T

x中的最小元素。

例外

x 长度必须大于零。

注解

最小元素的确定与 IEEE 754:2019“minimum”函数匹配。 如果存在任何值等于 NaN,则返回第一个值。 负 0 被视为小于正 0。

此方法可以调用基础 C 运行时,或使用特定于当前体系结构的说明。 不同的操作系统或体系结构之间的确切结果可能有所不同。

适用于

Min<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Span<T>)

Source:
TensorPrimitives.Min.cs
Source:
TensorPrimitives.Min.cs

计算指定张量中数字的按元素计算的最小值。

public:
generic <typename T>
 where T : System::Numerics::INumber<T> static void Min(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
public static void Min<T> (ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : System.Numerics.INumber<T>;
static member Min : ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> * ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> * Span<'T (requires 'T :> System.Numerics.INumber<'T>)> -> unit (requires 'T :> System.Numerics.INumber<'T>)
Public Shared Sub Min(Of T As INumber(Of T)) (x As ReadOnlySpan(Of T), y As ReadOnlySpan(Of T), destination As Span(Of T))

类型参数

T

参数

x
ReadOnlySpan<T>

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

y
ReadOnlySpan<T>

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

destination
Span<T>

目标张量,表示为范围。

例外

ydestination 引用重叠的内存位置,并且不在同一位置开始。

注解

此方法有效地计算 destination[i] = T.Max(x[i], y[i])

最大元素的确定与 IEEE 754:2019“maximum”函数匹配。 如果任一值等于 NaN,则该值存储为结果。 正 0 被视为大于负 0。

此方法可以调用基础 C 运行时,或使用特定于当前体系结构的说明。 不同的操作系统或体系结构之间的确切结果可能有所不同。

适用于