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

ConstraintOH.h

00001 // ConstraintOH.h -- The super class of all the constraint ordering heuristics.
00002 
00003 /*
00004  * Copyright (C) 1998,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 /*
00023  * NOTE: This is an interal header file.
00024  * You should not attempt to use it directly.
00025  */
00026 
00027 // $Id: ConstraintOH_8h-source.html,v 1.1 2005/05/25 12:37:18 tudor Exp $
00028 
00029 #ifndef _CSP_KERNEL_ConstraintOH_H
00030 #define _CSP_KERNEL_ConstraintOH_H
00031 
00032 
00033 CSP_NAMESPACE_BEGIN(csp);
00034 
00035 
00039 class CSP_API ConstraintOH :
00040     public OrderingHeuristic
00041 {
00042   public:
00052     ConstraintOH(
00053         const wstring& name,
00054         Decomposition& decomposition,
00055         const vector<pair<double, double> >& intervals,
00056         double quality = 1) :
00057         OrderingHeuristic(name, decomposition, intervals, quality) {}
00058 
00059     virtual ~ConstraintOH() {}
00060 
00071     virtual void init(const vlist_type& /*uninstantiatedVariables*/) {}
00072 
00074     virtual void done() {}
00075 
00091     virtual void select(clist_type& selectable, clist_type& selected) = 0;
00092 
00098     virtual wostream& print(wostream& wos) const
00099     {
00100         return OrderingHeuristic::print(wos);
00101     }
00102 
00103     friend CSP_API wostream& operator<<(
00104         wostream& wos, const ConstraintOH& constraintOH)
00105     {
00106         return constraintOH.print(wos);
00107     }
00108 
00109   private:
00111     ConstraintOH(const ConstraintOH&);
00112 
00114     ConstraintOH& operator=(const ConstraintOH&);
00115 };
00116 
00117 
00118 CSP_NAMESPACE_END(csp);
00119 
00120 
00121 #endif // _CSP_KERNEL_ConstraintOH_H
00122 
00123 // Local Variables:
00124 // mode: C++
00125 // End:

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