math-metric-0.1.0.1: Typeclass for metric spaces

Safe HaskellSafe
LanguageHaskell2010

Data.Metric

Documentation

class Metric a where Source #

Methods

dist :: Fractional n => a -> a -> n Source #

Instances
Metric Double Source # 
Instance details

Defined in Data.Metric

Methods

dist :: Fractional n => Double -> Double -> n Source #

Metric Float Source # 
Instance details

Defined in Data.Metric

Methods

dist :: Fractional n => Float -> Float -> n Source #

Metric Int Source # 
Instance details

Defined in Data.Metric

Methods

dist :: Fractional n => Int -> Int -> n Source #

Metric Integer Source # 
Instance details

Defined in Data.Metric

Methods

dist :: Fractional n => Integer -> Integer -> n Source #

Metric Word Source # 
Instance details

Defined in Data.Metric

Methods

dist :: Fractional n => Word -> Word -> n Source #

Metric Word8 Source # 
Instance details

Defined in Data.Metric

Methods

dist :: Fractional n => Word8 -> Word8 -> n Source #

Metric (Ratio Integer) Source # 
Instance details

Defined in Data.Metric

Methods

dist :: Fractional n => Ratio Integer -> Ratio Integer -> n Source #

closest :: (Fractional n, Ord n, Metric a) => Proxy n -> [a] -> a -> a Source #