ToPS
|
00001 /* 00002 * PhasedFactorableModelEvaluationAlgorithm.hpp 00003 * 00004 * Copyright 2011 Andre Yoshiaki Kashiwabara <akashiwabara@usp.br> 00005 * Ígor Bonádio <ibonadio@ime.usp.br> 00006 * Vitor Onuchic <vitoronuchic@gmail.com> 00007 * Alan Mitchell Durham <aland@usp.br> 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 3 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00022 * MA 02110-1301, USA. 00023 */ 00024 00025 #ifndef PHASED_FACTORABLE_EVALUATION_ALGORITHM_H 00026 #define PHASED_FACTORABLE_EVALUATION_ALGORITHM_H 00027 00028 #include "crossplatform.hpp" 00029 00030 #include "EvaluationAlgorithm.hpp" 00031 #include "Sequence.hpp" 00032 #include "ProbabilisticModel.hpp" 00033 00034 #include <vector> 00035 #include <boost/shared_ptr.hpp> 00036 00037 namespace tops { 00038 00040 class DLLEXPORT PhasedFactorableModelEvaluationAlgorithm : public EvaluationAlgorithm { 00041 private: 00042 std::vector<DoubleVector> _alpha; 00043 std::vector<DoubleVector> _precision; 00044 int _phase; 00045 public: 00046 PhasedFactorableModelEvaluationAlgorithm() {}; 00047 virtual ~PhasedFactorableModelEvaluationAlgorithm(){}; 00048 virtual double compute(int begin, int end) const; 00049 virtual double compute(int begin, int end, int phase) const; 00050 virtual void initialize(const Sequence & s, const ProbabilisticModel *m) ; 00051 virtual void initialize(const Sequence & s, const ProbabilisticModel *m, int phase); 00052 }; 00053 typedef boost::shared_ptr <PhasedFactorableModelEvaluationAlgorithm> PhasedFactorableModelEvaluationAlgorithmPtr; 00054 00055 } 00056 #endif