Vector.ManhattanDistance<T> Method

Returns the Manhattan (city block) distance between two vectors.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static T ManhattanDistance<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 absolute value of the difference between corresponding components of left and right.

Exceptions

ArgumentNullExceptionleft is null.

-or-

right is null.

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

See Also