(C++) PrimeExpert

January 25, 2018 · View on GitHub

 

 

 

 

 

(C++) PrimeExpert

 

STLQt
CreatorLubuntu

 

PrimeExpert is a class with only one important member function called IsPrime, which calculates whether a number is prime.

 

PrimeExpert is a trade-off between the speed of determining whether a number is prime (for multiple times) and memory consumption: to determine whether a number is prime quicker, PrimeExpert maintains a std::vector of known primes (but of known primes only).

 

PrimeExpert can be tested using the tool TestPrimeExpert.

 

 

 

 

 

Technical facts

 

 

 

 

 

 

primeexpert.h

 


 

 

 

 

 

primeexpert.cpp