Share via


Tensor.UnaryNegation(ReadOnlyTensorSpan<TScalar>) Operator

Definition

Performs element-wise unary negation on a tensor.

public:
 static System::Numerics::Tensors::Tensor<TScalar> ^ operator -(System::Numerics::Tensors::ReadOnlyTensorSpan<TScalar> % tensor);
public static System.Numerics.Tensors.Tensor<TScalar> operator -(in System.Numerics.Tensors.ReadOnlyTensorSpan<TScalar> tensor);
static member ( ~- ) : ReadOnlyTensorSpan -> System.Numerics.Tensors.Tensor<'TScalar (requires 'TScalar :> System.Numerics.IUnaryNegationOperators<'TScalar, 'TScalar>)>
Public Shared Operator - (ByRef tensor As ReadOnlyTensorSpan(Of TScalar)) As Tensor(Of TScalar)

Parameters

tensor
ReadOnlyTensorSpan<TScalar>

The tensor to negate.

Returns

Tensor<TScalar>

A new tensor containing the result of -tensor.

Applies to