MOOSE - Multiscale Object Oriented Simulation Environment
|
Go to the source code of this file.
Namespaces | |
moose | |
Functions | |
int | checkPath (const string &path) |
Checks if given path is correct. If not, return false and error-code as well. More... | |
int | moose::checkPath (const string &path) |
Checks if given path is correct. If not, return false and error-code as well. More... | |
string | moose::createMOOSEPath (const string &path) |
Create a POSIX compatible path from a given string. Remove/replace bad characters. More... | |
bool | moose::createParentDirs (const string &path) |
Create directories recursively needed to open the given file p. More... | |
string | dumpStats (int) |
string | fixPath (string path) |
Fix a path. For testing purpose. More... | |
string | moose::fixPath (string path) |
Fix a path. For testing purpose. More... | |
string | moose::getExtension (const string &path, bool without_dot=true) |
Get the extension of a given filepath. More... | |
int | moose::getGlobalSeed () |
string | joinPath (string pathA, string pathB) |
Append pathB to pathA and return the result. More... | |
string | moose::joinPath (string pathA, string pathB) |
Append pathB to pathA and return the result. More... | |
string | moose::moosePathToUserPath (string path) |
When user gives a path /a/b/c, moose creates a path /a[0]/b[0]/c[0]. This is helpful in cases where one needs to create more than 1 element. More... | |
double | moose::mtrand (void) |
Generate a random double between 0 and 1. More... | |
void | moose::mtseed (unsigned int x) |
Set the global seed or all rngs. More... | |
string | moose::pathToName (const string &path) |
Return the name when path is given. Its behaviour is exactly the same as of basename command on unix system. More... | |
void | moose::setGlobalSeed (int seed) |
string | moose::toFilename (const string &path) |
Replace all directory sepearator with _. This creates a filepath which can be created in current directory without any need to create parent directory. More... | |
string | moose::toString (double x) |
Convert a given value to string. More... | |
Variables | |
unsigned long | moose::__rng_seed__ = 0 |
A global seed for all RNGs in moose. When moose.seed( x ) is called, this variable is set. Other's RNGs (except muparser) uses this seed to initialize them. By default it is initialized by random_device (see global.cpp). More... | |
stringstream | errorSS |
Global stringstream for message printing. More... | |
bool | isRNGInitialized = false |
moose::RNG< double > | moose::rng |
clock_t | simClock = clock() |
unsigned int | totalTests = 0 |
Keep tracks of how many tests have been executed in moose. More... | |
int checkPath | ( | const string & | path | ) |
Checks if given path is correct. If not, return false and error-code as well.
path | Path name. |
Definition at line 50 of file global.cpp.
References BAD_CHARACTER_IN_PATH, EMPTY_PATH, and MISSING_BRACKET_AT_END.
Referenced by moose::fixPath().
string dumpStats | ( | int | ) |
string fixPath | ( | string | path | ) |
Fix a path. For testing purpose.
path | Path as string. |
Definition at line 74 of file global.cpp.
References moose::checkPath(), MISSING_BRACKET_AT_END, and path.
Referenced by HSolveUtils::gates(), and moose::joinPath().
string joinPath | ( | string | pathA, |
string | pathB | ||
) |
Append pathB to pathA and return the result.
If pathA does not have [indexs] at the end, append "[0]" to pathA and then add pathB to it. This version does not care if the result has '[0]' at its end.
pathA | First path. |
pathB | Second path. |
Definition at line 66 of file global.cpp.
References moose::fixPath().
stringstream errorSS |
Global stringstream for message printing.
Definition at line 32 of file global.cpp.
Referenced by HSolveUtils::gates().
bool isRNGInitialized = false |
Definition at line 34 of file global.cpp.
Referenced by moose::mtseed().
clock_t simClock = clock() |
Definition at line 36 of file global.cpp.
unsigned int totalTests = 0 |
Keep tracks of how many tests have been executed in moose.
Definition at line 30 of file global.cpp.