virtual void processNode(InternalNode &u) { int id=u.getID(); PhylogenyNode *left=u.getLeft(), *right=u.getRight(); NthOrdSubstMatrix &leftPt=*u.getLeftSubstMatrix(); NthOrdSubstMatrix &rightPt=*u.getRightSubstMatrix(); Array2D<double>::RowIn2DArray<double> row=L[id]; for(Symbol a=0 ; a<numAlpha ; ++a) { row[a]= processInternalChild(a,left,leftPt,&u)+ processInternalChild(a,right,rightPt,&u); } }
virtual void processNode(InternalNode &u) { int id=u.getID(); int left=u.getLeft()->getID(), right=u.getRight()->getID(); NthOrdSubstMatrix &leftPt=*u.getLeftSubstMatrix(); NthOrdSubstMatrix &rightPt=*u.getRightSubstMatrix(); Array2D<double>::RowIn2DArray<double> row=L[id]; for(Symbol a=0 ; a<numAlpha ; ++a) { if(gapSymbols.isMember(a)) continue; row[a]= processInternalChild(a,left,leftPt,0,0)+ processInternalChild(a,right,rightPt,0,0); } }
virtual void processNode(InternalNode &u) { int id=u.getID(); Array2D<double>::RowIn2DArray<double> row=L[id]; int left=u.getLeft()->getID(), right=u.getRight()->getID(); NthOrdSubstMatrix &leftPt=*u.getLeftSubstMatrix(); NthOrdSubstMatrix &rightPt=*u.getRightSubstMatrix(); Sequence nmer; for(int i=0 ; i<numNmers ; ++i) { nmer.fromInt(i,numCols,alphabetMap); row[i]= processInternalChild(nmer,left,leftPt)+ processInternalChild(nmer,right,rightPt); } }
virtual void processNode(InternalNode &u) { int id=u.getID(); NthOrdSubstMatrix &leftPt=*u.getLeftSubstMatrix(); NthOrdSubstMatrix &rightPt=*u.getRightSubstMatrix(); int left=u.getLeft()->getID(), right=u.getRight()->getID(); Array2D<double>::RowIn2DArray<double> row=L[id]; Symbol a=A.getIthTrack(id)[column]; if(gapSymbols.isMember(a)) for(a=0 ; a<numAlpha ; ++a) { if(gapSymbols.isMember(a)) continue; row[a]= processInternalChild(a,id,left,leftPt)+ processInternalChild(a,id,right,rightPt); } else { for(Symbol b=0 ; b<numAlpha ; ++b) row[b]=NEGATIVE_INFINITY; double l=processInternalChild(a,id,left,leftPt); double r=processInternalChild(a,id,right,rightPt); row[a]=l+r; } }