Prime::PseudoPrimeGenerator
An implementation of PseudoPrimeGenerator.
PseudoPrimeGenerator
Uses EratosthenesSieve.
EratosthenesSieve
# File prime.rb, line 308 def initialize @last_prime = nil super end
# File prime.rb, line 316 def rewind initialize end
# File prime.rb, line 313 def succ @last_prime = @last_prime ? EratosthenesSieve.instance.next_to(@last_prime) : 2 end
This page was generated for Ruby 2.0.0
Ruby-doc.org is a service of James Britt and Neurogami, a software development company in Scottsdale, AZ.
Generated with Ruby-doc Rdoc Generator 0.26.0.