prf_utils Namespace Reference

The namespace containing auxiliary useful classes used inside PROFASI. More...


class  AdaptiveHis
 A histogram that can adjust its own range according to the data. More...
class  His1D
class  His2D
 A histogram with 2 independent variables. More...
class  Permutation
 Permutation class originally developed by SM for ALFS. More...
class  ProgOpt
 One option that a program may handle. More...
class  ProgArgs
 A utility to help parse command line arguments. More...
class  CorrelationEvaluator
class  MeanFinder
 Simple utility to find the mean of a vector. More...
class  StatBox
class  RangeBox
 Small utility class RangeBox. More...
class  CorrelationBox
 CorrelationBox finds the correlation coefficient between two data streams. More...


void CreateDir (const char *dirname)
 Check if directory exists, if not create it.
int TestFile (const char *filename)
 Check if file exists and the user has permissions to read it.
int STestFile (const char *filename)
 Same as above, but without any error messages.
std::string trim_str (std::string somestr)
 Get rid of leading and trailing white space characters in a string.
template<class T>
int split_str (std::string st, char spl, T &lst, unsigned int ign=1000000)
 Split a string into an array of strings based on a given character.

Detailed Description

Classes in this namespace are of more generic nature and usefulness. They have little to do with the protein folding model implemented here, but they have been found as very useful tools. Two examples would be the Vector3, to represent vectors in 3-space, and the Histogram class for a variety of possible applications in connection with gathering statistics.

Function Documentation

template<class T>
int prf_utils::split_str ( std::string  st,
char  spl,
T &  lst,
unsigned int  ign = 1000000 

Splits string into an array containing at most the first ign tokens which would result because of such a spliting. The return value is the number of tokens in the list of split parts.

std::string prf_utils::trim_str ( std::string  somestr  ) 

This is not really a "file" utility. But the name of this file just happens to be fileutils.hh. In the future it will be probably changed to misc_utils when more miscellaneous small functions accumulate here.

PROFASI: Protein Folding and Aggregation Simulator, Version 1.1
© (2005-2008) Anders Irbäck and Sandipan Mohanty
Documentation generated on 10 Oct 2008 using Doxygen version 1.5.0