﻿ILMath.distL1 Method (InArray(Single), InArray(Single))

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Pairwise L1 distance. Aka: Manhattan distance.

[ILNumerics Computing Engine]

Namespace:  ILNumerics
Assembly:  ILNumerics.Computing (in ILNumerics.Computing.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

```public static RetArray<float> distL1(
InArray<float> A,
InArray<float> B
)```

#### Parameters

A
Type: ILNumericsInArraySingle
Input points (matrix).
B
Type: ILNumericsInArraySingle
Input point (vector).

#### Return Value

Type: RetArraySingle
pairwise L1 distances between the data point provided in the input vector B and the data points stored in the matrix A.
Remarks

If B is a colum vector, the distances between B and the columns of A are calculated. The number of rows of A must match the length of vector B than. Therefore, the length of the returned vector of distances matches the number of columns of A:

`A.S[1]`
.

If B is a row vector, the distances between B and the rows of A are calculated. The number of columns of A must match the length of vector B than. Therefore, the length of the returned vector of distances matches the number of rows of A:

`A.S[0]`
.

This function is commutative, the single data point may be provided in A and the data point matrix may be provided in B as well.

[ILNumerics Computing Engine]