algebra-simple-0.1: An alternative mathematical interface to Num.
Safe HaskellNone
LanguageHaskell2010

Numeric.Algebra.MetricSpace

Description

Provides the MetricSpace typeclass.

Since: 0.1

Synopsis

Documentation

class MetricSpace s where Source #

Defines a metric space. A metric is a function \(d : M \times M \to \mathbb{R}\) s.t. for all \(x, y, z \in M\):

  • \(d(x, x) = 0\)
  • Positivity: If \(x \ne y\), then \(d(x, y) > 0\)
  • Symmetry: \(d(x, y) = d(y, x)\)
  • Triangle equality: \(d(x, z) \le d(x, y) + d(y, z) \)

Since: 0.1

Methods

diffR :: s -> s -> Double Source #

Since: 0.1

Instances

Instances details
MetricSpace Int16 Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Int16 -> Int16 -> Double Source #

MetricSpace Int32 Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Int32 -> Int32 -> Double Source #

MetricSpace Int64 Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Int64 -> Int64 -> Double Source #

MetricSpace Int8 Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Int8 -> Int8 -> Double Source #

MetricSpace Word16 Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Word16 -> Word16 -> Double Source #

MetricSpace Word32 Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Word32 -> Word32 -> Double Source #

MetricSpace Word64 Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Word64 -> Word64 -> Double Source #

MetricSpace Word8 Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Word8 -> Word8 -> Double Source #

MetricSpace Integer Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

MetricSpace Natural Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

MetricSpace Double Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Double -> Double -> Double Source #

MetricSpace Float Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Float -> Float -> Double Source #

MetricSpace Int Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Int -> Int -> Double Source #

MetricSpace Word Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Word -> Word -> Double Source #

RealFloat a => MetricSpace (Complex a) Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

Methods

diffR :: Complex a -> Complex a -> Double Source #

MetricSpace (Ratio Integer) Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

MetricSpace (Ratio Natural) Source #

Since: 0.1

Instance details

Defined in Numeric.Algebra.MetricSpace

diffℝ :: MetricSpace a => a -> a -> Double Source #

Unicode alias for diffR, with U+211D.

Since: 0.1