Swaps the elements of two vectors.

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Shared Sub Swap ( _
	vector1 As Vector, _
	vector2 As Vector _
)
C#
public static void Swap (
	Vector vector1,
	Vector vector2
)
C++
public:
static void Swap (
	Vector^ vector1, 
	Vector^ vector2
)

Parameters

vector1 (Extreme.Mathematics.LinearAlgebra.Vector)
The first Vector.
vector2 (Extreme.Mathematics.LinearAlgebra.Vector)
The second Vector.

Exceptions

ExceptionCondition
DimensionMismatchExceptionThe length of vector1 is not equal to the length of vector2.
ArgumentNullExceptionvector1 is nullNothingnullptr

-or-

vector2 is nullNothingnullptr

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