Leonardus
Loading...
Searching...
No Matches
Namespaces | Functions
algo.h File Reference

Algorithms. More...

#include <utility>
#include <tuple>
#include <string>
#include <cstdint>
#include <gmp.h>
+ Include dependency graph for algo.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  algo
 Collection of numeric algorithms.
 

Functions

std::tuple< __int128, __int128, __int128 > algo::xgcd (__int128 p_a, __int128 p_b)
 Extended Euclidean algorithm.
 
bool algo::isint128 (const std::string &p_str)
 Is the string a 128 bit integer.
 
bool algo::isint128 (const mpz_t p_x)
 Is the multiple precision integer a 128 bit integer.
 
bool algo::hasFloatSyntax (const std::string &p_str)
 Checks, if the string has the syntax of a float.
 
bool algo::hasRationalSyntax (const std::string &p_str)
 Checks, if the string has the syntax of a rational number.
 
bool algo::isSquareFree (__int128 p_n)
 Checks if an integer is square free.
 
std::pair< int32_t, uint32_t > algo::rand (uint32_t p_seed)
 ISO C rand_r() for 32 bit.
 
__int128 algo::mmod (__int128 p_d, __int128 p_m)
 Mathematical modulus.
 

Detailed Description

Algorithms.