openModeller  Version 1.5.0
consensus.hh
Go to the documentation of this file.
1 
27 #ifndef _CONSENSUS_ALGHH_
28 #define _CONSENSUS_ALGHH_
29 
30 #include <vector>
31 #include <string>
32 
33 #include <openmodeller/om.hh>
34 
35 /**********************************************/
36 /************* Consensus algorithm ************/
37 
42 {
43 public:
44 
46 
48 
49  int needNormalization();
50  int initialize();
51  int iterate();
52  float getProgress() const;
53  int done() const;
54 
55  Scalar getValue( const Sample& x ) const;
56  int getConvergence( Scalar * const val ) const;
57 
58 protected:
59 
60  void _getConfiguration( ConfigurationPtr& ) const;
61 
63 
64  bool _setAlgorithm( std::string alg_str );
65 
66  bool _done;
67 
69 
73 
74  vector<AlgorithmPtr> _algs;
75 
76  int _num_algs;
77 
79 
80  vector<Normalizer*> _norms;
81 };
82 
83 
84 #endif
85 
vector< AlgorithmPtr > _algs
Definition: consensus.hh:74
float getProgress() const
Definition: consensus.cpp:478
int done() const
Definition: consensus.cpp:494
double Scalar
Type of map values.
Definition: om_defs.hh:39
vector< Normalizer * > _norms
Definition: consensus.hh:80
int getConvergence(Scalar *const val) const
Definition: consensus.cpp:539
void _getConfiguration(ConfigurationPtr &) const
Definition: consensus.cpp:548
void _setConfiguration(const ConstConfigurationPtr &)
Definition: consensus.cpp:569
bool _setAlgorithm(std::string alg_str)
Definition: consensus.cpp:330
Scalar getValue(const Sample &x) const
Definition: consensus.cpp:502
Definition: Sample.hh:25