本文整理汇总了C++中BottomSegmentIteratorPtr::equals方法的典型用法代码示例。如果您正苦于以下问题:C++ BottomSegmentIteratorPtr::equals方法的具体用法?C++ BottomSegmentIteratorPtr::equals怎么用?C++ BottomSegmentIteratorPtr::equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BottomSegmentIteratorPtr
的用法示例。
在下文中一共展示了BottomSegmentIteratorPtr::equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: compatible
//////////////////////////////////////////////////////////////////////////////
// INTERNAL METHODS
//////////////////////////////////////////////////////////////////////////////
bool GappedBottomSegmentIterator::compatible(BottomSegmentIteratorPtr leftBotSegIt,
BottomSegmentIteratorPtr rightBotSegIt) const {
assert(leftBotSegIt->bseg()->hasChild(_childIndex) && rightBotSegIt->bseg()->hasChild(_childIndex));
assert(leftBotSegIt->equals(rightBotSegIt) == false);
_leftChild->toChild(leftBotSegIt, _childIndex);
_rightChild->toChild(rightBotSegIt, _childIndex);
if (_leftChild->getTopSegment()->getParentReversed() != _rightChild->getTopSegment()->getParentReversed()) {
return false;
}
if (_leftChild->tseg()->hasNextParalogy() != _rightChild->tseg()->hasNextParalogy()) {
return false;
}
if ((!_leftChild->getReversed() && _leftChild->leftOf(_rightChild->getStartPosition()) == false) ||
(_leftChild->getReversed() && _leftChild->rightOf(_rightChild->getStartPosition()) == false)) {
return false;
}
if (leftBotSegIt->getBottomSegment()->getSequence() != rightBotSegIt->getBottomSegment()->getSequence() ||
_leftChild->getTopSegment()->getSequence() != _rightChild->getTopSegment()->getSequence()) {
return false;
}
while (true) {
assert(_leftChild->isLast() == false);
_leftChild->toRight();
if (_leftChild->tseg()->hasParent() == true || _leftChild->getLength() > _gapThreshold) {
if (_leftChild->equals(_rightChild)) {
break;
} else {
return false;
}
}
}
_leftChild->toChild(leftBotSegIt, _childIndex);
_rightChild->toChild(rightBotSegIt, _childIndex);
if (_leftChild->tseg()->hasNextParalogy() == true) {
_leftDup->copy(_leftChild);
_leftDup->toNextParalogy();
_rightDup->copy(_rightChild);
_rightDup->toNextParalogy();
if ((_leftDup->getReversed() == false && _leftDup->leftOf(_rightDup->getStartPosition()) == false) ||
(_leftDup->getReversed() == true && _rightDup->leftOf(_leftDup->getStartPosition()) == false)) {
return false;
}
if (_leftDup->getTopSegment()->getSequence() != _rightDup->getTopSegment()->getSequence()) {
return false;
}
while (true) {
assert(_leftDup->isLast() == false);
_leftDup->toRight();
if (_leftDup->tseg()->hasParent() == true || _leftDup->getLength() > _gapThreshold) {
if (_leftDup->equals(_rightDup)) {
break;
} else {
return false;
}
}
}
}
return true;
}