openModeller  Version 1.5.0
virtual_niche.hh
Go to the documentation of this file.
1 
27 #ifndef _VIRTUALNICHEHH_
28 #define _VIRTUALNICHEHH_
29 
30 #include <openmodeller/om.hh>
31 
32 /************************************************************/
33 /*********************** VirtualNiche ***********************/
34 
40 {
41 public:
42 
45 
46  int initialize();
47  int iterate();
48  int done() const;
49 
50  Scalar getValue( const Sample& x ) const;
51  int getConvergence( Scalar * const val ) const;
52 
53 protected:
54  virtual void _getConfiguration( ConfigurationPtr& ) const;
55  virtual void _setConfiguration( const ConstConfigurationPtr & );
56 
57 private:
58 
59  void dump();
60 
61  // Probability density function for a Gaussian distribution
62  Scalar pdf(Scalar avg, Scalar std, Scalar val) const;
63 
64  bool _done;
65 
68 
76 };
77 
78 
79 #endif //VIRTUALNICHEHH
Scalar getValue(const Sample &x) const
int getConvergence(Scalar *const val) const
Scalar _std_factor
Threshold to get a binary niche.
double Scalar
Type of map values.
Definition: om_defs.hh:39
Sample _std
Average for the normal distribution.
Sample _mean
Maximum value for each variable.
virtual void _setConfiguration(const ConstConfigurationPtr &)
Scalar _threshold
Factors to multiply the PDF values.
Sample _maximum
Mininum value for each variable.
OccurrencesPtr _background
true if the algorithm is finished.
virtual void _getConfiguration(ConfigurationPtr &) const
Sample _scale
Standard deviation for the normal distribution.
Scalar pdf(Scalar avg, Scalar std, Scalar val) const
Definition: Sample.hh:25