Prime::PseudoPrimeGenerator
An implementation of PseudoPrimeGenerator.
PseudoPrimeGenerator
Uses EratosthenesSieve.
EratosthenesSieve
# File prime.rb, line 337 def initialize @last_prime_index = -1 super end
# File prime.rb, line 346 def rewind initialize end
# File prime.rb, line 342 def succ @last_prime_index += 1 EratosthenesSieve.instance.get_nth_prime(@last_prime_index) end
This page was generated for Ruby 2.6.4
Ruby-doc.org is provided by James Britt and Neurogami. Hack your world. Feed your head. Live curious.
Generated with Ruby-doc Rdoc Generator 0.44.2.