本文整理汇总了C++中TopSegmentIteratorPtr::atEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ TopSegmentIteratorPtr::atEnd方法的具体用法?C++ TopSegmentIteratorPtr::atEnd怎么用?C++ TopSegmentIteratorPtr::atEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TopSegmentIteratorPtr
的用法示例。
在下文中一共展示了TopSegmentIteratorPtr::atEnd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createCallBack
void TopSegmentSimpleIteratorTest::createCallBack(Alignment *alignment) {
Genome *ancGenome = alignment->addRootGenome("Anc0", 0);
size_t numChildren = 9;
for (size_t i = 0; i < numChildren; ++i) {
alignment->addLeafGenome("Leaf" + std::to_string(i), "Anc0", 0.1);
}
vector<Sequence::Info> seqVec(1);
seqVec[0] = Sequence::Info("Sequence", 1000000, 5000, 10000);
ancGenome->setDimensions(seqVec);
CuAssertTrue(_testCase, ancGenome->getNumChildren() == numChildren);
_topSegments.clear();
for (size_t i = 0; i < ancGenome->getNumTopSegments(); ++i) {
TopSegmentStruct topSeg;
topSeg.setRandom();
topSeg._length = ancGenome->getSequenceLength() / ancGenome->getNumTopSegments();
topSeg._startPosition = i * topSeg._length;
_topSegments.push_back(topSeg);
}
TopSegmentIteratorPtr tsIt = ancGenome->getTopSegmentIterator(0);
for (size_t i = 0; not tsIt->atEnd(); tsIt->toRight(), ++i) {
CuAssertTrue(_testCase, (size_t)tsIt->getTopSegment()->getArrayIndex() == i);
_topSegments[i].applyTo(tsIt);
}
}