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

WeightedDegrees.h

00001 // WeightedDegrees.h -- The interface to a cache of weighted degrees
00002 // for variables.
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: WeightedDegrees_8h-source.html,v 1.1 2005/05/25 12:37:18 tudor Exp $
00029 
00030 #ifndef _CSP_CACHES_WeightedDegrees_H
00031 #define _CSP_CACHES_WeightedDegrees_H
00032 
00033 
00034 CSP_NAMESPACE_BEGIN(csp);
00035 CSP_NAMESPACE_BEGIN(caches);
00036 
00037 
00045 class CSP_API WeightedDegrees
00046 {
00047   public:
00049     WeightedDegrees() {}
00050 
00060     ulonglong weightedDegree(const Variable& variable);
00061 
00068     void updateWeightedDegree(const Variable& variable);
00069 
00071     void clear() { m_weightedDegrees.clear(); }
00072 
00074     bool empty() { return m_weightedDegrees.empty(); }
00075 
00076   private:
00078     WeightedDegrees(const WeightedDegrees&);
00079 
00081     WeightedDegrees& operator=(const WeightedDegrees&);
00082 
00084     typedef hash_map<const Variable*, ulonglong> vd_type;
00085 
00087     vd_type m_weightedDegrees;
00088 };
00089 
00090 
00091 CSP_NAMESPACE_END(cache);
00092 CSP_NAMESPACE_END(csp);
00093 
00094 
00095 #endif // _CSP_CACHES_WeightedDegrees_H
00096 
00097 // Local Variables:
00098 // mode: C++
00099 // End:

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