Main Page | Class Hierarchy | Class List | File List | Class Members

values/Predefined.h

00001 // Predefined.h -- The `predefined' value ordering heuristic interface.
00002 
00003 /*
00004  * Copyright (C) 2004 Tudor Hulubei <tudor@hulubei.net>.
00005  *
00006  * This library is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as
00008  * published by the Free Software Foundation; either version 2, or (at
00009  * your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA,
00019  * 02111-1307, USA.
00020  */
00021 
00022 // $Id: values_2Predefined_8h-source.html,v 1.1 2005/05/25 12:37:18 tudor Exp $
00023 
00024 #ifndef _CSP_HEURISTICS_VALUE_Predefined_H
00025 #define _CSP_HEURISTICS_VALUE_Predefined_H
00026 
00027 
00028 CSP_NAMESPACE_BEGIN(csp);
00029 CSP_NAMESPACE_BEGIN(heuristics);
00030 CSP_NAMESPACE_BEGIN(values);
00031 
00032 
00037 class CSP_API Predefined :
00038     public ValueOH
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 
00079     virtual void select(
00080         Domain& selectable,
00081         Domain& selected,
00082         Variable& variable);
00083 
00094     virtual long double score(Variable& variable, const Value& value);
00095 
00102     size_t extraCalls() const { return m_extraCalls; }
00103 
00104   private:
00106     Predefined(const Predefined&);
00107 
00109     Predefined& operator=(const Predefined&);
00110 
00112     vector<vector<id_t> > m_ids;
00113 
00115     vector<size_t> m_next;
00116 
00119     size_t m_extraCalls;
00120 };
00121 
00122 
00123 CSP_NAMESPACE_END(values);
00124 CSP_NAMESPACE_END(heuristics);
00125 CSP_NAMESPACE_END(csp);
00126 
00127 
00128 #endif // _CSP_HEURISTICS_VALUE_Predefined_H
00129 
00130 // Local Variables:
00131 // mode: C++
00132 // End:

Generated on Wed May 25 12:21:14 2005 for csp.kdevelop by  doxygen 1.3.9.1