00001 #ifndef GLAREALGORITHMGOODHIT_H 00002 #define GLAREALGORITHMGOODHIT_H 00003 00004 #include "FractionOfFragmentToKeep.h" 00005 #include "GlareAlgorithm.h" 00006 #include "GoodnessRule.h" 00007 #include <iosfwd> 00008 00012 class GlareAlgorithmGoodHit : public GlareAlgorithm 00013 { 00014 public: 00015 00020 GlareAlgorithmGoodHit( float p_first_fraction_to_keep = 0.75 ); 00021 00025 virtual bool isOptimized( void ); 00026 00030 virtual void evaluateGoodness( void ); 00031 00035 virtual void pruneDimensions( void ); 00036 00040 virtual void resetIterationCounter( void ); 00041 00045 virtual std::ostream& getTrace( std::ostream& p_ostream ); 00046 00050 float getFractionGoodHit( void ); 00051 00055 void setFractionGoodHitThreshold( float p_fraction ); 00056 00060 float getFractionGoodHitThreshold( void ) const; 00061 00065 void setMaximumIterationThreshold( int p_limit ); 00066 00070 int getMaximumIterationThreshold( void ) const; 00071 00075 unsigned long int getNumberInitialGoodHit( void ) const; 00076 00080 unsigned long int getNumberEvaluated( void ) const; 00081 00085 unsigned long int getNumberInitialEvaluated( void ) const; 00086 00090 unsigned long int getNumberGoodHit( void ) const; 00091 00095 void setDoScaleWithSize( bool p_do_scale ); 00096 00100 void setScaleWithSizeParam( float p_scale_param ); 00101 00105 void setPruneZeroOccurence( bool p_prune_zero_occurence ); 00106 00110 void setGoodnessRule( GoodnessRule p_goodness_rule ); 00111 00112 protected: 00113 void setNumberInitialGoodHit( unsigned long int p_number ); 00114 void setNumberEvaluated( unsigned long int p_number ); 00115 void setNumberInitialEvaluated( unsigned long int p_number ); 00116 void setNumberGoodHit( unsigned long int p_number ); 00117 unsigned long int m_number_good_hit; 00118 unsigned long int m_number_initial_good_hit; 00119 unsigned long int m_number_initial_evaluated; 00120 unsigned long int m_number_evaluated; 00121 unsigned long int m_running_total_evaluation; 00122 float m_fraction_good_hit_threshold; 00123 float m_fraction_to_keep; 00124 float m_fraction_good_hit; 00125 bool m_do_scale_with_size; 00126 float m_scale_with_size_param; 00127 bool m_prune_zero_occurence; 00128 FractionOfFragmentToKeep m_calculate_fraction_kept; 00129 GoodnessRule m_goodness_rule; 00130 }; 00131 00132 #endif 00133 bool m_prune_zero_occurence; 00134 FractionOfFragmentToKeep m_calculate_fraction_kept; 00135 GoodnessRule m_goodness_rule; 00136 }; 00137 00138 #endif