ms

metric spaces https://github.com/relrod/ms

Latest on Hackage:0.2.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD2 licensed by Ricky Elrod, Tony Morris
Maintained by ricky@elrod.me

A MetricSpace is a set together with a notion of distance between elements. Distance is computed by a function dist which has the following four laws:

  1. non-negative: forall x y. dist x y >= 0

  2. identity of indiscernibles: forall x y. dist x y == 0 <=> x == y

  3. symmetry: forall x y. dist x y == dist y x

  4. triangle inequality: forall x y z. dist x z <= dist x y + dist y z

See the Wikipedia article on metric spaces for more details.

Changes

0.2.1

  • Added a changelog.
  • Added hamming distance metric.
  • Added instance of Semigroupoid. (@tonymorris)
  • Fixed hlint warnings.

0.2

  • Fixed types of discrete and levenshtein to use Integral instead of Floating.
  • Slight docs formatting fixes

0.1

Initial release.

comments powered byDisqus