|
Namespaces |
| namespace | Util |
Defines |
| #define | foreach(i, v) for(typeof(v.begin()) i=v.begin(); i!=v.end(); i++) |
| #define | foreachr(i, v) for(typeof(v.rbegin()) i=v.rbegin(); i!=v.rend(); i++) |
Functions |
| template<class ValueType> |
| ValueType | Util::maxval (ValueType v1, ValueType v2) |
| template<class ValueType> |
| ValueType | Util::minval (ValueType v1, ValueType v2) |
| string | Util::StringF (const char *const format,...) |
| void | Util::removeEmptyStrings (vector< string > &s) |
| string | Util::Clean (string s) |
| void | Util::clean (string &s) |
| void | Util::clean (vector< string > &sa) |
| string | Util::chomp (const string &s) |
| string | Util::squeeze (const string &s, char tosearch) |
| string | Util::replace (const string &s, char tosearch, char toreplace) |
| string | Util::uppercase (const string &s) |
| string | Util::toupper (const string &s) |
| string | Util::lowercase (const string &s) |
| string | Util::tolower (const string &s) |
| vector< string > | Util::tokenize (const string &s, const string &delim, bool squeeze_delim) |
| string | Util::trim (string in) |
| string | Util::Trim (string in) |
| template<class ReturnType, class ValueType> |
| ReturnType | Util::cast (const ValueType &in_value) |
| template<class T> |
| bool | Util::getnext (char **nav, T &val) |
| template<class T> |
| bool | Util::getnext (vector< string >::iterator &nav, vector< string >::iterator &end, T &val) |
| template<class C> |
| string | Util::tostring (C &container) |
| bool | Util::readPipe (vector< string > &dest, string command) |
| string | Util::runCommand (string command) |
| string | Util::CheckDir (const string &folder) |
| const char * | Util::basename (const char *filename) |
| template<class ReturnType> |
| ReturnType | Util::get (istream &is) |
| template<class T> |
| void | Util::readfile (vector< T > &dst, string filename) |
| void | Util::outProgress (int progress, int period, ostream &out) |
| void | Util::OutProgress (int progress, int period, ostream &out) |
| void | Util::endProgress (int end, ostream &out) |
| void | Util::EndProgress (int end, ostream &out) |
| void | Util::outProgressPercentage (int progress, int end, ostream &out) |
| void | Util::endProgressPercentage (ostream &out) |
| istream & | Util::readTag (istream &is, const char *tag) |
| ostream & | Util::writeTag (ostream &os, const char *tag) |
| template<class ValueType> |
| istream & | Util::readOption (istream &is, const char *tag, ValueType &value) |
| template<class ValueType> |
| istream & | Util::readOptionArray (istream &is, const char *tag, ValueType *values, int size) |
| template<class ValueType> |
| ostream & | Util::writeOption (ostream &os, const char *tag, ValueType &value) |
| template<class ValueType> |
| ostream & | Util::writeOptionArray (ostream &os, const char *tag, ValueType *values, int size) |
| template<class T> |
| T | Util::square (T x) |
| void | Util::initrand () |
| int | Util::irand (int min, int max) |
| double | Util::urand (double min, double max) |
| double | Util::grand (double mean, double std) |
| double | Util::square (double v) |
| bool | Util::firstCombination (vector< uint > &counters, uint n, uint k) |
| bool | Util::nextCombination (vector< uint > &counters, uint n, uint k) |
| void | Util::printCombination (vector< uint > &counters, uint n, uint k) |
| float | Util::tofloat (short v) |
| short | Util::tofixed (float v) |