README-work

Math::DistanceFunctions

Raku package with a collection of mathematical distance functions and a corresponding role.

The content of this package was "factored out" from "ML::Clustering", [AAp1].

Installation

From Zef ecosystem:

zef install Math::DistanceFunctions

From GitHub:

zef install https://github.com/antononcube/Raku-Math-DistanceFunctions.git

Usage examples

use Math::DistanceFunctions;

my @v1 = 10.rand xx 10;
my @v2 = 2.rand xx 10;

my @funcs = [
    :&bray-curtis-distance,
    :&canberra-distance,
    :&chessboard-distance,
    :&cosine-distance,
    :&euclidean-distance,
    :&hamming-distance,
    :&manhattan-distance,
    :&squared-euclidean-distance
];

for @funcs -> $p {
    say "{$p.key} : {$p.value.(@v1, @v2)}";
}

References

[AAp1] Anton Antonov, ML:Clustering Raku package, (2022), GitHub/antononcube.

Math::DistanceFunctions v0.1.0

Raku package with a collection of mathematical distance functions and a corresponding role.

Authors

  • Anton Antonov

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Math::DistanceFunctionish
  • Math::DistanceFunctions

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.