Vector.SquaredEuclideanDistance<T> Method

Returns the square of the Euclidean distance between two vectors.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
public static T SquaredEuclideanDistance<T>(
	Vector<T> left,
	Vector<T> right
)

Parameters

left  Vector<T>
The first Vector<T>.
right  Vector<T>
The second Vector<T>.

Type Parameters

T

Return Value

T
The sum of the squares of the difference between corresponding components of left and right.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

The length of left is not equal to the length of right.

See Also