TensorPrimitives.Min Method

Definition

Overloads

Min(ReadOnlySpan<Single>)

Searches for the smallest single-precision floating-point number in the specified tensor.

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

Computes the element-wise minimum of the single-precision floating-point numbers in the specified tensors.

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

Computes the element-wise minimum of the numbers in the specified tensors.

Min<T>(ReadOnlySpan<T>)

Searches for the smallest number in the specified tensor.

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

Computes the element-wise minimum of the numbers in the specified tensors.

Min(ReadOnlySpan<Single>)

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

Searches for the smallest single-precision floating-point number in the specified tensor.

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

Parameters

x
ReadOnlySpan<Single>

The tensor, represented as a span.

Returns

The minimum element in x.

Exceptions

Length of x must be greater than zero.

Remarks

The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value is equal to NaN is present, 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

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

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

Computes the element-wise minimum of the single-precision floating-point numbers in the specified tensors.

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

Parameters

x
ReadOnlySpan<Single>

The first tensor, represented as a span.

y
ReadOnlySpan<Single>

The second tensor, represented as a span.

destination
Span<Single>

The destination tensor, represented as a span.

Exceptions

y and destination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes destination[i] = MathF.Max(x[i], y[i]).

The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to NaN, that value is stored as the result. Positive 0 is considered greater than negative 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

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

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

Computes the element-wise minimum of the numbers in the specified tensors.

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

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The first tensor, represented as a span.

y
T

The second tensor, represented as a scalar.

destination
Span<T>

The destination tensor, represented as a span.

Exceptions

x and destination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes destination[i] = T.Max(x[i], y).

The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to NaN, that value is stored as the result. Positive 0 is considered greater than negative 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

Min<T>(ReadOnlySpan<T>)

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

Searches for the smallest number in the specified tensor.

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

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The tensor, represented as a span.

Returns

T

The minimum element in x.

Exceptions

Length of x must be greater than zero.

Remarks

The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value is equal to NaN is present, 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

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

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

Computes the element-wise minimum of the numbers in the specified tensors.

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

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The first tensor, represented as a span.

y
ReadOnlySpan<T>

The second tensor, represented as a span.

destination
Span<T>

The destination tensor, represented as a span.

Exceptions

y and destination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes destination[i] = T.Max(x[i], y[i]).

The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to NaN, that value is stored as the result. Positive 0 is considered greater than negative 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