Lattice Tester Guide
1.0-9
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
|
The objects of this class are the "prime" factors in the decomposition of a positive integer. More...
#include <latticetester/IntFactor.h>
Public Member Functions | |
IntFactor (const Int &x, int mult=1, PrimeType stat=UNKNOWN) | |
Constructor for a factor \(x\) of multiplicity mult that has a PrimeType stat More... | |
Int | getFactor () const |
Returns the numeric value of this factor. More... | |
void | setFactor (const Int &x) |
Sets the value of this factor to \(x\). More... | |
int | getMultiplicity () const |
Returns the multiplicity of this object. More... | |
void | setMultiplicity (int m) |
Sets the multiplicity of this object to \(m\). More... | |
PrimeType | getStatus () const |
Returns the PrimeType of this object. More... | |
void | setStatus (PrimeType s) |
Sets the PrimeType of this object to \(s\). More... | |
LatticeTester::PrimeType | isPrime (std::int64_t k) |
Tests whether this factor is prime. More... | |
std::string | toString () const |
Returns this object as a string. More... | |
Static Public Member Functions | |
static PrimeType | isPrime (const Int &y, std::int64_t k) |
Tests whether \(y\) is prime. More... | |
static std::string | toString (LatticeTester::PrimeType stat) |
Transforms status stat in an easily readable string and returns it. More... | |
The objects of this class are the "prime" factors in the decomposition of a positive integer.
The class also contains functions to determine whether a number is prime, probably prime or composite. These methods can be used externally to test the primality of an integer, or to test if this factor is prime.
|
inline |
Constructor for a factor \(x\) of multiplicity mult
that has a PrimeType stat
|
inline |
Returns the numeric value of this factor.
|
inline |
Returns the multiplicity of this object.
|
inline |
Returns the PrimeType of this object.
|
static |
Tests whether \(y\) is prime.
First tests whether \(y\) is divisible by all small primes \(p\) ( \(p < 2^{16}\)) that are kept in file prime.dat
. Then applies the Miller-Rabin probability test with \(k\) trials.
PrimeType LatticeTester::IntFactor< Int >::isPrime | ( | std::int64_t | k | ) |
Tests whether this factor is prime.
Similar to isPrime
above.
|
inline |
Sets the value of this factor to \(x\).
|
inline |
Sets the multiplicity of this object to \(m\).
|
inline |
Sets the PrimeType of this object to \(s\).
|
inlinestatic |
Transforms status stat
in an easily readable string and returns it.
std::string LatticeTester::IntFactor< Int >::toString | ( | ) | const |
Returns this object as a string.