Biorithm  1.1
 All Classes Functions Variables Typedefs Friends
Itemset.h
00001 /**************************************************************************
00002  * Copyright (c) 2007 Clifford Conley Owens III                           *
00003  *                                                                        *
00004  * This file is part of Biorithm.                                         *
00005  *                                                                        *
00006  * Biorithm is free software: you can redistribute it and/or modify       *
00007  * it under the terms of the GNU General Public License as published by   *
00008  * the Free Software Foundation, either version 3 of the License, or      *
00009  * (at your option) any later version.                                    *
00010  *                                                                        *
00011  * Biorithm is distributed in the hope that it will be useful,            *
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of         *
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
00014  * GNU General Public License for more details.                           *
00015  *                                                                        *
00016  * You should have received a copy of the GNU General Public License      *
00017  * along with Biorithm.  If not, see <http://www.gnu.org/licenses/>.      *
00018  *                                                                        *
00019  **************************************************************************/
00020 
00033 #ifndef ITEMSET_H
00034 #define ITEMSET_H
00035 
00036 // ---------------------------- External Headers ---------------------------- //
00037 
00038 #include <vector>
00039 #include <iostream>
00040 #include <fstream>
00041 using namespace std;
00042 
00048 class Itemset
00049 {
00050     protected:
00051         // The set of items
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
 All Classes Functions Variables Typedefs Friends