Expand description
Implementations and extensions for PrimeBuffer, which represents a container of primes
In num-prime, there is no global instance to store primes, the user has to generate
and store the primes themselves. The trait PrimeBuffer defines a unified interface
for a prime number container. Some methods that can take advantage of pre-generated
primes will be implemented in the PrimeBufferExt trait.
We also provide NaiveBuffer as a simple implementation of PrimeBuffer without any external dependencies. The performance of the NaiveBuffer will not be extremely optimized, but it will be efficient enough for most applications.
Structs§
- Naive
Buffer - NaiveBuffer implements a very simple Sieve of Eratosthenes
Traits§
- Prime
Buffer Ext - Extension functions that can utilize pre-generated primes