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

DomainDegreeRatios.h

00001 // DomainDegreeRatios.h -- The interface to a cache of domain/degree
00002 // ratios.
00003 
00004 /*
00005  * Copyright (C) 2004 Tudor Hulubei <tudor@hulubei.net>.
00006  *
00007  * This library is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Lesser General Public License as
00009  * published by the Free Software Foundation; either version 2, or (at
00010  * your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA,
00020  * 02111-1307, USA.
00021  */
00022 
00023 /*
00024  * NOTE: This is an interal header file.
00025  * You should not attempt to use it directly.
00026  */
00027 
00028 // $Id: DomainDegreeRatios_8h-source.html,v 1.1 2005/05/25 12:37:18 tudor Exp $
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 // Local Variables:
00092 // mode: C++
00093 // End:

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