From 5dc30552ddd5d3ced1ceed5735f060350837b2f8 Mon Sep 17 00:00:00 2001 From: wcancino Date: Tue, 24 Feb 2009 10:36:30 +0000 Subject: [PATCH] New version; synchronize in repository git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1461 331e1502-861f-0410-8da2-ba01fb791d7f --- contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp | 5 +++-- contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_eval.h | 3 +++ contribution/branches/PhyloMOEA/PhyloMOEA/phylotreeIND.cpp | 2 ++ contribution/branches/PhyloMOEA/PhyloMOEA/utils.cpp | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp index 2db46165a..ce309f1b2 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp @@ -31,7 +31,7 @@ unsigned int ngenerations, popsize, ncats; ofstream exp_data,evolution_data, best_media_scores, final_trees, final_pareto_trees, clades_pareto, clades_final,final_scores,pareto_scores; LikelihoodCalculator *lik_calc_ptr; phylotreeIND *templatetree_ptr; - +ProbMatrixContainer *probmatrixs_ptr; int main(int argc, char *argv[]) { @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) if( datafile.size()==0 ) { - if(getNodeRank()==1) parser.printHelp( cout ); + if(getNodeRank()==1) parser.printHelp( cout ); return(-1); } @@ -88,6 +88,7 @@ int main(int argc, char *argv[]) modelHKY.init(); modelHKY.set_kappa(kappa); ProbMatrixContainer probmatrixs(modelHKY); + probmatrixs_ptr = &probmatrixs; LikelihoodCalculator lik_calc(templatetree, modelHKY, probmatrixs,ncats); lik_calc.set_alpha(alpha); modelHKY.init(); diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_eval.h b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_eval.h index 5c3c88b2f..4181d7588 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_eval.h +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_eval.h @@ -26,6 +26,8 @@ //#include #include +extern ProbMatrixContainer *probmatrixs_ptr; + class PhyloEval : public moeoEvalFunc < PhyloMOEO > { public: @@ -47,6 +49,7 @@ public: objVec[0] = parseval.fitch(); objVec[1] = -likeval.calculate_likelihood(); _sol.objectiveVector(objVec); + probmatrixs_ptr->clear(); //} } diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/phylotreeIND.cpp b/contribution/branches/PhyloMOEA/PhyloMOEA/phylotreeIND.cpp index f4022d05f..6f9353931 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/phylotreeIND.cpp +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/phylotreeIND.cpp @@ -1556,6 +1556,7 @@ void phylotreeIND::read_newick2(string newickstring) if( read_taxonname_bl(newickstring, taxon_name, blen, pos) == -1) { cout << "sintax error in position " << pos << endl; + cout << newickstring << endl; throw ExceptionManager(11); exit(1); } @@ -1594,6 +1595,7 @@ void phylotreeIND::read_newick2(string newickstring) if(read_taxonname_bl(newickstring, taxon_name, blen, pos) == -1) { cout << "sintax error at position " << pos << endl; + cout << newickstring << endl; exit(1); } diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/utils.cpp b/contribution/branches/PhyloMOEA/PhyloMOEA/utils.cpp index fa3eda77a..1c4390695 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/utils.cpp +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/utils.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -88,6 +89,7 @@ void optimize_solutions( eoPop &pop) void optimize_solution( PhyloMOEO &indi) { + cout << "\noptimizaing tree in node " << getNodeRank() << endl; phylotreeIND &sol = indi.get_tree(); lik_calc_ptr->set_tree(sol); //cout << "\noptimizaing tree " << i+1 << " of " << n;