Home > Extreme Optimization Mathematics Library for .NET > Reference > Extreme.Mathematics.LinearAlgebra Namespace > Vector Class > Methods


Extreme Optimization Mathematics Library for .NET

Vector.Swap Method 

Swaps the elements of two vectors.

[Visual Basic]
Public Shared Sub Swap( _
   ByVal vector1 As Vector, _
   ByVal vector2 As Vector _
)
[C#]
public static void Swap(
   Vector vector1,
   Vector vector2
);

Parameters

vector1
The first Vector.
vector2
The second Vector.

Exceptions

Exception TypeCondition
DimensionMismatchExceptionThe length of vector1 is not equal to the length of vector2.
ArgumentNullExceptionvector1 is a null reference (Nothing in Visual Basic)

-or-

vector2 is a null reference (Nothing in Visual Basic)

DimensionMismatchException The length of vector1 does not equal the length of vector2.

See Also

Vector Class | Extreme.Mathematics.LinearAlgebra Namespace