Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Exports a common interface for implementations of prime-number generators.
- class Algorithmic algorithm where
- primorial :: (Algorithmic algorithm, NFData i, Ix i, Integral i) => algorithm -> [i]
- mersenneNumbers :: (Algorithmic algorithm, Integral i) => algorithm -> [i]
Type-classes
class Algorithmic algorithm where Source #
Defines the methods expected of a prime-number generator.
Functions
primorial :: (Algorithmic algorithm, NFData i, Ix i, Integral i) => algorithm -> [i] Source #
- Returns the constant list, defining the Primorial.
- https://en.wikipedia.org/wiki/Primorial.
- http://mathworld.wolfram.com/Primorial.html.
mersenneNumbers :: (Algorithmic algorithm, Integral i) => algorithm -> [i] Source #
- Returns the constant ordered infinite list of Mersenne numbers.
- Only the subset composed from a prime exponent is returned; which is a strict superset of the Mersenne Primes.
- https://en.wikipedia.org/wiki/Mersenne_prime.
- http://mathworld.wolfram.com/MersenneNumber.html