factory-0.2.1.1: Rational arithmetic in an irrational world.

Safe HaskellNone
LanguageHaskell98

Factory.Data.Ring

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION

Synopsis

Type-classes

class Ring r where Source

Methods

(=+=) infixl 6 Source

Arguments

:: r 
-> r 
-> r

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

(=*=) infixl 7 Source

Arguments

:: r 
-> r 
-> r

Multiplication of two members.

additiveInverse Source

Arguments

:: r 
-> r

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

multiplicativeIdentity Source

Arguments

:: r

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

additiveIdentity Source

Arguments

:: r

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

(=-=) infixl 6 Source

Arguments

:: r 
-> r 
-> r

Subtract the two specified ring-members.

square Source

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] -> r Source

Returns the product of the list of ring-members.

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

Returns the sum of the list of ring-members.

Operators

(=^) :: (Eq r, Integral power, Ring r, Show power) => r -> power -> r infixr 8 Source