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_DomainWeightedDegreeRatios_H
00031 #define _CSP_CACHES_DomainWeightedDegreeRatios_H
00032
00033
00034 CSP_NAMESPACE_BEGIN(csp);
00035 CSP_NAMESPACE_BEGIN(caches);
00036
00037
00041 class CSP_API DomainWeightedDegreeRatios
00042 {
00043 public:
00045 DomainWeightedDegreeRatios() {}
00046
00056 double domainWeightedDegreeRatio(const Variable& variable);
00057
00064 void updateDomainWeightedDegreeRatio(const Variable& variable);
00065
00067 void clear() { m_ratios.clear(); }
00068
00070 bool empty() { return m_ratios.empty(); }
00071
00072 private:
00074 DomainWeightedDegreeRatios(const DomainWeightedDegreeRatios&);
00075
00077 DomainWeightedDegreeRatios& operator=(const DomainWeightedDegreeRatios&);
00078
00080 typedef hash_map<const Variable*, double> dd_type;
00081
00083 dd_type m_ratios;
00084 };
00085
00086
00087 CSP_NAMESPACE_END(caches);
00088 CSP_NAMESPACE_END(csp);
00089
00090
00091 #endif // _CSP_CACHES_DomainWeightedDegreeRatios_H
00092
00093
00094
00095