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

DomainWeightedDegreeRatios.h

00001 // DomainWeightedDegreeRatios.h -- The interface to a cache of
00002 // domain/(weighted degree) ratios.
00003 
00004 /*
00005  * Copyright (C) 2005 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: DomainWeightedDegreeRatios_8h-source.html,v 1.1 2005/05/25 12:37:18 tudor Exp $
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 // Local Variables:
00094 // mode: C++
00095 // End:

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