factory-0.2.1.1: Rational arithmetic in an irrational world.

Factory.Data.Ring

Description

`AUTHOR`
Dr. Alistair Ward
`DESCRIPTION`

Synopsis

# Type-classes

class Ring r where Source

• Define both the operations applicable to all members of the ring, and its mandatory members.
• Minimal definition; `=+=`, `=*=`, `additiveInverse`, `multiplicativeIdentity`, `additiveIdentity`.

Minimal complete definition

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.

Arguments

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

Arguments

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

Arguments

(=-=) infixl 6 Source

Arguments

 :: r -> r -> r Subtract the two specified ring-members.

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)

# 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