00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _CSP_CACHES_DomainDegreeRatios_H
00031 #define _CSP_CACHES_DomainDegreeRatios_H
00032
00033
00034 CSP_NAMESPACE_BEGIN(csp);
00035 CSP_NAMESPACE_BEGIN(caches);
00036
00037
00041 class CSP_API DomainDegreeRatios
00042 {
00043 public:
00045 DomainDegreeRatios() {}
00046
00055 double domainDegreeRatio(const Variable& variable);
00056
00062 void updateDomainDegreeRatio(const Variable& variable);
00063
00065 void clear() { m_ratios.clear(); }
00066
00068 bool empty() { return m_ratios.empty(); }
00069
00070 private:
00072 DomainDegreeRatios(const DomainDegreeRatios&);
00073
00075 DomainDegreeRatios& operator=(const DomainDegreeRatios&);
00076
00078 typedef hash_map<const Variable*, double> dd_type;
00079
00081 dd_type m_ratios;
00082 };
00083
00084
00085 CSP_NAMESPACE_END(caches);
00086 CSP_NAMESPACE_END(csp);
00087
00088
00089 #endif // _CSP_CACHES_DomainDegreeRatios_H
00090
00091
00092
00093