Tensor.One Norm Method
Definition
Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
Overload List
One | Computes the sum of the absolute values of the elements of a tensor. |
One | Computes the sum of the absolute values of the elements of a tensor. |
OneNorm<T>(Tensor<T>, Tensor<Boolean>, Boolean)
Computes the sum of the absolute values of the elements of a tensor.
public static T OneNorm<T>(
this Tensor<T> value,
Tensor<bool>? mask = null,
bool skipMissingValues = false
)
Parameters
- value Tensor<T>
- A tensor.
- 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.
- skipMissingValues Boolean (Optional)
- Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.
Type Parameters
- T
- The type of the elements of the tensor.
Return Value
TA tensor containing the sum of the absolute values of the elements of value that satisfy mask.
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).OneNorm<T>(Tensor<T>, Axes, Tensor<T>, Boolean, Tensor<Boolean>, Boolean, TensorElementOrder)
Computes the sum of the absolute values of the elements of a tensor.
public static Tensor<T> OneNorm<T>(
this Tensor<T> value,
Axes axis,
Tensor<T>? result = null,
bool keepDimensions = false,
Tensor<bool>? mask = null,
bool skipMissingValues = false,
TensorElementOrder order = TensorElementOrder.Automatic
)
Parameters
- value Tensor<T>
- A tensor.
- axis Axes
- The axis along which the sum of the absolute values of the elements is computed.
- result Tensor<T> (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 tensor that specifies for which elements should be included in the operation. If null (the default), the operation is applied everywhere.
- skipMissingValues Boolean (Optional)
- Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.
- 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 containing the sum of the absolute values of the elements of value that satisfy mask along the specified 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).Exceptions
Argument | value is null. |