Numerix v0.0.4 Numerix.Distance

Distance functions between two vectors.

Summary

Types

Something that may be a float

Functions

Calculates the Euclidean distance between two vectors

Calculates the Manhattan distance between two vectors

Calculates the Minkowski distance between two vectors

Calculates the Pearson’s distance between two vectors

Types

maybe_float :: float | nil

Something that may be a float.

Functions

euclidean(vector1, vector2)

Specs

euclidean([number], [number]) :: maybe_float

Calculates the Euclidean distance between two vectors.

manhattan(vector1, vector2)

Specs

manhattan([number], [number]) :: maybe_float

Calculates the Manhattan distance between two vectors.

minkowski(vector1, vector2, lambda \\ 3)

Specs

minkowski([number], [number], integer) :: maybe_float

Calculates the Minkowski distance between two vectors.

pearson(vector1, vector2)

Specs

pearson([number], [number]) :: maybe_float

Calculates the Pearson’s distance between two vectors.