#include <prime_tables.h>
Definition at line 80 of file prime_tables.h.
◆ PreCalculatedPrimeTable()
| PreCalculatedPrimeTable::PreCalculatedPrimeTable |
( |
int |
max | ) |
|
|
inlineexplicit |
Definition at line 83 of file prime_tables.h.
84 : is_prime_size_(max + 1), is_prime_(
new bool[max + 1]) {
85 CalculatePrimesUpTo(max);
◆ ~PreCalculatedPrimeTable()
| virtual PreCalculatedPrimeTable::~PreCalculatedPrimeTable |
( |
| ) |
|
|
inlinevirtual |
◆ GetNextPrime()
| virtual int PreCalculatedPrimeTable::GetNextPrime |
( |
int |
p | ) |
const |
|
inlinevirtual |
Implements PrimeTable.
Definition at line 93 of file prime_tables.h.
94 for (
int n = p + 1; n < is_prime_size_; n++) {
95 if (is_prime_[n])
return n;
◆ IsPrime()
| virtual bool PreCalculatedPrimeTable::IsPrime |
( |
int |
n | ) |
const |
|
inlinevirtual |
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/external/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h