Class Prime::PseudoPrimeGenerator
In: lib/backports/1.9.1/stdlib/prime.rb
Parent: Object

An abstract class for enumerating pseudo-prime numbers.

Concrete subclasses should override succ, next, rewind.

Methods

each   new   next   rewind   succ   upper_bound   upper_bound=   with_object  

Included Modules

Enumerable

External Aliases

each_with_index -> with_index
  see Enumeratorwith_index.

Public Class methods

Public Instance methods

Iterates the given block for each prime numbers.

alias of succ.

Rewinds the internal position for enumeration.

See Enumeratorrewind.

returns the next pseudo-prime number, and move the internal position forward.

PseudoPrimeGeneratorsucc raises NotImplementedError.

[Validate]