1 /*************************************************************************** 2 * Copyright (C) 2009 by BUI Quang Minh * 3 * minh.bui@univie.ac.at * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 ***************************************************************************/ 20 #ifndef TINATREE_H 21 #define TINATREE_H 22 23 #include "phylotree.h" 24 25 /** 26 @author BUI Quang Minh <minh.bui@univie.ac.at> 27 */ 28 class TinaTree : public PhyloTree 29 { 30 public: 31 TinaTree(); 32 /** 33 * Constructor with given alignment 34 * @param alignment 35 */ 36 TinaTree(Alignment *alignment); 37 38 ~TinaTree(); 39 /** 40 SLOW VERSION: compute the parsimony score of the tree, given the alignment 41 @return the parsimony score 42 */ 43 int computeParsimonyScore(); 44 45 /** 46 SLOW VERSION: compute the parsimony score of the tree, given the alignment 47 @return the parsimony score 48 @param node the current node 49 @param dad dad of the node, used to direct the search 50 @param ptn pattern ID 51 @param states set of admissible states at the current node (in binary code) 52 */ 53 int computeParsimonyScore(int ptn, int &states, PhyloNode *node = NULL, PhyloNode *dad = NULL); 54 55 virtual void initializeAllPartialLh(); 56 57 virtual void initializeAllPartialLh(int &index, int &indexlh, PhyloNode *node = NULL, PhyloNode *dad = NULL); 58 59 }; 60 61 #endif 62