Biorithm  1.1
 All Classes Functions Variables Typedefs Friends
TopKMiner.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 TOPKMINER_H
00032 #define TOPKMINER_H
00033 
00034 #define MODE_TOPK_NULL   0
00035 #define MODE_TOPK_NORMAL 1
00036 
00037 // ---------------------------- Internal Headers ---------------------------- //
00038 
00039 #include "BSEvaluator.h"
00040 #include "LatticeMiner.h"
00041 
00049 class TopKMiner: public LatticeMiner
00050 {
00051     protected:
00052         // The evaluator
00053         BSEvaluator* bse;
00054 
00055         // The target level
00056         unsigned int k;
00057 
00058         // How many we are trying to show at the top
00059         unsigned int size;
00060 
00061         // The mode
00062         int mode;
00063 
00064         // Helper methods
00065         virtual void analyzeHelper();
00066         virtual unsigned int analyzeLevel(unsigned int level);
00067         virtual void handlePrinting(unsigned int level);
00068         virtual void analyzeTopKNull();
00069         virtual void analyzeTopKNormal();
00070 
00071     public:
00072         TopKMiner(float balance = 0.5, float support = 1.0, unsigned int k = 1,
00073             unsigned int size = 100, unsigned int buffer_size = 1000,
00074             bool positive = false, BinaryMatrix* tm = NULL,
00075             int mode = MODE_TOPK_NULL);
00076         TopKMiner(const TopKMiner& src);
00077         virtual ~TopKMiner();
00078         virtual TopKMiner& operator =(const TopKMiner& rhs);
00079 };
00080 
00081 #endif
 All Classes Functions Variables Typedefs Friends