openModeller  Version 1.4.0
bioclim.hh
Go to the documentation of this file.
00001 
00028 #ifndef _BIOCLIMHH_
00029 #define _BIOCLIMHH_
00030 
00031 #include <openmodeller/om.hh>
00032 
00033 /****************************************************************/
00034 /*********************** Bioclim Distance ***********************/
00035 
00041 class Bioclim : public AlgorithmImpl
00042 {
00043 public:
00044 
00045   Bioclim();
00046   ~Bioclim();
00047 
00048   // Inherited from Algorithm class.
00049   int initialize();
00050   int iterate();
00051   int done() const;
00052 
00053   Scalar getValue( const Sample& x ) const;
00054   int    getConvergence( Scalar * const val ) const;
00055 
00056 protected:
00057 
00058   void _getConfiguration( ConfigurationPtr& ) const;
00059   void _setConfiguration( const ConstConfigurationPtr & );
00060 
00061 private:
00062 
00065   void computeStats( const OccurrencesPtr& );
00066 
00068   void logEnvelope();
00069 
00070   bool _done;  
00071 
00072   Sample _minimum; 
00073   Sample _maximum; 
00074   Sample _mean;    
00075   Sample _std_dev; 
00076 
00077 };
00078 
00079 
00080 #endif
00081