00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00033 #ifndef ITEMSET_H
00034 #define ITEMSET_H
00035
00036
00037
00038 #include <vector>
00039 #include <iostream>
00040 #include <fstream>
00041 using namespace std;
00042
00048 class Itemset
00049 {
00050 protected:
00051
00052 vector<unsigned int> items;
00053
00054 public:
00055 Itemset(unsigned int size = 0);
00056 Itemset(const Itemset& src);
00057 virtual ~Itemset();
00058 virtual Itemset& operator =(const Itemset& rhs);
00059 virtual unsigned int& operator [](unsigned int index);
00060 virtual unsigned int operator [](unsigned int index) const;
00061 virtual unsigned int operator <(const Itemset& rhs) const;
00062 virtual unsigned int getItem(unsigned int index) const;
00063 virtual void setItem(unsigned int index, unsigned int item);
00064 virtual unsigned int getSize() const;
00065 virtual void clear();
00066 virtual bool isEmpty() const;
00067 virtual void insertBack(unsigned int item);
00068 virtual void insertFront(unsigned int item);
00069 virtual void removeBack();
00070 virtual void removeFront();
00071 unsigned int getBack() const;
00072 unsigned int getFront() const;
00073
00074 friend ostream &operator <<(ostream &out, const Itemset &token);
00075 };
00076
00077
00078
00079 #endif