Tensor.Swap<T> Method

Swaps the elements of two tensors.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
public static void Swap<T>(
	Tensor<T> first,
	Tensor<T> second
)

Parameters

first  Tensor<T>
A tensor whose elements serve as the first argument to the function.
second  Tensor<T>
A tensor whose elements serve as the second argument to the function.

Type Parameters

T
The type of the elements of the tensors.

Exceptions

ArgumentNullException

first is null

-or-

second is null

DimensionMismatchException

The shape of first does not equal the shape of second.

See Also