factory-0.2.0.5: Rational arithmetic in an irrational world.

Safe HaskellNone

Factory.Data.Ring

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION

Synopsis

Type-classes

class Ring r whereSource

Methods

(=+=)Source

Arguments

:: r 
-> r 
-> r

Addition of two members; required to be commutative; http://en.wikipedia.org/wiki/Commutativity.

(=*=)Source

Arguments

:: r 
-> r 
-> r

Multiplication of two members.

additiveInverseSource

Arguments

:: r 
-> r

The operand required to yield zero under addition; http://en.wikipedia.org/wiki/Additive_inverse.

multiplicativeIdentitySource

Arguments

:: r

The identity-member under multiplication; http://mathworld.wolfram.com/MultiplicativeIdentity.html.

additiveIdentitySource

Arguments

:: r

The identity-member under addition (AKA zero); http://en.wikipedia.org/wiki/Additive_identity.

(=-=)Source

Arguments

:: r 
-> r 
-> r

Subtract the two specified ring-members.

squareSource

Arguments

:: r 
-> r

Square the ring.

Instances

(Eq c, Num c, Num e, Ord e) => Ring (Polynomial c e)

Makes Polynomial a Ring, over the field composed from all possible coefficients; http://en.wikipedia.org/wiki/Polynomial_ring.

(Eq c, Num c, Num e, Ord e, Show c, Show e) => Ring (MonicPolynomial c e) 

Types

Data.types

Functions

product' :: Ring r => BisectionRatio -> MinLength -> [r] -> rSource

Returns the product of the list of ring-members.

sum' :: Ring r => BisectionRatio -> MinLength -> [r] -> rSource

Returns the sum of the list of ring-members.

Operators

(=^) :: (Eq r, Integral power, Ring r, Show power) => r -> power -> rSource