openModeller  Version 1.4.0
bioclim_histogram.hh
Go to the documentation of this file.
00001 
00036 #ifndef _BIOCLIM_HISTOGRAM_HH_
00037 #define _BIOCLIM_HISTOGRAM_HH_
00038 
00039 #include <openmodeller/om.hh>
00040 
00041 #define HIST_BOX_RESOLUTION           0.01
00042 #define BIOCLIM_LEVEL_RESOLUTION      0.005
00043 #define BIOCLIM_MAX_LEVEL             0.2
00044 
00045 #define MAX_ENV_LAYERS                256
00046 
00047 // ===========================================================================
00048 //  Declaration and Implementation of class BioclimHistogram
00049 // ===========================================================================
00050 class BioclimHistogram
00051 {
00052 public:
00053   BioclimHistogram();
00054   ~BioclimHistogram();
00055 
00056   int resamples() const;
00057 
00058   void initialize(const OccurrencesPtr& occs);
00059 
00060   void getBioclimRange(Scalar prediction, int layerIndex, 
00061            Scalar& minCutLevel, Scalar& maxCutLevel) const;
00062 
00063 private:
00064   void reset();
00065 
00066   int _resamples;
00067 
00068   int _matrix[2][MAX_ENV_LAYERS][256];
00069   int _depend[2];
00070 
00071   // bioclim histogram
00072   double * _upperLevels;
00073   double * _lowerLevels;
00074 };
00075 
00076 /****************************************************************/
00077 
00078 #endif
00079