Biorithm  1.1
 All Classes Functions Variables Typedefs Friends
BSEvaluator.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 BSEVALUATOR_H
00032 #define BSEVALUATOR_H
00033 
00034 // ---------------------------- Internal Headers ---------------------------- //
00035 
00036 #include "Evaluator.h"
00037 #include <cmath>
00038 #include <boost/math/special_functions/round.hpp>
00039 using namespace std;
00040 
00041 #define DOUBLE_PRECISION 0.001
00042 
00048 class BSEvaluator: public Evaluator
00049 {
00050     protected:
00051         // The balance
00052         double balance;
00053 
00054         // The support
00055         double support;
00056 
00057         // The row set requirement
00058         unsigned int rsreq;
00059 
00060         // The upper bound for the matrix
00061         unsigned int upperBound;
00062 
00063     public:
00064         BSEvaluator(float balance = 0.5, float support = 1.0,
00065             BinaryMatrix* bm = NULL);
00066         BSEvaluator(const BSEvaluator& rhs);
00067         virtual ~BSEvaluator();
00068         virtual BSEvaluator& operator =(const BSEvaluator& rhs);
00069         virtual bool badBalance() const;
00070         virtual unsigned int getMinRowset() const;
00071         virtual void setBinaryMatrix(BinaryMatrix* bm);
00072         virtual unsigned int getUpperBound(const vector<unsigned int>& counts)
00073             const;
00074         virtual unsigned int getUpperBound() const;
00075 };
00076 
00077 #endif
 All Classes Functions Variables Typedefs Friends