// $Id: allTreesSeparateModel.cpp 962 2006-11-07 15:13:34Z privmane $ #include "definitions.h" #include "treeIt.h" #include "allTreesSeparateModel.h" #include "bblEMSeperate.h" #include #include #include "someUtil.h" using namespace std; #ifndef VERBOS #define VERBOS #endif allTreesSeparateModel::allTreesSeparateModel(){ _bestScore = VERYSMALL; } void allTreesSeparateModel::recursiveFind( const vector* sc, const vector* sp, const vector * weights, const int maxIterations, const MDOUBLE epsilon){ tree starT; vector ids; get3seqTreeAndIdLeftVec(&(*sc)[0],starT,ids); recursiveFind(starT,*sp,*sc,ids,weights,maxIterations,epsilon); } void allTreesSeparateModel::recursiveFind(tree et, const vector& sp, const vector& sc, vector idLeft, const vector * weights, const int maxIterations, const MDOUBLE epsilon) { if (idLeft.empty()) { //static int k=1; k++; MDOUBLE treeScore = evalTree(et,sp,sc,maxIterations,epsilon,weights); //LOG(5,<<"tree: "< _bestScore) { //LOG(5,<<"new Best score!"<& sp, const vector& sc, const int maxIterations, const MDOUBLE epsilon, const vector * weights) { MDOUBLE res = 0; vector tVec; for (int k=0; k < sc.size(); ++k ) tVec.push_back(et); bblEMSeperate bblemsep1(tVec,sc,sp,weights,maxIterations,epsilon); res = bblemsep1.getTreeLikelihood(); _treeVecTmp = tVec; return res; }