Biorithm  1.1
 All Classes Functions Variables Typedefs Friends
LatticeMiner.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 LATTICEMINER_H
00032 #define LATTICEMINER_H
00033 
00034 // ---------------------------- Internal Headers ---------------------------- //
00035 
00036 #include "Lattice.h"
00037 #include "Miner.h"
00038 
00044 class LatticeMiner: public Miner
00045 {
00046     protected:
00047         // The lattice
00048         Lattice* lattice;
00049 
00050         // The evaluator
00051         Evaluator* evaluator;
00052 
00053         // Helper methods
00054 
00056         // Sets the evaluator                                                 //
00057         //                                                                    //
00058         // --------------------------- Parameters --------------------------- //
00059         // Evaluator* evaluator                                               //
00060         //     The new evaluator                                              //
00062         virtual void setEvaluator(Evaluator* evaluator)
00063         {
00064             this->evaluator = evaluator;
00065             lattice->setEvaluator(evaluator);
00066         }
00067 
00068     public:
00070         // Constructor                                                        //
00071         //                                                                    //
00072         // --------------------------- Parameters --------------------------- //
00073         // TruthTable* tm                                                     //
00074         //     The truth table                                                //
00076         LatticeMiner(BinaryMatrix* tm = NULL, Evaluator* evaluator = NULL):
00077             Miner(tm)
00078         {
00079             this->evaluator = evaluator;
00080         }
00081 
00083         // The destructor                                                     //
00085         virtual ~LatticeMiner()
00086         {
00087 
00088         }
00089 
00091         // The = operator                                                     //
00092         //                                                                    //
00093         // --------------------------- Parameters --------------------------- //
00094         // const LatticeMiner& rhs                                            //
00095         //     The right hand side                                            //
00096         //                                                                    //
00097         // ----------------------------- Return ----------------------------- //
00098         // A copy of the Miner                                                //
00100         virtual LatticeMiner& operator =(const LatticeMiner& rhs)
00101         {
00102             lattice = rhs.lattice;
00103             evaluator = rhs.evaluator;
00104             return *this;
00105         };
00106 
00108         // Sets a truth matrix                                                //
00109         //                                                                    //
00110         // --------------------------- Parameters --------------------------- //
00111         // BinaryMatrix* bm                                                   //
00112         //     The truth matrix                                               //
00114 #include <iostream>
00115         virtual void setBinaryMatrix(BinaryMatrix* bm)
00116         {
00117             Miner::setBinaryMatrix(bm);
00118             lattice->setBinaryMatrix(bm);
00119         }
00120 
00122         // Sets the buffer size                                               //
00123         //                                                                    //
00124         // --------------------------- Parameters --------------------------- //
00125         // unsigned int bufferSize                                            //
00126         //     The buffer size                                                //
00128         virtual void setBufferSize(unsigned int bufferSize)
00129         {
00130             lattice->setBufferSize(bufferSize);
00131         }
00132 };
00133 
00134 #endif
 All Classes Functions Variables Typedefs Friends