Tensor.Negate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Negate<T>(ReadOnlyTensorSpan<T>) |
Performs element-wise unary negation on a tensor. |
| Negate<T>(ReadOnlyTensorSpan<T>, TensorSpan<T>) |
Performs element-wise unary negation on a tensor. |
Negate<T>(ReadOnlyTensorSpan<T>)
- Source:
- Tensor.op_UnaryNegation.cs
- Source:
- TensorExtensions.cs
Performs element-wise unary negation on a tensor.
public:
generic <typename T>
where T : System::Numerics::IUnaryNegationOperators<T, T> static System::Numerics::Tensors::Tensor<T> ^ Negate(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x);
public static System.Numerics.Tensors.Tensor<T> Negate<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x) where T : System.Numerics.IUnaryNegationOperators<T,T>;
static member Negate : ReadOnlyTensorSpan -> System.Numerics.Tensors.Tensor<'T (requires 'T :> System.Numerics.IUnaryNegationOperators<'T, 'T>)> (requires 'T :> System.Numerics.IUnaryNegationOperators<'T, 'T>)
Public Function Negate(Of T As IUnaryNegationOperators(Of T, T)) (ByRef x As ReadOnlyTensorSpan(Of T)) As Tensor(Of T)
Type Parameters
- T
Parameters
The tensor to negate.
Returns
A new tensor containing the result of -x.
Applies to
Negate<T>(ReadOnlyTensorSpan<T>, TensorSpan<T>)
- Source:
- Tensor.op_UnaryNegation.cs
- Source:
- TensorExtensions.cs
Performs element-wise unary negation on a tensor.
public:
generic <typename T>
where T : System::Numerics::IUnaryNegationOperators<T, T> static System::Numerics::Tensors::TensorSpan<T> ^ Negate(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x, System::Numerics::Tensors::TensorSpan<T> % destination);
public static ref readonly System.Numerics.Tensors.TensorSpan<T> Negate<T>(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.TensorSpan<T> destination) where T : System.Numerics.IUnaryNegationOperators<T,T>;
static member Negate : ReadOnlyTensorSpan * TensorSpan -> TensorSpan (requires 'T :> System.Numerics.IUnaryNegationOperators<'T, 'T>)
Public Function Negate(Of T As IUnaryNegationOperators(Of T, T)) (ByRef x As ReadOnlyTensorSpan(Of T), ByRef destination As TensorSpan(Of T)) As TensorSpan(Of T)
Type Parameters
- T
Parameters
The tensor to negate.
- destination
- TensorSpan<T>
The destination where the result of -x is written.
Returns
A reference to destination.
Exceptions
The shapes of x and destination are not compatible.