Go to the documentation of this file.00001 #ifndef rrel_muse_table_h_
00002 #define rrel_muse_table_h_
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <vcl_map.h>
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 class rrel_muse_key_type
00023 {
00024 public:
00025 rrel_muse_key_type( unsigned int k, unsigned int n ) : k_(k), n_(n) {}
00026 unsigned int k_;
00027 unsigned int n_;
00028 };
00029
00030 bool operator< ( rrel_muse_key_type const& left_t, rrel_muse_key_type const& right_t );
00031
00032
00033 class rrel_muse_table_entry
00034 {
00035 public:
00036 rrel_muse_table_entry() : initialized_(false) {}
00037 bool initialized_;
00038 double expected_;
00039 double standard_dev_;
00040 double muse_t_divisor_;
00041 double muse_t_sq_divisor_;
00042 };
00043
00044 typedef vcl_map< rrel_muse_key_type, rrel_muse_table_entry > rrel_muse_map_type;
00045
00046
00047 class rrel_muse_table
00048 {
00049 public:
00050
00051
00052
00053 rrel_muse_table( unsigned int ) {}
00054
00055 rrel_muse_table( ) {}
00056
00057
00058 ~rrel_muse_table() {}
00059
00060
00061
00062 double expected_kth( unsigned int k, unsigned int n );
00063
00064
00065
00066 double standard_dev_kth( unsigned int k, unsigned int n );
00067
00068
00069
00070 double muset_divisor( unsigned int k, unsigned int n );
00071
00072
00073
00074
00075 double muset_sq_divisor( unsigned int k, unsigned int n );
00076
00077 private:
00078 void calculate_all( unsigned int k, unsigned int n, rrel_muse_table_entry & entry );
00079
00080
00081
00082 double calculate_expected( unsigned int k, unsigned int n ) const;
00083
00084
00085
00086 double calculate_standard_dev( unsigned int k, unsigned int n, double expected_kth ) const;
00087
00088
00089
00090 double calculate_divisor( unsigned int k, unsigned int n, double expected_kth ) const;
00091
00092
00093
00094 double calculate_sq_divisor( unsigned int k, unsigned int n, double expected_kth ) const;
00095
00096 private:
00097 rrel_muse_map_type table_;
00098 };
00099
00100 #endif // rrel_muse_table_h_