An abstract class for enumerating pseudo-prime numbers.
Concrete subclasses should override succ, next, rewind.
Methods
- E
- N
- R
- S
- U
- W
Included Modules
Class Public methods
new(ubound = nil)
Link
Instance Public methods
each(&block)
Link
Iterates the given block for each prime numbers.
next()
Link
alias of succ.
rewind()
Link
Rewinds the internal position for enumeration.
See Enumerator#rewind.
succ()
Link
returns the next pseudo-prime number, and move the internal position forward.
PseudoPrimeGenerator#succ raises
NotImplementedError.
upper_bound()
Link
upper_bound=(ubound)
Link