Tensor Back End.Swap<T> Method
Swaps the corresponding elements of two tensors.
Definition
Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.1
C#
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.1
public abstract void Swap<T>(
Tensor<T> tensor1,
Tensor<T> tensor2,
Tensor<bool>? mask = null
)
Parameters
- tensor1 Tensor<T>
- The first tensor.
- tensor2 Tensor<T>
- The second tensor.
- 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.
Type Parameters
- T
- The type of the elements of the tensor.
Exceptions
Argument | tensor1 is null. -or- tensor2 is null. |