Classes | |
| class | ndim |
| class | tjarray< V, T > |
| class | Embed< T, E > |
| class | ProgressDisplayDriver |
| class | ProgressMeter |
| class | ProgressDisplayConsole |
| class | HandlerComponent |
| class | Handler< I > |
| class | Handled< I > |
| class | SingletonBase |
| class | SingletonHandler< T, thread_safe > |
| class | Index |
| struct | UniqueIndexMap |
| class | UniqueIndexBase |
| class | UniqueIndex< T > |
| class | Labeled |
| class | ListComponent |
| class | ListItemAbstract |
| class | ListAbstract |
| class | ListItem< I > |
| class | List< I, P, R > |
| struct | LogMessage |
| class | LogBase |
| class | Log< C > |
| struct | LogOneLine |
| class | RandomDist |
| class | MinimizationFunction |
| class | DownhillSimplex |
| class | ProcessComponent |
| class | Process |
| class | Profiler |
| class | StateComponent |
| class | State< T > |
| struct | DirectTransition< T > |
| class | StateMachine< T > |
| class | Static |
| struct | StaticAlloc< T > |
| class | StaticHandler< T > |
| class | StringComp |
| class | UnitTest |
| class | ThreadComponent |
| class | Mutex |
| class | MutexLock |
| class | LockProxy< T > |
| class | MutexManaged< T > |
| class | Thread |
| class | TypeTraits |
| class | ValList< T > |
| class | VectorComp |
| class | tjvector< T > |
| struct | svector |
Defines | |
| #define | MAX_COMPONENT_SIZE 10 |
| #define | MAX_LOG_STRINGSIZE 25 |
| #define | RELEASE_LOG_LEVEL infoLog |
| #define | ODINLOG(logobj, level) |
| #define | _DEFAULT_DIGITS_ 5 |
| #define | _DEFAULT_LINEWIDTH_ 74 |
| #define | SEPARATOR_STR "/" |
| #define | SEPARATOR_CHAR '/' |
| #define | PII 3.14159265358979323846264338327950288 |
| #define | ODIN_MAXCHAR 256 |
| #define | LONGEST_INT long long |
| #define | STAT stat64 |
| #define | OPEN open64 |
| #define | FOPEN fopen64 |
| #define | FSEEK fseeko64 |
| #define | FTELL ftello64 |
| #define | MMAP mmap64 |
Typedefs | |
| typedef tjarray< fvector, float > | farray |
| typedef tjarray< dvector, double > | darray |
| typedef tjarray< ivector, int > | iarray |
| typedef tjarray< cvector, STD_complex > | carray |
| typedef tjarray< svector, STD_string > | sarray |
|
typedef STD_map< STD_string, SingletonBase * > | SingletonMap |
| typedef void(*) | tracefunction (const LogMessage &msg) |
| typedef logPriority(*) | log_component_fptr (logPriority) |
| typedef char | s8bit |
| typedef unsigned char | u8bit |
| typedef short | s16bit |
| typedef unsigned short | u16bit |
| typedef int | s32bit |
| typedef unsigned int | u32bit |
| typedef tjvector< float > | fvector |
| typedef tjvector< double > | dvector |
| typedef tjvector< int > | ivector |
| typedef tjvector< STD_complex > | cvector |
Enumerations | |
| enum | logPriority |
| enum | whichOccurences |
| enum | expFormat |
| enum | fopenMode |
Functions | |
| STD_string | print_table (const sarray &table) |
| sarray | parse_table (const STD_string &str) |
| STD_string | ctos (const STD_complex &z) |
| STD_complex | stoc (const STD_string &s) |
| STD_complex | float2real (float a) |
| STD_complex | float2imag (float b) |
| float | creal (STD_complex c) |
| float | cimag (STD_complex c) |
| float | cabs (STD_complex c) |
| float | phase (STD_complex c) |
| STD_complex | logc (STD_complex c) |
| STD_complex | expc (STD_complex c) |
| bool | operator< (const STD_complex &c1, const STD_complex &c2) |
| bool | operator> (const STD_complex &c1, const STD_complex &c2) |
| void | default_tracefunction (const LogMessage &msg) |
| int | solve_cubic (double a, double b, double c, double *x0, double *x1, double *x2) |
| STD_string | replaceStr (const STD_string s, const STD_string &searchstring, const STD_string &replacement, whichOccurences mode=allOccurences) |
| STD_string | extract (const STD_string s, const STD_string &blockbegin, const STD_string &blockend, bool hierachical=false, int beginpos=0) |
| STD_string | rmblock (const STD_string s, const STD_string &blockbegin, const STD_string &blockend, bool rmbegin=true, bool rmend=true, bool rmall=true, bool hierachical=false) |
| STD_string | toupperstr (const STD_string s) |
| STD_string | tolowerstr (const STD_string s) |
| STD_string | ftos (float f, unsigned int digits=_DEFAULT_DIGITS_, expFormat eformat=autoExp) |
| STD_string | itos (int i, unsigned int mindigits=0) |
| STD_string | ptos (const void *p) |
| STD_string | n_times (const STD_string &s, unsigned int n) |
| STD_string | justificate (const STD_string &s, unsigned int indention=0, bool ignore_firstline=false, unsigned int linewidth=_DEFAULT_LINEWIDTH_) |
| int | textbegin (const STD_string &s, int startpos=0, const char custom_separator=0) |
| int | sepbegin (const STD_string &s, int startpos=0, const char custom_separator=0) |
| STD_string | shrink (const STD_string &s) |
| int | noccur (const STD_string &s, const STD_string &searchstring) |
| STD_string | dos2unix (const STD_string &s) |
| int | load (STD_string &str, const STD_string &filename) |
| int | write (const STD_string &str, const STD_string &filename, fopenMode mode=overwriteMode) |
| double | norm (double x, double y) |
| double | norm3 (double x, double y, double z) |
| double | maxof3 (double f1, double f2, double f3) |
| const char * | modestring (fopenMode mode) |
| LONGEST_INT | filesize (const char *filename) |
| const char * | getpwd () |
| int | chpwd (const char *dirname) |
| int | createdir (const char *dirname) |
| bool | checkdir (const char *dirname) |
| int | movefile (const char *src, const char *dst) |
| int | copyfile (const char *src, const char *dst) |
| int | rmfile (const char *fname) |
| int | chperm (const char *fname, int perm) |
| void * | filemap (const STD_string &filename, LONGEST_INT nbytes, LONGEST_INT offset, bool readonly, int &fd) |
| void | fileunmap (int fd, void *start, LONGEST_INT nbytes, LONGEST_INT offset) |
| STD_string | tempfile () |
| const char * | lasterr () |
| void | sleep_ms (int ms) |
| double | current_time_s () |
| double | secureDivision (double numerator, double denominator) |
| const char * | secure_getenv (const char *variable_name) |
| bool | little_endian_byte_order () |
| int | getCommandlineOption (int argc, char *argv[], const char *option, char *returnvalue, int maxchar, bool modify=true) |
| int | isCommandlineOption (int argc, char *argv[], const char *option, bool modify=true) |
| int | getLastArgument (int argc, char *argv[], char *returnvalue, int maxchar, bool modify=true) |
| int | hasHelpOption (int argc, char *argv[]) |
| fvector | real (const cvector &cv) |
| fvector | imag (const cvector &cv) |
| fvector | amplitude (const cvector &cv) |
| fvector | phase (const cvector &cv) |
| cvector | real2complex (const fvector &fv) |
| dvector | fvector2dvector (const fvector &fv) |
| fvector | dvector2fvector (const dvector &dv) |
| svector | tokens (const STD_string &tokenstring, char custom_separator=0, char escape_begin='"', char escape_end='"') |
| STD_string | tokenstring (const svector &tokens, unsigned int linewidth=_DEFAULT_LINEWIDTH_) |
| svector | browse_dir (const STD_string &dirname, bool only_dirs=false, bool discard_dotfiles=false) |
A vector of complex numbers
Definition at line 462 of file tjvector.h.
A vector of double precision floating point numbers
Definition at line 451 of file tjvector.h.
A vector of floating point numbers
Definition at line 446 of file tjvector.h.
A vector of integer numbers
Definition at line 456 of file tjvector.h.
| typedef void(*) tracefunction(const LogMessage &msg) |
| enum expFormat |
Enum to flag exponential printing of floating point numbers:
Definition at line 118 of file tjstring.h.
| enum fopenMode |
| enum logPriority |
| enum whichOccurences |
Enum to flag replacement policy:
Definition at line 60 of file tjstring.h.
| svector browse_dir | ( | const STD_string & | dirname, | |
| bool | only_dirs = false, |
|||
| bool | discard_dotfiles = false | |||
| ) |
Returns all entries in the given directory, if 'only_dirs' is 'true' only subdirectories will be reported. Files starting with a dot are discarded when setting 'discard_dotfiles' to 'true'.
| bool checkdir | ( | const char * | dirname | ) |
Returns true if directory 'dirname exists', otherwise false
| int chperm | ( | const char * | fname, | |
| int | perm | |||
| ) |
Changes permissions of file 'fname' to 'perm'. On success, zero is returned. On error, -1 is returned.
| int chpwd | ( | const char * | dirname | ) |
Changes the current directory of the process to dirname. On success, zero is returned. On error, -1 is returned.
| int copyfile | ( | const char * | src, | |
| const char * | dst | |||
| ) |
Copies a file 'src' to destination 'dst'. On success, zero is returned. On error, -1 is returned.
| int createdir | ( | const char * | dirname | ) |
Creates the given directory. On success, zero is returned. On error, -1 is returned.
| STD_string ctos | ( | const STD_complex & | z | ) |
Returns the complex number 'z' as a formatted string
| double current_time_s | ( | ) |
Returns the current time in s
| void default_tracefunction | ( | const LogMessage & | msg | ) |
Default trace function
| STD_string dos2unix | ( | const STD_string & | s | ) |
Replaces all '0d0a' sequences by '0a' in the string
| STD_string extract | ( | const STD_string | s, | |
| const STD_string & | blockbegin, | |||
| const STD_string & | blockend, | |||
| bool | hierachical = false, |
|||
| int | beginpos = 0 | |||
| ) |
returns a block of characters within s that is enclosed by 'blockbegin' and 'blockend'; the delimiters itself are not returned; If hierachical is true the nesting is considered, e.g. extract("(a(b)c)", "(", ")", true) will return "a(b)c" and not "a(b" ; beginpos is the position to start searching; If 'blockbegin' is a zero-length string, extraction will start at the beginning of the string; If 'blockend' is a zero-length string, extraction will stop at the end of the string;
| void* filemap | ( | const STD_string & | filename, | |
| LONGEST_INT | nbytes, | |||
| LONGEST_INT | offset, | |||
| bool | readonly, | |||
| int & | fd | |||
| ) |
Creates a file mapping of file 'filename' with 'nbytes' length starting at 'offset' bytes into the file, optionally in 'readonly' mode. The 'fd' will hold the file descriptor (handle) of the mapped file. Returns a pointer to the mapped memory region.
| LONGEST_INT filesize | ( | const char * | filename | ) |
Returns file size in bytes if file exists, otherwise -1
| void fileunmap | ( | int | fd, | |
| void * | start, | |||
| LONGEST_INT | nbytes, | |||
| LONGEST_INT | offset | |||
| ) |
Deletes a file mapping of file descriptor 'fd' which maps a region at memory location 'start' of 'nbytes' length starting at 'offset' bytes into the file.
| STD_string ftos | ( | float | f, | |
| unsigned int | digits = _DEFAULT_DIGITS_, |
|||
| expFormat | eformat = autoExp | |||
| ) |
returns a string that contains the formatted floating point number 'f' with precision 'digits' and exponential usage 'eformat'
| int getCommandlineOption | ( | int | argc, | |
| char * | argv[], | |||
| const char * | option, | |||
| char * | returnvalue, | |||
| int | maxchar, | |||
| bool | modify = true | |||
| ) |
Copies maximum of 'maxchar' characters from the argv[] which follows an argv[] that matches 'option' into 'returnvalue'; returns TRUE if successful; 'maxchar' should NOT be greater than the number of bytes allocated for 'returnvalue' even if the number of chars in argv[] is smaller. If 'modify' is true, remove argument from the list.
| int getLastArgument | ( | int | argc, | |
| char * | argv[], | |||
| char * | returnvalue, | |||
| int | maxchar, | |||
| bool | modify = true | |||
| ) |
Copies maximum of 'maxchar' characters from the last argv[] that DOESN'T start with '-' into 'returnvalue'; returns TRUE if successful; 'maxchar' should NOT be greater than the number of bytes allocated for 'returnvalue' even if the number of chars in argv[] is smaller
| const char* getpwd | ( | ) |
Returns the current directory of the process
| int hasHelpOption | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Returns whether one of the options '-h, -help, --help' was given
| int isCommandlineOption | ( | int | argc, | |
| char * | argv[], | |||
| const char * | option, | |||
| bool | modify = true | |||
| ) |
Returns TRUE if 'option' is found in argv[] If 'modify' is true, remove argument from the list.
| STD_string itos | ( | int | i, | |
| unsigned int | mindigits = 0 | |||
| ) |
returns a string that contains the formatted integer 'i'. String has at least 'mindigits' (possibly zero-padded) digits.
| STD_string justificate | ( | const STD_string & | s, | |
| unsigned int | indention = 0, |
|||
| bool | ignore_firstline = false, |
|||
| unsigned int | linewidth = _DEFAULT_LINEWIDTH_ | |||
| ) |
returns a justification of s with the specified indention and linewidth
| const char* lasterr | ( | ) |
Returns the last system error as a string
| bool little_endian_byte_order | ( | ) |
Returns true if the current platform has little endian byte order, otherwise false
| int load | ( | STD_string & | str, | |
| const STD_string & | filename | |||
| ) |
Loads 'str' from the ASCII-file 'filename'. Returns 0 on success, -1 otherwise.
| double maxof3 | ( | double | f1, | |
| double | f2, | |||
| double | f3 | |||
| ) |
Maximum value of 3 numbers
| const char* modestring | ( | fopenMode | mode | ) |
Returns mode string suitable for fopen according to 'mode'
| int movefile | ( | const char * | src, | |
| const char * | dst | |||
| ) |
Moves a file 'src' to destination 'dst'. On success, zero is returned. On error, -1 is returned.
| STD_string n_times | ( | const STD_string & | s, | |
| unsigned int | n | |||
| ) |
Returns n times s, e.g. n_times("3",3) ---> "333"
| int noccur | ( | const STD_string & | s, | |
| const STD_string & | searchstring | |||
| ) |
searches for number of occurences of 'searchstring' in s, returns number of matches otherwise 0
| double norm | ( | double | x, | |
| double | y | |||
| ) |
Norm of a double vector
| double norm3 | ( | double | x, | |
| double | y, | |||
| double | z | |||
| ) |
Norm of a triple vector
| bool operator< | ( | const STD_complex & | c1, | |
| const STD_complex & | c2 | |||
| ) | [inline] |
Comparison operator for the norm of the complex numbers c1 and c2
Definition at line 60 of file tjcomplex.h.
| bool operator> | ( | const STD_complex & | c1, | |
| const STD_complex & | c2 | |||
| ) | [inline] |
Comparison operator for the norm of the complex numbers c1 and c2
Definition at line 65 of file tjcomplex.h.
| sarray parse_table | ( | const STD_string & | str | ) |
Parses the string 'str' as a table and returns result as a 2-dim array (rows x cols).
| STD_string print_table | ( | const sarray & | table | ) |
Prints the 2-dimensional array 'table' (rows x cols) with the column widths adjusted to the maximum width (string length) in each column.
| STD_string ptos | ( | const void * | p | ) |
returns a string that contains the address of pointer 'p'
| STD_string replaceStr | ( | const STD_string | s, | |
| const STD_string & | searchstring, | |||
| const STD_string & | replacement, | |||
| whichOccurences | mode = allOccurences | |||
| ) |
Returns a string where occurences of 'searchstring' are replaced by 'replacement' in s. The 'mode' parameter determines whether only the first or all occurences should be replaced.
| STD_string rmblock | ( | const STD_string | s, | |
| const STD_string & | blockbegin, | |||
| const STD_string & | blockend, | |||
| bool | rmbegin = true, |
|||
| bool | rmend = true, |
|||
| bool | rmall = true, |
|||
| bool | hierachical = false | |||
| ) |
Returns s whereby a block of characters that is enclosed by 'blockbegin' and 'blockend' is removed; the flags rmbegin/rmend specify whether the delimiters itself should be removed; If 'hierachical' is true the nesting is considered, e.g. extract("(",")",true) applied to "(a(b)c)" will return "a(b)c" and not "a(b"
| int rmfile | ( | const char * | fname | ) |
Removes the file or directory 'fname'. On success, zero is returned. On error, -1 is returned.
| const char* secure_getenv | ( | const char * | variable_name | ) |
Same as getenv, but does return "" instead of 0 if variable is not found
| double secureDivision | ( | double | numerator, | |
| double | denominator | |||
| ) |
If denominator is zero the functions returns 0, otherwise numerator/denominator
| int sepbegin | ( | const STD_string & | s, | |
| int | startpos = 0, |
|||
| const char | custom_separator = 0 | |||
| ) |
Gives the position of the first speparator character in s. Search starts at 'startpos'. Blanks, tabs and newlines or 'custom_separator' if non-zero are considered as separators.
| STD_string shrink | ( | const STD_string & | s | ) |
Remove all blanks, tabs and newlines from the string s
| void sleep_ms | ( | int | ms | ) |
Halt process/thread for 'ms' miliseconds.
| int solve_cubic | ( | double | a, | |
| double | b, | |||
| double | c, | |||
| double * | x0, | |||
| double * | x1, | |||
| double * | x2 | |||
| ) |
Solve cubic equation x^3 + a x^2 + b x + c = 0 , copied from the GSL-lib
| STD_complex stoc | ( | const STD_string & | s | ) |
Parses an returns string 's' as complex number
| STD_string tempfile | ( | ) |
Return a unique name for a temporary file.
| int textbegin | ( | const STD_string & | s, | |
| int | startpos = 0, |
|||
| const char | custom_separator = 0 | |||
| ) |
Gives the position of the first non-speparator character in s. Search starts at 'startpos'. Blanks, tabs and newlines or 'custom_separator' if non-zero are considered as separators.
| svector tokens | ( | const STD_string & | tokenstring, | |
| char | custom_separator = 0, |
|||
| char | escape_begin = '"', |
|||
| char | escape_end = '"' | |||
| ) |
Splits the string into tokens, which are substrings separated by blanks, tabs and newlines or custom_separator (if custom_separator!=0) and returns them as a vector of strings. Parts of the string enclosed by 'escape_begin' and 'escape_end' will not be decomposed into tokens.
| STD_string tokenstring | ( | const svector & | tokens, | |
| unsigned int | linewidth = _DEFAULT_LINEWIDTH_ | |||
| ) |
Produces a string with linebreaks if width exceeds 'linewidth' from a vector of single strings. A 'linewidth' of zero will produce no linebreaks.
| STD_string tolowerstr | ( | const STD_string | s | ) |
returns s, but with all uppercase characters transformed to lowercase
| STD_string toupperstr | ( | const STD_string | s | ) |
returns s, but with all lowercase characters transformed to uppercase
| int write | ( | const STD_string & | str, | |
| const STD_string & | filename, | |||
| fopenMode | mode = overwriteMode | |||
| ) |
Writes 'str' to the ASCII-file 'filename', the 'mode' determines whether data will be appended/overwritten if the file already exists. Returns 0 on success, -1 otherwise.
1.5.1