Tensor.All Method
Definition
Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.1
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.1
Overload List
All( | Returns whether all elements of a boolean tensor are true. |
All( | Computes whether all elements of a boolean tensor along the specified axis are true. |
All(Tensor<Boolean>, Tensor<Boolean>)
Returns whether all elements of a boolean tensor are true.
public static bool All(
this Tensor<bool> operand,
Tensor<bool>? mask = null
)
Parameters
- operand Tensor<Boolean>
- The tensor that contains the elements to check.
- mask Tensor<Boolean> (Optional)
- Optional. A boolean that specifies which elements should be included in the operation. If null (the default), all elements are included.
Return Value
Booleantrue if all elements that satisfy mask are true; otherwise false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Tensor<Boolean>. 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).All(Tensor<Boolean>, Axes, Tensor<Boolean>, Boolean, Tensor<Boolean>, TensorElementOrder)
Computes whether all elements of a boolean tensor
along the specified axis are true.
public static Tensor<bool> All(
this Tensor<bool> operand,
Axes axis,
Tensor<bool>? result = null,
bool keepDimensions = false,
Tensor<bool>? mask = null,
TensorElementOrder order = TensorElementOrder.Automatic
)
Parameters
- operand Tensor<Boolean>
- A boolean tensor.
- axis Axes
- The axis along which to sum the elements. The default is 0.
- result Tensor<Boolean> (Optional)
- Optional. The tensor that is to hold the result. May be null.
- 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 boolean that specifies for which elements the operation should be performed. If null (the default), the operation is applied everywhere.
- order TensorElementOrder (Optional)
- Optional. Specifies the element order of the result. By default, elements are stored in the order of operand.
Return Value
Tensor<Boolean>A tensor containing a value that indicates whether all elements of operand that satisfy mask along axis are true.