/home/msneddon/eclipse/galileoSR1_cpp/workspace/NFsim/src/NFutil/NFutil.hh

Go to the documentation of this file.
00001 
00002 // NFutil.h
00003 //
00004 // Header file that contains the class declarations and definitions
00005 // for any math utility functions that are needed for running the
00006 // NFsim program.
00007 //
00008 // Michael Sneddon (michael.sneddon@yale.edu)
00009 //
00011 #ifndef NFUTIL_H_
00012 #define NFUTIL_H_
00013 
00014 // JUSTIN -- added stdlib.h to resolve problem finding "exit"
00015 #include <stdlib.h>
00016 #include <string>
00017 #include <exception>
00018 #include <iostream>
00019 #include <sstream>
00020 #include <stdexcept>
00021 
00022 
00023 
00024 using namespace std;
00025 
00027 
00030 namespace NFutil {
00031 
00032 
00034 
00040         void SEED_RANDOM( unsigned long  seed );
00041 
00042 
00044 
00051         double RANDOM( double max );
00052 
00053 
00055 
00062         double RANDOM_CLOSED();
00063 
00064 
00066 
00074         int RANDOM_INT(unsigned long min, unsigned long max);
00075 
00077 
00085         double RANDOM_GAUSSIAN();
00086 
00087 
00088 
00090 
00095         double convertToDouble(const std::string& s);
00096 
00098 
00103         int convertToInt(const std::string& s);
00104 
00105 
00107 
00110         string toString(double x);
00111 
00113 
00116         string toString(int x);
00117 
00118 
00120 
00122         void trim(string& str);
00123 
00124 
00125 
00126 
00127 
00128         const double PI = 3.14159265358979323846;
00129         const double NA = 6.02214179e23;
00130 
00131 }
00132 
00133 
00134 
00135 
00136 #endif /*NFUTIL_H_*/

Generated on Thu Dec 9 11:02:48 2010 for NFsim by  doxygen 1.5.4