Class Prime::TrialDivision
In: lib/backports/1.9.1/stdlib/prime.rb
Parent: Object

Internal use. An implementation of prime table by trial division method.

Methods

[]   cache   primes   primes_so_far  

Included Modules

Singleton

Public Instance methods

Returns the +index+th prime number.

index is a 0-based index.

Returns the cached prime numbers.

primes()

Alias for cache

primes_so_far()

Alias for cache

[Validate]