Tensor<T> Explicit Conversion Operators
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
Explicit(T to Tensor<T>) | Implicitly converts a scalar value to a 0-dimensional scalar tensor. |
Explicit(T[] to Tensor<T>) | Implicitly converts an array to a 1-dimensional scalar tensor. |
Explicit(T[,,] to Tensor<T>) | Implicitly converts an array to a 3-dimensional scalar tensor. |
Explicit(T[,] to Tensor<T>) | Implicitly converts an array to a 2-dimensional scalar tensor. |
Explicit(Tensor<T> to T) | Converts a scalar (0-dimensional) tensor to the corresponding scalar value. |
Explicit Conversion (T to Tensor<T>)
Implicitly converts a scalar value to a
0-dimensional scalar tensor.
public static explicit operator Tensor<T> (
T value
)
Parameters
- value T
- The value to convert.
Return Value
Tensor<T>Explicit Conversion (T[] to Tensor<T>)
Implicitly converts an array to a
1-dimensional scalar tensor.
public static explicit operator Tensor<T> (
T[] value
)
Parameters
- value T[]
- The value to convert.
Return Value
Tensor<T>Explicit Conversion (T[,] to Tensor<T>)
Implicitly converts an array to a
3-dimensional scalar tensor.
public static explicit operator Tensor<T> (
T[,,] value
)
Parameters
- value T[3]
- The value to convert.
Return Value
Tensor<T>Explicit Conversion (T[,] to Tensor<T>)
Implicitly converts an array to a
2-dimensional scalar tensor.
public static explicit operator Tensor<T> (
T[,] value
)
Parameters
- value T[2]
- The value to convert.
Return Value
Tensor<T>Explicit Conversion (Tensor<T> to T)
Converts a scalar (0-dimensional) tensor to
the corresponding scalar value.
Exceptions
Invalid | value does not have exactly one element. |