本文整理汇总了C++中LeafNode::getID方法的典型用法代码示例。如果您正苦于以下问题:C++ LeafNode::getID方法的具体用法?C++ LeafNode::getID怎么用?C++ LeafNode::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeafNode
的用法示例。
在下文中一共展示了LeafNode::getID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processNode
virtual void processNode(LeafNode &u)
{
int id=u.getID();
Symbol a=alphabetMap(A.getIthTrack(id)[column]);
Array2D<double>::RowIn2DArray<double> row=L[id];
if(a==gap)
for(Symbol i=0 ; i<numAlpha; ++i)
row[i]=log1;// missing data -- same as Seipel & Haussler
else
for(Symbol i=0 ; i<numAlpha; ++i)
row[i]=(i==a ? log1 : log0);
}
示例2: processNode
virtual void processNode(LeafNode &u) // DO NOT CHANGE THIS FUNCTION
{
int id=u.getID();
Symbol a=A.getIthTrack(id)[column];
Array2D<double>::RowIn2DArray<double> row=L[id];
if(gapSymbols.isMember(a))
for(Symbol i=0 ; i<numAlpha; ++i)
row[i]=0; //=log(1); missing data -- same as Seipel & Haussler
else
for(Symbol i=0 ; i<numAlpha; ++i)
row[i]=(i==a ? 0 : NEGATIVE_INFINITY);
}
示例3: processNode
virtual void processNode(LeafNode &u) {
int id=u.getID();
Array2D<double>::RowIn2DArray<double> row=L[id];
Sequence &track=A.getIthTrack(id).getSeq();
Sequence leafNmer, nmer;
track.getSubsequence(firstCol,numCols,leafNmer);
if(MultSeqAlignment::rightmostGapPos(leafNmer,gapSymbols)>=0)
for(int i=0 ; i<numNmers ; ++i) {
nmer.fromInt(i,numCols,alphabetMap);
row[i]=
degenerateDnaMatch(nmer,leafNmer,gapSymbols) ? 0 :
NEGATIVE_INFINITY;
}
else {
row.setAllTo(NEGATIVE_INFINITY);
int index=leafNmer.asInt(alphabetMap);
row[index]=0;
}
}