本文整理汇总了C++中TopSegmentIteratorConstPtr::equals方法的典型用法代码示例。如果您正苦于以下问题:C++ TopSegmentIteratorConstPtr::equals方法的具体用法?C++ TopSegmentIteratorConstPtr::equals怎么用?C++ TopSegmentIteratorConstPtr::equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TopSegmentIteratorConstPtr
的用法示例。
在下文中一共展示了TopSegmentIteratorConstPtr::equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CuAssertTrue
void
GappedSegmentSimpleIteratorTest::checkCallBack(AlignmentConstPtr alignment)
{
const Genome* child = alignment->openGenome("child");
const Genome* parent = alignment->openGenome("parent");
GappedTopSegmentIteratorConstPtr gtsIt =
child->getGappedTopSegmentIterator(0, 9999999);
GappedBottomSegmentIteratorConstPtr gbsIt =
parent->getGappedBottomSegmentIterator(0, 0, 9999999);
GappedTopSegmentIteratorConstPtr gtsItRev =
child->getGappedTopSegmentIterator(0, 9999999);
gtsItRev->toReverse();
GappedBottomSegmentIteratorConstPtr gbsItRev =
parent->getGappedBottomSegmentIterator(0, 0, 9999999);
gbsItRev->toReverse();
for (size_t i = 0; i < child->getNumTopSegments(); ++i)
{
TopSegmentIteratorConstPtr tsIt = gtsIt->getLeft();
CuAssertTrue(_testCase, tsIt->equals(gtsIt->getRight()));
CuAssertTrue(_testCase,
(size_t)tsIt->getTopSegment()->getArrayIndex() == i);
gtsIt->toRight();
BottomSegmentIteratorConstPtr bsIt = gbsIt->getLeft();
CuAssertTrue(_testCase, bsIt->equals(gbsIt->getRight()));
CuAssertTrue(_testCase,
(size_t)bsIt->getBottomSegment()->getArrayIndex() == i);
gbsIt->toRight();
TopSegmentIteratorConstPtr tsItRev = gtsItRev->getLeft();
CuAssertTrue(_testCase, tsItRev->equals(gtsItRev->getRight()));
CuAssertTrue(_testCase,
(size_t)tsItRev->getTopSegment()->getArrayIndex() == i);
gtsItRev->toLeft();
BottomSegmentIteratorConstPtr bsItRev = gbsItRev->getLeft();
CuAssertTrue(_testCase, bsItRev->equals(gbsItRev->getRight()));
CuAssertTrue(_testCase,
(size_t)bsItRev->getBottomSegment()->getArrayIndex() == i);
gbsItRev->toLeft();
}
gtsIt = child->getGappedTopSegmentIterator(
child->getNumTopSegments() - 1, 9999999);
gbsIt = parent->getGappedBottomSegmentIterator(
child->getNumTopSegments() - 1, 0, 9999999);
gtsItRev = child->getGappedTopSegmentIterator(
child->getNumTopSegments() - 1, 9999999);
gtsItRev->toReverse();
gbsItRev = parent->getGappedBottomSegmentIterator(
child->getNumTopSegments() - 1, 0, 9999999);
gbsItRev->toReverse();
for (hal_index_t i = child->getNumTopSegments() - 1; i >= 0; --i)
{
TopSegmentIteratorConstPtr tsIt = gtsIt->getLeft();
CuAssertTrue(_testCase, tsIt->equals(gtsIt->getRight()));
CuAssertTrue(_testCase, tsIt->getTopSegment()->getArrayIndex() == i);
CuAssertTrue(_testCase, gtsIt->getReversed() == false);
gtsIt->toLeft();
BottomSegmentIteratorConstPtr bsIt = gbsIt->getLeft();
CuAssertTrue(_testCase, bsIt->equals(gbsIt->getRight()));
CuAssertTrue(_testCase, bsIt->getBottomSegment()->getArrayIndex() == i);
CuAssertTrue(_testCase, gbsIt->getReversed() == false);
gbsIt->toLeft();
TopSegmentIteratorConstPtr tsItRev = gtsItRev->getLeft();
CuAssertTrue(_testCase, tsItRev->equals(gtsItRev->getRight()));
CuAssertTrue(_testCase, tsItRev->getTopSegment()->getArrayIndex() == i);
CuAssertTrue(_testCase, gtsItRev->getReversed() == true);
gtsItRev->toRight();
BottomSegmentIteratorConstPtr bsItRev = gbsItRev->getLeft();
CuAssertTrue(_testCase, bsItRev->equals(gbsItRev->getRight()));
CuAssertTrue(_testCase, bsItRev->getBottomSegment()->getArrayIndex() == i);
CuAssertTrue(_testCase, gbsItRev->getReversed() == true);
gbsItRev->toRight();
}
}