abstract class Crypto::Prime::PseudoPrimeGenerator
- Crypto::Prime::PseudoPrimeGenerator
- Reference
- Object
Overview
An abstract class for enumerating pseudo-prime numbers.
Concrete subclasses should override succ, next, rewind.
Included Modules
Direct Known Subclasses
- Crypto::Prime::EratosthenesGenerator
- Crypto::Prime::Generator23
- Crypto::Prime::TrialDivisionGenerator
Defined in:
crypto/utils/prime.crConstructors
Instance Method Summary
-
#each(&)
Iterates the given block for each prime number.
-
#next
alias of
#succ
. -
#rewind : self
Rewinds the internal position for enumeration.
-
#size
Returns the number of elements in the collection.
-
#succ : Int::Signed
returns the next pseudo-prime number, and move the internal position forward.
- #upper_bound : Int128 | Int16 | Int32 | Int64 | Int8 | Nil
- #upper_bound=(ubound : Int128 | Int16 | Int32 | Int64 | Int8 | Nil)
Constructor Detail
Instance Method Detail
abstract
def succ : Int::Signed
#
returns the next pseudo-prime number, and move the internal position forward.