ReGen.h

00001 /*
00002  *  Rain.h
00003  *  intraspecific
00004  *
00005  *  Created by Martin Kchy on Thu Feb 06 2003.
00006  *
00007  */
00008 
00009 #include <valarray>
00010 #include <vector>
00011 #include <string>
00012 #include "rng.h"
00013 #include <math.h>
00014 
00015 //--------------------------------------------------------------------
00016 #ifndef RainH
00017 #define RainH
00018 //--------------------------------------------------------------------
00019 
00020 using namespace std;
00021 
00022 
00023 const int days_in_year = 365;
00024 
00025 
00031 class RAINPARAMETERS
00032 {
00033 public:
00035   RAINPARAMETERS (void) {};
00036   
00038   RAINPARAMETERS (int, float dDMR=0);
00039   
00041   RAINPARAMETERS (float A, float L, float W, float a, float l, float w, float da=0);
00042   
00043   ~RAINPARAMETERS (){};
00044   
00046   float lA; 
00047   float lL; 
00048   float lW; 
00049 
00050   
00052 
00053   float vA; 
00054   float vL; 
00055   float vW; 
00056 
00057   
00058   float d; 
00059   
00060   void calcParameters (float MAP, float deltaDMR); 
00061 };
00062 
00063 
00066 class ReGen
00067 {
00068 public:
00069   ReGen (RAINPARAMETERS* p_RainP);
00070   ~ReGen(){};
00071   void drawYear(void); 
00072   float getRain (int day) const; 
00073   float getAnnualRain (void) const; 
00074   float getPeriodRain (int start_day, int end_day) const; 
00075 
00076 protected:
00077         KW_RNG::RNG Zzg; 
00078         float theAnnualRain; 
00079         RAINPARAMETERS* pP; 
00080         valarray <float> theDays; 
00081         valarray <float> rainProb; 
00082         valarray <float> meanRainVolume; 
00083         valarray <float> rainyDay; 
00084         valarray <float> rainVolume; 
00085         valarray <float> calcGauss (float amplitude, float location, float width, int shape = 2); 
00086 
00087         void calcRain(void); 
00088 };
00089 
00090 #endif

Generated on Tue May 1 23:39:16 2007 for ReGen by  doxygen 1.5.1