00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _CSP_HEURISTICS_VARIABLE_Predefined_H
00025 #define _CSP_HEURISTICS_VARIABLE_Predefined_H
00026
00027
00028 CSP_NAMESPACE_BEGIN(csp);
00029 CSP_NAMESPACE_BEGIN(heuristics);
00030 CSP_NAMESPACE_BEGIN(variables);
00031
00032
00037 class CSP_API Predefined :
00038 public VariableOH
00039 {
00040 public:
00050 Predefined(
00051 Decomposition& decomposition,
00052 const vector<vector<id_t> >& ids,
00053 const vector<pair<double, double> >& intervals,
00054 double quality = 1);
00055
00066 virtual void init(const vlist_type& uninstantiatedVariables);
00067
00069 virtual void done();
00070
00082 virtual void select(vlist_type& selectable, vlist_type& selected);
00083
00084 private:
00086 Predefined(const Predefined&);
00087
00089 Predefined& operator=(const Predefined&);
00090
00092 bool allSingletons(const vlist_type& selectable) const;
00093
00095 vector<vector<id_t> > m_ids;
00096
00098 vector<size_t> m_next;
00099 };
00100
00101
00102 CSP_NAMESPACE_END(variables);
00103 CSP_NAMESPACE_END(heuristics);
00104 CSP_NAMESPACE_END(csp);
00105
00106
00107 #endif // _CSP_HEURISTICS_VARIABLE_Predefined_H
00108
00109
00110
00111