MTMCSim  0.5
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
MTMCSim::Util Namespace Reference

Functions

string intToStr (int v)
 
string douToStr (double v)
 
bool getIntPara (const paraMap &para, const string &name, int &data)
 get integer parameter from the paremeter map, returns whether the given parameter name is in the map. More...
 
bool getDouPara (const paraMap &para, const string &name, double &data)
 get double parameter from the paremeter map, returns whether the given parameter name is in the map. More...
 
bool getStrPara (const paraMap &para, const string &name, string &data)
 get string parameter from the paremeter map, returns whether the given parameter name is in the map. More...
 
void paraMissingWarning (DispUI &ui, const string &name)
 
void addCompRes (compResMap &compRes, const int value, const string &name)
 add a computed result of int type to the computed result map. More...
 
void addCompRes (compResMap &compRes, const double value, const string &name)
 add a computed result of double type to the computed result map. More...
 
void addCompRes (compResMap &compRes, const string &value, const string &name)
 add a computed result of string type to the computed result map. More...
 
string getFormattedStr (const paraMap &inputPara, const compResMap &compRes, string formatFN)
 Put the parameters and computed results into a formatted string whose format is given by a text file. More...
 
double bEntro (double p)
 Binary Entropy function. More...
 
void getConf (const string &confFN, string &workingDir, string &relative_profileFN, string &tempFN, string &formatFN, int &queueSize, int &nThreads)
 

Function Documentation

void MTMCSim::Util::addCompRes ( compResMap compRes,
const int  value,
const string &  name 
)
inline

add a computed result of int type to the computed result map.

void MTMCSim::Util::addCompRes ( compResMap compRes,
const double  value,
const string &  name 
)
inline

add a computed result of double type to the computed result map.

void MTMCSim::Util::addCompRes ( compResMap compRes,
const string &  value,
const string &  name 
)
inline

add a computed result of string type to the computed result map.

double MTMCSim::Util::bEntro ( double  p)
inline

Binary Entropy function.

Make sure 0<= p <= 1. No check inside the function.

string MTMCSim::Util::douToStr ( double  v)
inline
void MTMCSim::Util::getConf ( const string &  confFN,
string &  workingDir,
string &  relative_profileFN,
string &  tempFN,
string &  formatFN,
int &  queueSize,
int &  nThreads 
)
bool MTMCSim::Util::getDouPara ( const paraMap para,
const string &  name,
double &  data 
)

get double parameter from the paremeter map, returns whether the given parameter name is in the map.

string MTMCSim::Util::getFormattedStr ( const paraMap inputPara,
const compResMap compRes,
string  formatFN 
)

Put the parameters and computed results into a formatted string whose format is given by a text file.

bool MTMCSim::Util::getIntPara ( const paraMap para,
const string &  name,
int &  data 
)

get integer parameter from the paremeter map, returns whether the given parameter name is in the map.

bool MTMCSim::Util::getStrPara ( const paraMap para,
const string &  name,
string &  data 
)

get string parameter from the paremeter map, returns whether the given parameter name is in the map.

string MTMCSim::Util::intToStr ( int  v)
inline
void MTMCSim::Util::paraMissingWarning ( DispUI &  ui,
const string &  name 
)
inline