Returns the Manhattan (city block) distance between two vectors.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static T ManhattanDistance<T>(
Vector<T> left,
Vector<T> right
)
Public Shared Function ManhattanDistance(Of T) (
left As Vector(Of T),
right As Vector(Of T)
) As T
public:
generic<typename T>
static T ManhattanDistance(
Vector<T>^ left,
Vector<T>^ right
)
static member ManhattanDistance :
left : Vector<'T> *
right : Vector<'T> -> 'T
Parameters
- left
- Type: Extreme.MathematicsVectorT
The first VectorT. - right
- Type: Extreme.MathematicsVectorT
The second VectorT.
Type Parameters
- T
Return Value
Type:
TThe sum of the absolute value of the difference between corresponding
components of
left and
right.
Reference