00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef IMPSTATISTICS_KM_TERMINATION_CONDITION_H
00010 #define IMPSTATISTICS_KM_TERMINATION_CONDITION_H
00011 #include "statistics_config.h"
00012
00013 IMPSTATISTICS_BEGIN_NAMESPACE
00014
00015 #ifndef IMP_DOXYGEN
00016
00017
00018
00019
00020
00021
00022 class KMTerminationCondition {
00023 public:
00024 KMTerminationCondition() {
00025 abs_max_num_of_stages_ = 200;
00026 max_num_of_stages_for_run_ = 20;
00027 min_consecutive_rdl_ = 0.1;
00028 min_accumulated_rdl_ = 0.1;
00029 }
00030 KMTerminationCondition(Int abs_max_num_of_stages,
00031 Int max_num_of_stages_for_run,double min_consecutive_rdl,
00032 double min_accumulated_rdl) {
00033 abs_max_num_of_stages_ = abs_max_num_of_stages;
00034 max_num_of_stages_for_run_ = max_num_of_stages_for_run;
00035 min_consecutive_rdl_ = min_consecutive_rdl;
00036 min_accumulated_rdl_ = min_accumulated_rdl;
00037 }
00038 inline void set_abs_max_num_of_stages(Int a) {abs_max_num_of_stages_ = a;}
00039 inline Int get_abs_max_num_of_stages() const {return abs_max_num_of_stages_;}
00040 inline void set_max_num_of_stages_for_run(Int a) {
00041 max_num_of_stages_for_run_ = a;}
00042 inline Int get_max_num_of_stages_for_run() const {
00043 return max_num_of_stages_for_run_;}
00044 inline void set_min_consecutive_rdl(double a) {min_consecutive_rdl_=a;}
00045 inline double get_min_consecutive_rdl() const {return min_consecutive_rdl_;}
00046 inline void set_min_accumulated_rdl(double a) {min_accumulated_rdl_=a;}
00047 inline double get_min_accumulated_rdl() const {return min_accumulated_rdl_;}
00048
00049 protected:
00050 Int abs_max_num_of_stages_;
00051 Int max_num_of_stages_for_run_;
00052
00053 double min_consecutive_rdl_;
00054
00055 double min_accumulated_rdl_;
00056 };
00057
00058 #endif
00059
00060 IMPSTATISTICS_END_NAMESPACE
00061 #endif