Mungojerrie
1.0
Mungojerrie
|
Namespace of utilities. More...
Classes | |
class | BddCompare |
Class that defines a comparison operator for the BDD class. More... | |
class | PairHash |
Class that defines a hash function for pairs. More... | |
class | PairWithBddCompare |
Class that defines a comparison operator for pairs with BDDs. More... | |
Typedefs | |
using | RandomEngine = std::mt19937 |
Functions | |
void | replace (string &str, string const &from, string const &to) |
void | replaceAll (string &str, string const &from, string const &to) |
char ** | cStringArrayAlloc (vector< string > const &sv) |
void | cStringArrayFree (char **sa, size_t n) |
Dispose of an array of C strings. | |
RandomEngine & | urng () |
Returns reference to uniform random number generator. | |
void | seed_urng () |
Seeds the uniform random number generator. | |
void | seed_urng (unsigned seed) |
Seeds the uniform random number generator. | |
unsigned int | get_urng_seed () |
Return the seed for the uniform random number generator. | |
int | sample_discrete_distribution (vector< double > const &weights) |
chrono::time_point< chrono::system_clock > | stopwatch () |
Records a reference time. | |
void | printElapsedTag (ostream &os) |
double | getElapsedTime () |
Returns the elapsed time in seconds. | |
const char * | to_decimal (int number) |
Converts an int to an array of characters in base 10. | |
bool | is_prefix (string const &str, string const &pre) |
void | replace (std::string &str, std::string const &from, std::string const &to) |
Replace first occurrence of "from" in "str" with "to.". | |
void | replaceAll (std::string &str, std::string const &from, std::string const &to) |
Replace all occurrences of "from" in "str" with "to.". | |
char ** | cStringArrayAlloc (std::vector< std::string > const &sv) |
Copy a vector of C++ strings to an array of C strings. | |
template<typename T > | |
std::string | to_string (T const &num) |
Replacement for std::to_string since cygwin does not have it. | |
template<typename T , typename Comp > | |
std::vector< std::set< T, Comp > > | mapToPartition (std::map< T, unsigned, Comp > const &m) |
Converts a partition map to a vector of sets. | |
template<typename Iterator > | |
std::iterator_traits< Iterator >::value_type | sample_discrete_distribution (Iterator first, Iterator last) |
Returns a sample from the discrete distribution defined by the iterators. | |
int | sample_discrete_distribution (std::vector< double > const &weights) |
Returns a sample from discrete distribution defined by weights. | |
template<typename IntType > | |
IntType | sample_uniform_distribution (IntType low, IntType hi) |
Returns a sample from a uniform integer distribution. | |
void | printElapsedTag (std::ostream &os=std::cout) |
Prints tag with elapsed time in seconds. | |
bool | is_prefix (std::string const &str, std::string const &pre) |
Returns true if pre is a prefix of str. | |
Namespace of utilities.