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

rel_count.h

Go to the documentation of this file.
00001 /* ===========================================================================
00002  *        Filename:  rel_count.h
00003  *     Description:  Relation Count class
00004  * 
00005  *         Version:  $Rev: 11 $
00006  *         Changed:  $Date: 2005-08-04 17:58:36 -0400 (Do, 04 Aug 2005) $
00007  *         Licence:  GPL (read COPYING file for details)
00008  * 
00009  *          Author:  Erich Schubert (eS), erich@debian.org
00010  *                   Institut für Informatik, LMU München
00011  * ======================================================================== */
00012 #ifndef  SSD_REL_COUNT_H
00013 #define  SSD_REL_COUNT_H
00014 #include "config.h"
00015 #include "rel_eqclass.h"
00016 #include <vector>
00017 #include <ext/hash_map>
00018 
00019 using namespace std;
00020 
00021 namespace SSD {
00022 
00023 #define RELCOUNT_UNIQUE (UINT_MAX - 1)
00024 #define RELCOUNT_ONCE   (UINT_MAX - 2)
00025 
00044 class RelCount {
00045 private:
00047         static unsigned int len;
00049         static hash_map<RelEqClass, unsigned int, hash_releqc> cmap;
00051         short*  data;
00052 public:
00054         RelCount();
00060         RelCount(hash_map<RelEqClass, int, hash_releqc>& map1, hash_map<RelEqClass, int, hash_releqc>& map2);
00062         RelCount(RelCount& rc);
00064         ~RelCount();
00067         void operator+=(const RelCount& other);
00070         void operator-=(const RelCount& other);
00075         int  modify(RelEqClass key, short val);
00076         /* for debug output */
00080         friend std::ostream &operator<<(std::ostream &out, const RelCount& rc);
00083         static void dumpIndex(std::ostream &out);
00084 };
00085 
00086 }
00087 #endif

Generated on Thu Aug 4 17:57:12 2005 for SSDDiff by  doxygen 1.4.3-20050530