An implementation of PseudoPrimeGenerator
which uses a prime table generated by trial division.
# File lib/prime.rb, line 327 def initialize @index = -1 super end
# File lib/prime.rb, line 335 def rewind initialize end
# File lib/prime.rb, line 332 def succ TrialDivision.instance[@index += 1] end
Ruby Core © 1993–2016 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.