ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Combinatorics.h File Reference
#include "LinearCongruentialGenerator.h"
#include <algorithm>
#include <cassert>
#include <list>
#include <stdint.h>
#include <string>
#include <vector>
Include dependency graph for Combinatorics.h:

Go to the source code of this file.

Classes

struct  Combinatorics::DL_Stack< T >
 

Namespaces

 Combinatorics
 

Constant Groups

 Combinatorics
 

Functions

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...