Tensor.Min Method

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.0

Overload List

Min<T>(Tensor<T>, T, Tensor<T>, Tensor<Boolean>, TensorElementOrder) Computes the minimum of the elements of a tensor and a scalar..
Min<T>(Tensor<T>, Tensor<T>, Tensor<T>, Tensor<Boolean>, TensorElementOrder) Computes the smallest of corresponding elements of two tensors.
Min<T>(T, Tensor<T>, Tensor<T>, Tensor<Boolean>, TensorElementOrder) Computes the minimum of a scalar and the elements of a tensor..
Min<T>(Tensor<T>, Index, Boolean, Tensor<Boolean>, Boolean, TensorElementOrder) Computes the minima of the elements of a tensor along the specified axis.

Min<T>(Tensor<T>, T, Tensor<T>, Tensor<Boolean>, TensorElementOrder)

Computes the minimum of the elements of a tensor and a scalar..
C#
public static Tensor<T> Min<T>(
	Tensor<T> left,
	T right,
	Tensor<T>? result = null,
	Tensor<bool>? mask = null,
	TensorElementOrder order = TensorElementOrder.Automatic
)

Parameters

left  Tensor<T>
A tensor that serves as the left operand.
right  T
A scalar that serves as the right operand.
result  Tensor<T>  (Optional)
Optional. The tensor that is to hold the result. May be null.
mask  Tensor<Boolean>  (Optional)
Optional. A boolean tensor that specifies for which elements the operation should be performed. If null (the default), the operation is applied everywhere.
order  TensorElementOrder  (Optional)
Optional. If result is null, the desired ordering in memory of the result.

Type Parameters

T
The type of the elements of the tensor.

Return Value

Tensor<T>
A tensor of the same shape as left whose elements are equal to the minimum of the corresponding elements of left and right.

Exceptions

Min<T>(Tensor<T>, Tensor<T>, Tensor<T>, Tensor<Boolean>, TensorElementOrder)

Computes the smallest of corresponding elements of two tensors.
C#
public static Tensor<T> Min<T>(
	Tensor<T> left,
	Tensor<T> right,
	Tensor<T>? result = null,
	Tensor<bool>? mask = null,
	TensorElementOrder order = TensorElementOrder.Automatic
)

Parameters

left  Tensor<T>
A tensor that serves as the left operand.
right  Tensor<T>
A tensor that serves as the right operand.
result  Tensor<T>  (Optional)
Optional. The tensor that is to hold the result. May be null.
mask  Tensor<Boolean>  (Optional)
Optional. A boolean tensor that specifies for which elements should be included in the operation. If null (the default), the operation is applied everywhere.
order  TensorElementOrder  (Optional)
Optional. If result is null, the desired ordering in memory of the result.

Type Parameters

T
The type of the elements of the tensors.

Return Value

Tensor<T>
A tensor of the same shape as left and right whose elements are equal to the minimum of the corresponding elements of left and right.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

Min<T>(T, Tensor<T>, Tensor<T>, Tensor<Boolean>, TensorElementOrder)

Computes the minimum of a scalar and the elements of a tensor..
C#
public static Tensor<T> Min<T>(
	T left,
	Tensor<T> right,
	Tensor<T>? result = null,
	Tensor<bool>? mask = null,
	TensorElementOrder order = TensorElementOrder.Automatic
)

Parameters

left  T
A scalar that serves as the left operand.
right  Tensor<T>
A tensor that serves as the right operand.
result  Tensor<T>  (Optional)
Optional. The tensor that is to hold the result. May be null.
mask  Tensor<Boolean>  (Optional)
Optional. A boolean tensor that specifies for which elements the operation should be performed. If null (the default), the operation is applied everywhere.
order  TensorElementOrder  (Optional)
Optional. If result is null, the desired ordering in memory of the result.

Type Parameters

T
The type of the elements of the tensor.

Return Value

Tensor<T>
A tensor of the same shape as right whose elements are equal to the minimum of left and the corresponding elements of right.

Exceptions

ArgumentNullException

right is null.

Min<T>(Tensor<T>, Index, Boolean, Tensor<Boolean>, Boolean, TensorElementOrder)

Computes the minima of the elements of a tensor along the specified axis.
C#
public static Tensor<T> Min<T>(
	this Tensor<T> operand,
	Index axis,
	bool keepDimensions = false,
	Tensor<bool>? mask = null,
	bool skipMissingValues = false,
	TensorElementOrder order = TensorElementOrder.Automatic
)

Parameters

operand  Tensor<T>
The tensor that contains the elements to reduce.
axis  Index
The axis along which to reduce the elements.
keepDimensions  Boolean  (Optional)
Optional. Specifies whether the reduced axis should be retained in the result. The default is false.
mask  Tensor<Boolean>  (Optional)
Optional. A condition that elements must satisfy to be included in the reduction.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.
order  TensorElementOrder  (Optional)
Optional. Specifies the element order of the result. By default, elements are stored in the order of operand.

Type Parameters

T
The type of the elements of the tensor.

Return Value

Tensor<T>
A tensor containing the minimum of the elements of operand that satisfy mask along axis.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Tensor<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also