permlib
0.2.6
Library for permutation computations
|
helper class for primality checks More...
#include <prime_helper.h>
Static Public Member Functions | |
static bool | isPrimeNumber (unsigned int x, bool checkBounds) |
checks if a given number is prime | |
static const unsigned int * | firstPrime () |
iterator pointing to the first prime in list | |
static const unsigned int * | lastPrime () |
iterator pointing after the last prime in list | |
Static Public Attributes | |
static const unsigned int | largestNumberForPrimalityCheck = largestPrime * largestPrime |
The number up to which this simple primality check is always correct. |
helper class for primality checks
static bool permlib::PrimeHelper::isPrimeNumber | ( | unsigned int | x, |
bool | checkBounds | ||
) | [inline, static] |
checks if a given number is prime
x | number to be checked |
checkBounds | if true, an assertion failure is triggered if x is too large (larger than permlib::largestNumberForPrimalityCheck) |