ModelMath.h

00001 #ifndef ModMathH
00002 #define ModMathH
00003 //---------------------------------------------------------------------------
00026 class clModelMath {
00027 
00028   friend class clSimManager;
00029   friend class clTestModelMath; 
00031   public:
00032 
00033   //clModelMath(); use default constructor
00034 
00035   //~clModelMath(); use default destructor
00036 
00044   static float CalcPointValue(float fX, float fSlope, float fIntercept=0.0);
00045 
00059   static float GetRand();
00060 
00067   static float CalculateBasalArea(float fDbh);
00068 
00077   static float Round(float fNumber, int iNumDigits);
00078 
00088   static int RandomRound(float fNumber);
00089 
00099   static float CalculateWeibullFunction(float fDispersal, float fTheta, float fDistance);
00100 
00101 
00113   static float CalculateLognormalFunction(float fX0, float fXb, float fDistance);
00114 
00124   static int PoissonRandomDraw(float fLambda);
00125 
00143   static float LognormalRandomDraw(float fMean, float fStdDev);
00144 
00157   static float NormalRandomDraw(float fStdDev);
00158 
00167   static int NegBinomialRandomDraw(float fMean, float fClumping);
00168 
00187   static float AddBarkToDBH(float fDIB, float fA, float fB, float fC);
00188 
00206 // MATH_EXPORT_TYPE float NegBinomialRandomDraw(float p, float n);
00207 
00227 // static double GammaRandomDraw (const double a, const double b);
00231 // static double gsl_ran_gamma_int (const unsigned int a);
00235 // static double gamma_large (const double a);
00239 // static double gamma_frac (const double a);
00240 
00250   static float GammaLn(float fX);
00251 
00252   private:
00253 
00257   static long m_iRandomSeed;
00258 
00263   static void SetRandomSeed(long iSeed) {
00264    m_iRandomSeed = iSeed;
00265  }
00266 };
00267 long clModelMath::m_iRandomSeed = -1;
00268 //---------------------------------------------------------------------------
00269 #endif
00270 

Generated on Thu Jan 26 13:44:34 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.6-NO