Biorithm  1.1
 All Classes Functions Variables Typedefs Friends
DualMiner.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 DUALMINER_H
00032 #define DUALMINER_H
00033 
00034 #define MODE_DUAL_NULL     0
00035 #define MODE_DUAL_KK       1
00036 #define MODE_DUAL_IMPROVED 2
00037 
00038 // ---------------------------- Internal Headers ---------------------------- //
00039 
00040 #include "BSEvaluator.h"
00041 #include "LatticeMiner.h"
00042 #include "PatternBounder.h"
00043 
00051 class DualMiner: public LatticeMiner
00052 {
00053     protected:
00054         // The evaluator
00055         BSEvaluator* bse;
00056 
00057         // The mode
00058         int mode;
00059 
00060         // Helper methods
00061         virtual void analyzeHelper();
00062         virtual void analyzeLevels(unsigned int bot, unsigned int top,
00063             const PatternBounder* pb);
00064         virtual unsigned int analyzeLevel(unsigned int level);
00065         virtual void handlePrinting(unsigned int level);
00066         virtual double scoreLevel(unsigned int level, unsigned int bot,
00067             unsigned int top, const PatternBounder* pb) const;
00068 
00069     public:
00070         DualMiner(float balance = 0.5, float support = 1.0,
00071             unsigned int buffer_size = 1000, bool positive = false,
00072             BinaryMatrix* tm = NULL, int mode = MODE_DUAL_NULL);
00073         DualMiner(const DualMiner& src);
00074         virtual ~DualMiner();
00075         virtual DualMiner& operator =(const DualMiner& rhs);
00076 };
00077 
00078 #endif
 All Classes Functions Variables Typedefs Friends