Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

utils.h

Go to the documentation of this file.
00001 #ifndef _utils_h_
00002 #define _utils_h_
00003 
00004 #include "types.h"
00005 #include "matrix.h"
00006 #include <valarray>
00007 #include <iostream>
00008 #include <string>
00009 using namespace std;
00010 
00011 #define DEFAULT_PRECISION 0.00001
00012 
00017 short int sign(Real x);
00018 
00022 Matrix transform1DvalarrayToColumnMatrix(valarray<Real> array);
00023 
00027 Matrix transform2DvalarrayToMatrix(valarray<valarray<Real> > array);
00028 
00032 valarray<Real> transformColumnMatrixTo1Dvalarray(Matrix M);
00033 
00037 valarray<valarray<Real> > transformMatrixTo2Dvalarray(Matrix M);
00038 
00043 valarray<Real> mergeunique(valarray<Real> a1, valarray<Real> a2);
00044 void ErrorMsg(string str, bool mustexit = false);
00045 int getint(istream& istr);
00046 
00047 bool 
00048 realsEqual(Real realOne, Real realTwo, Real precision = 0.00001);
00049 
00050 string valarrayRealToString(const valarray<Real> &theArray);
00051 #endif

Note: Generated nightly - reload for latest version
Generated on Thu Dec 22 23:12:37 2005 for terreneuve by doxygen 1.3.6