|
template<typename T > |
static T | Combinatorics::factorial (T n) |
| Returns the factorial of n . More...
|
|
bool | Combinatorics::flip_coin () |
| Simulate flipping a coin. More...
|
|
template<typename T > |
static void | Combinatorics::permute (std::vector< T > &values, uint64_t pn, size_t sz=(size_t)(-1)) |
| Permute a vector according to the specified permutation number. More...
|
|
template<typename T > |
void | Combinatorics::shuffle (std::vector< T > &vector, size_t nitems=(size_t)(-1), size_t limit=(size_t)(-1), LinearCongruentialGenerator *lcg=NULL) |
| Shuffle the values of a vector. More...
|
|
template<typename T > |
size_t | Combinatorics::damerau_levenshtein_distance (const std::vector< T > &src, const std::vector< T > &tgt) |
| Damerau-Levenshtein edit distance. More...
|
|
template<typename T > |
size_t | Combinatorics::levenshtein_distance (const std::vector< T > &src, const std::vector< T > &tgt) |
| Levenshtein edit distance. More...
|
|
|
std::vector< uint8_t > | Combinatorics::sha1_digest (const uint8_t *data, size_t size) |
| Compute a SHA1 digest. More...
|
|
std::vector< uint8_t > | Combinatorics::sha1_digest (const std::vector< uint8_t > &data) |
| Compute a SHA1 digest. More...
|
|
std::vector< uint8_t > | Combinatorics::sha1_digest (const std::string &data) |
| Compute a SHA1 digest. More...
|
|
|
uint64_t | Combinatorics::fnv1a64_digest (const uint8_t *data, size_t size) |
| Compute the Fowler–Noll–Vo fast string hash. More...
|
|
uint64_t | Combinatorics::fnv1a64_digest (const std::vector< uint8_t > &data) |
| Compute the Fowler–Noll–Vo fast string hash. More...
|
|
uint64_t | Combinatorics::fnv1a64_digest (const std::string &data) |
| Compute the Fowler–Noll–Vo fast string hash. More...
|
|
|
std::string | Combinatorics::digest_to_string (const uint8_t *data, size_t size) |
| Converts a binary digest to a string of hexadecimal characters. More...
|
|
std::string | Combinatorics::digest_to_string (const std::vector< uint8_t > &digest) |
| Converts a binary digest to a string of hexadecimal characters. More...
|
|
std::string | Combinatorics::digest_to_string (const std::string &data) |
| Converts a binary digest to a string of hexadecimal characters. More...
|
|