Vector.Swap<T> Method
Swaps the elements of two vectors.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.7.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.7.0
public static void Swap<T>(
Vector<T> left,
Vector<T> right
)
Parameters
Type Parameters
- T
Remarks
Detectable overlapping span-backed storage is handled safely. If the storage relationship cannot be determined efficiently, the vectors are treated as non-overlapping; results are unspecified if they share storage in an undetectable way.
Exceptions
| Dimension | The length of left is not equal to the length of right. |
| Argument | left is null. -or- right is null. |
| Dimension | The length of left does not equal the length of right. |
| Component | left or right is read-only. |