factory-0.2.0.5: Rational arithmetic in an irrational world.

Factory.Data.Ring

Contents

Description

`AUTHOR`
Dr. Alistair Ward
`DESCRIPTION`

Synopsis

# Type-classes

class Ring r whereSource

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

Methods

Arguments

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

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

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