Prime::PseudoPrimeGenerator
An implementation of PseudoPrimeGenerator.
PseudoPrimeGenerator
Uses EratosthenesSieve.
EratosthenesSieve
# File prime.rb, line 309 def initialize @last_prime_index = -1 super end
# File prime.rb, line 318 def rewind initialize end
# File prime.rb, line 314 def succ @last_prime_index += 1 EratosthenesSieve.instance.get_nth_prime(@last_prime_index) end
This page was generated for Ruby 2.4.3
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.41.0.