Biorithm  1.1
 All Classes Functions Variables Typedefs Friends
Lattice.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 
00031 #ifndef LATTICE_H
00032 #define LATTICE_H
00033 
00034 // ---------------------------- Internal Headers ---------------------------- //
00035 
00036 #include "Evaluator.h"
00037 #include "BinaryMatrix.h"
00038 
00046 class Lattice
00047 {
00048     public:
00050         // The destructor                                                     //
00052         virtual ~Lattice()
00053         {
00054 
00055         }
00056 
00057         virtual void setBinaryMatrix(BinaryMatrix* bm) = 0;
00058         virtual void generateCandidates(unsigned int level) = 0;
00059         virtual void generateCandidates(unsigned int level, unsigned int k) = 0;
00060         virtual bool hasNextCandidate() const = 0;
00061         virtual Itemset* getNextCandidate() = 0;
00062         virtual void evaluateItemset(Itemset* is) = 0;
00063         virtual void flushEvaluationBuffer() = 0;
00064         virtual unsigned int getUpperBound() const = 0;
00065         virtual void setEvaluator(Evaluator* evaluator) = 0;
00066         virtual void setBufferSize(unsigned int bufferSize) = 0;
00067         virtual unsigned int analyzeLevel(unsigned int level) = 0;
00068         virtual unsigned int analyzeLevel(unsigned int level, double& status) =
00069             0;
00070         virtual unsigned int analyzeLevel(unsigned int level, unsigned int k) =
00071             0;
00072         virtual unsigned int analyzeLevel(unsigned int level, unsigned int k,
00073             double& status) = 0;
00074         virtual bool isEmpty(unsigned int level) const = 0;
00075         virtual unsigned int getSize() const = 0;
00076         virtual unsigned int getSize(unsigned int level) const = 0;
00077         virtual unsigned int getSuccessful(unsigned int level) const = 0;
00078         virtual const Itemset* getItemset(unsigned int level,
00079             unsigned int index) const = 0;
00080         virtual const Itemset* getItemset(unsigned int level,
00081             unsigned int index, unsigned int& upperBound) const = 0;
00082         virtual void generatePositiveBorder(unsigned int level) = 0;
00083         virtual bool hasNextPositiveBorder() const = 0;
00084         virtual const Itemset* getNextPositiveBorder() = 0;
00085         virtual void destroy() = 0;
00086         virtual unsigned int getWidth() const = 0;
00087 };
00088 
00089 #endif
 All Classes Functions Variables Typedefs Friends