MCPcopy Create free account
hub / github.com/ablab/spades / operator|=

Method operator|=

ext/include/llvm/ADT/SparseBitVector.h:557–584  ·  view source on GitHub ↗

Union our bitmap with the RHS and return true if we changed.

Source from the content-addressed store, hash-verified

555
556 // Union our bitmap with the RHS and return true if we changed.
557 bool operator|=(const SparseBitVector &RHS) {
558 if (this == &RHS)
559 return false;
560
561 bool changed = false;
562 ElementListIter Iter1 = Elements.begin();
563 ElementListConstIter Iter2 = RHS.Elements.begin();
564
565 // If RHS is empty, we are done
566 if (RHS.Elements.empty())
567 return false;
568
569 while (Iter2 != RHS.Elements.end()) {
570 if (Iter1 == Elements.end() || Iter1->index() > Iter2->index()) {
571 Elements.insert(Iter1, *Iter2);
572 ++Iter2;
573 changed = true;
574 } else if (Iter1->index() == Iter2->index()) {
575 changed |= Iter1->unionWith(*Iter2);
576 ++Iter1;
577 ++Iter2;
578 } else {
579 ++Iter1;
580 }
581 }
582 CurrElementIter = Elements.begin();
583 return changed;
584 }
585
586 // Intersect our bitmap with the RHS and return true if ours changed.
587 bool operator&=(const SparseBitVector &RHS) {

Callers 2

operator |=Function · 0.80
SmallBitVectorClass · 0.80

Calls 6

unionWithMethod · 0.80
beginMethod · 0.45
emptyMethod · 0.45
endMethod · 0.45
indexMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected