computational-algebra-0.5.0.0: Well-kinded computational algebra library, currently supporting Groebner basis.

Safe HaskellNone
LanguageHaskell2010

Algebra.Instances

Contents

Description

This Library provides some *dangerous* instances for Doubles and Complex.

Orphan instances

Commutative Double Source # 
Ring Double Source # 
Rig Double Source # 
DecidableZero Double Source # 

Methods

isZero :: Double -> Bool #

Division Double Source # 

Methods

recip :: Double -> Double #

(/) :: Double -> Double -> Double #

(\\) :: Double -> Double -> Double #

(^) :: Integral n => Double -> n -> Double #

Unital Double Source # 

Methods

one :: Double #

pow :: Double -> Natural -> Double #

productWith :: Foldable f => (a -> Double) -> f a -> Double #

Group Double Source # 
Multiplicative Double Source # 

Methods

(*) :: Double -> Double -> Double #

pow1p :: Double -> Natural -> Double #

productWith1 :: Foldable1 f => (a -> Double) -> f a -> Double #

Semiring Double Source # 
Monoidal Double Source # 

Methods

zero :: Double #

sinnum :: Natural -> Double -> Double #

sumWith :: Foldable f => (a -> Double) -> f a -> Double #

Additive Double Source # 

Methods

(+) :: Double -> Double -> Double #

sinnum1p :: Natural -> Double -> Double #

sumWith1 :: Foldable1 f => (a -> Double) -> f a -> Double #

Abelian Double Source # 
LeftModule Integer Double Source # 

Methods

(.*) :: Integer -> Double -> Double #

LeftModule Natural Double Source # 

Methods

(.*) :: Natural -> Double -> Double #

RightModule Integer Double Source # 

Methods

(*.) :: Double -> Integer -> Double #

RightModule Natural Double Source # 

Methods

(*.) :: Double -> Natural -> Double #

Integral r => LeftModule Integer (Ratio r) Source # 

Methods

(.*) :: Integer -> Ratio r -> Ratio r #

LeftModule a r => LeftModule a (Complex r) Source # 

Methods

(.*) :: a -> Complex r -> Complex r #

Integral r => LeftModule Natural (Ratio r) Source # 

Methods

(.*) :: Natural -> Ratio r -> Ratio r #

Integral r => RightModule Integer (Ratio r) Source # 

Methods

(*.) :: Ratio r -> Integer -> Ratio r #

RightModule a r => RightModule a (Complex r) Source # 

Methods

(*.) :: Complex r -> a -> Complex r #

Integral r => RightModule Natural (Ratio r) Source # 

Methods

(*.) :: Ratio r -> Natural -> Ratio r #

Random (Fraction Integer) Source # 
Integral r => Commutative (Ratio r) Source # 
(Group r, Commutative r) => Commutative (Complex r) Source # 
Integral r => Ring (Ratio r) Source # 

Methods

fromInteger :: Integer -> Ratio r #

Ring r => Ring (Complex r) Source # 

Methods

fromInteger :: Integer -> Complex r #

Integral r => Rig (Ratio r) Source # 

Methods

fromNatural :: Natural -> Ratio r #

(Group r, Rig r) => Rig (Complex r) Source # 

Methods

fromNatural :: Natural -> Complex r #

Integral r => DecidableZero (Ratio r) Source # 

Methods

isZero :: Ratio r -> Bool #

DecidableZero r => DecidableZero (Complex r) Source #

These Instances are not algebraically right, but for the sake of convenience.

Methods

isZero :: Complex r -> Bool #

Integral r => DecidableUnits (Ratio r) Source # 

Methods

recipUnit :: Ratio r -> Maybe (Ratio r) #

isUnit :: Ratio r -> Bool #

(^?) :: Integral n => Ratio r -> n -> Maybe (Ratio r) #

Integral r => Division (Ratio r) Source # 

Methods

recip :: Ratio r -> Ratio r #

(/) :: Ratio r -> Ratio r -> Ratio r #

(\\) :: Ratio r -> Ratio r -> Ratio r #

(^) :: Integral n => Ratio r -> n -> Ratio r #

Integral r => Unital (Ratio r) Source # 

Methods

one :: Ratio r #

pow :: Ratio r -> Natural -> Ratio r #

productWith :: Foldable f => (a -> Ratio r) -> f a -> Ratio r #

(Group r, Monoidal r, Unital r) => Unital (Complex r) Source # 

Methods

one :: Complex r #

pow :: Complex r -> Natural -> Complex r #

productWith :: Foldable f => (a -> Complex r) -> f a -> Complex r #

Integral r => Group (Ratio r) Source # 

Methods

(-) :: Ratio r -> Ratio r -> Ratio r #

negate :: Ratio r -> Ratio r #

subtract :: Ratio r -> Ratio r -> Ratio r #

times :: Integral n => n -> Ratio r -> Ratio r #

Group r => Group (Complex r) Source # 

Methods

(-) :: Complex r -> Complex r -> Complex r #

negate :: Complex r -> Complex r #

subtract :: Complex r -> Complex r -> Complex r #

times :: Integral n => n -> Complex r -> Complex r #

Integral r => Multiplicative (Ratio r) Source # 

Methods

(*) :: Ratio r -> Ratio r -> Ratio r #

pow1p :: Ratio r -> Natural -> Ratio r #

productWith1 :: Foldable1 f => (a -> Ratio r) -> f a -> Ratio r #

(Group r, Multiplicative r) => Multiplicative (Complex r) Source # 

Methods

(*) :: Complex r -> Complex r -> Complex r #

pow1p :: Complex r -> Natural -> Complex r #

productWith1 :: Foldable1 f => (a -> Complex r) -> f a -> Complex r #

Integral r => Semiring (Ratio r) Source # 
(Group r, Semiring r) => Semiring (Complex r) Source # 
Integral r => Monoidal (Ratio r) Source # 

Methods

zero :: Ratio r #

sinnum :: Natural -> Ratio r -> Ratio r #

sumWith :: Foldable f => (a -> Ratio r) -> f a -> Ratio r #

Monoidal r => Monoidal (Complex r) Source # 

Methods

zero :: Complex r #

sinnum :: Natural -> Complex r -> Complex r #

sumWith :: Foldable f => (a -> Complex r) -> f a -> Complex r #

Integral r => Additive (Ratio r) Source # 

Methods

(+) :: Ratio r -> Ratio r -> Ratio r #

sinnum1p :: Natural -> Ratio r -> Ratio r #

sumWith1 :: Foldable1 f => (a -> Ratio r) -> f a -> Ratio r #

Additive r => Additive (Vector r) Source # 

Methods

(+) :: Vector r -> Vector r -> Vector r #

sinnum1p :: Natural -> Vector r -> Vector r #

sumWith1 :: Foldable1 f => (a -> Vector r) -> f a -> Vector r #

Additive r => Additive (Complex r) Source # 

Methods

(+) :: Complex r -> Complex r -> Complex r #

sinnum1p :: Natural -> Complex r -> Complex r #

sumWith1 :: Foldable1 f => (a -> Complex r) -> f a -> Complex r #

Integral r => Abelian (Ratio r) Source # 
Abelian r => Abelian (Complex r) Source # 
Hashable a => Hashable (Vector a) Source # 

Methods

hashWithSalt :: Int -> Vector a -> Int #

hash :: Vector a -> Int #

NFData a => NFData (Fraction a) Source # 

Methods

rnf :: Fraction a -> () #

Convertible (Fraction Integer) Double Source # 
(Semiring r, Integral r) => LeftModule (Scalar r) (Ratio r) Source # 

Methods

(.*) :: Scalar r -> Ratio r -> Ratio r #

(Semiring r, Integral r) => RightModule (Scalar r) (Ratio r) Source # 

Methods

(*.) :: Ratio r -> Scalar r -> Ratio r #

Convertible (Fraction Integer) (Complex Double) Source #