Quantum++
v0.6
C++11 quantum computing library
|
Number theory functions. More...
Go to the source code of this file.
Namespaces | |
qpp | |
Quantum++ main namespace. | |
Functions | |
std::vector< int > | qpp::x2contfrac (double x, idx n, idx cut=1e5) |
Simple continued fraction expansion. More... | |
double | qpp::contfrac2x (const std::vector< int > &cf, idx n) |
Real representation of a simple continued fraction. More... | |
double | qpp::contfrac2x (const std::vector< int > &cf) |
Real representation of a simple continued fraction. More... | |
unsigned long long int | qpp::gcd (unsigned long long int m, unsigned long long int n) |
Greatest common divisor of two non-negative integers. More... | |
unsigned long long int | qpp::gcd (const std::vector< unsigned long long int > &ns) |
Greatest common divisor of a list of non-negative integers. More... | |
unsigned long long int | qpp::lcm (unsigned long long int m, unsigned long long int n) |
Least common multiple of two positive integers. More... | |
unsigned long long int | qpp::lcm (const std::vector< unsigned long long int > &ns) |
Least common multiple of a list of positive integers. More... | |
std::vector< idx > | qpp::invperm (const std::vector< idx > &perm) |
Inverse permutation. More... | |
std::vector< idx > | qpp::compperm (const std::vector< idx > &perm, const std::vector< idx > &sigma) |
Compose permutations. More... | |
std::vector< unsigned long long int > | qpp::factors (unsigned long long int n) |
Prime factor decomposition. More... | |
bool | qpp::isprime (unsigned long long int n) |
Primality test. More... | |
Number theory functions.