Home | History | Annotate | Download | only in ADT

Lines Matching refs:stop

28 // value. The interval bounds are accessible through the start() and stop()
52 // KeyT stop() const;
75 // const KeyT &stop() const;
553 // - Traits::stopLess(start(i), stop(i)) - Non-empty, sane intervals.
555 // - Traits::stopLess(stop(i), start(i + 1) - Sorted.
557 // - value(i) != value(i + 1) || !Traits::adjacent(stop(i), start(i + 1))
566 const KeyT &stop(unsigned i) const { return this->first[i].second; }
570 KeyT &stop(unsigned i) { return this->first[i].second; }
577 /// @return First index with !stopLess(key[i].stop, x), or size.
581 assert((i == 0 || Traits::stopLess(stop(i - 1), x)) &&
583 while (i != Size && Traits::stopLess(stop(i), x)) ++i;
592 /// @return First index with !stopLess(key[i].stop, x), never size.
596 assert((i == 0 || Traits::stopLess(stop(i - 1), x)) &&
598 while (Traits::stopLess(stop(i), x)) ++i;
622 /// @param b Interval stop.
633 assert((i == 0 || Traits::stopLess(stop(i - 1), a)));
634 assert((i == Size || !Traits::stopLess(stop(i), a)));
638 if (i && value(i - 1) == y && Traits::adjacent(stop(i - 1), a)) {
642 stop(i - 1) = stop(i);
646 stop(i - 1) = b;
657 stop(i) = b;
675 stop(i) = b;
686 // The key array in a branch node holds the rightmost stop key of each subtree.
687 // It is redundant to store the last stop key since it can be found in the
702 const KeyT &stop(unsigned i) const { return this->second[i]; }
705 KeyT &stop(unsigned i) { return this->second[i]; }
716 assert((i == 0 || Traits::stopLess(stop(i - 1), x)) &&
718 while (i != Size && Traits::stopLess(stop(i), x)) ++i;
730 assert((i == 0 || Traits::stopLess(stop(i - 1), x)) &&
732 while (Traits::stopLess(stop(i), x)) ++i;
744 /// insert - Insert a new (subtree, stop) pair.
748 /// @param Stop Last key in subtree.
749 void insert(unsigned i, unsigned Size, NodeRef Node, KeyT Stop) {
754 stop(i) = Stop;
1068 /// stop - Return the largest mapped key in a non-empty map.
1069 KeyT stop() const {
1070 assert(!empty() && "Empty IntervalMap has no stop");
1071 return !branched() ? rootLeaf().stop(rootSize - 1) :
1072 rootBranch().stop(rootSize - 1);
1077 if (empty() || Traits::startLess(x, start()) || Traits::stopLess(stop(), x))
1188 rootBranch().stop(n) = node[n].template get<Leaf>().stop(size[n]-1);
1227 rootBranch().stop(n) = Node[n].template get<Branch>().stop(Size[n]-1);
1326 /// unsafeStop - Writable access to stop() for iterator.
1329 return branched() ? path.leaf<Leaf>().stop(path.leafOffset()) :
1330 path.leaf<RootLeaf>().stop(path.leafOffset());
1357 /// stop - Return the end of the current interval.
1358 const KeyT &stop() const { return unsafeStop(); }
1421 /// find - Move to the first interval with stop >= x, or end().
1430 /// advanceTo - Move to the first interval with stop >= x, or end().
1474 if (!Traits::stopLess(path.leaf<Leaf>().stop(path.leafSize() - 1), x)) {
1485 if (!Traits::stopLess(path.node<Branch>(l).stop(path.offset(l)), x)) {
1494 if (!Traits::stopLess(map->rootBranch().stop(path.offset(0)), x)) {
1518 void setNodeStop(unsigned Level, KeyT Stop);
1519 bool insertNode(unsigned Level, IntervalMapImpl::NodeRef Node, KeyT Stop);
1525 bool canCoalesceRight(KeyT Stop, ValT x);
1538 /// @param b New stop key, must not overlap the following interval.
1555 /// @param b New stop key.
1611 Traits::adjacent(Node.stop(i-1), Start);
1616 return Node.value(i-1) == Value && Traits::adjacent(Node.stop(i-1), Start);
1620 return Node.value(i) == Value && Traits::adjacent(Node.stop(i), Start);
1626 /// changing stop or value?
1627 /// @param Stop New stop of current interval.
1632 iterator::canCoalesceRight(KeyT Stop, ValT Value) {
1640 return Node.value(i) == Value && Traits::adjacent(Stop, Node.start(i));
1645 return Node.value(i) == Value && Traits::adjacent(Stop, Node.start(i));
1648 return Node.value(0) == Value && Traits::adjacent(Stop, Node.start(0));
1653 /// setNodeStop - Update the stop key of the current node at level and above.
1656 iterator::setNodeStop(unsigned Level, KeyT Stop) {
1663 P.node<Branch>(Level).stop(P.offset(Level)) = Stop;
1668 P.node<RootBranch>(Level).stop(P.offset(Level)) = Stop;
1674 assert(Traits::nonEmpty(a, this->stop()) && "Cannot move start beyond stop");
1690 assert(Traits::nonEmpty(this->start(), b) && "Cannot move stop beyond start");
1691 if (Traits::startLess(b, this->stop()) ||
1706 if (canCoalesceRight(this->stop(), x)) {
1723 /// @param Stop The last index in the new node.
1727 iterator::insertNode(unsigned Level, IntervalMapImpl::NodeRef Node, KeyT Stop) {
1736 IM.rootBranch().insert(P.offset(0), IM.rootSize, Node, Stop);
1761 P.node<Branch>(Level).insert(P.offset(Level), P.size(Level), Node, Stop);
1764 setNodeStop(Level, Stop);
1811 Traits::adjacent(SibLeaf.stop(SibOfs), a)) {
1814 // 1. Extend SibLeaf.stop to b and be done, or
1822 setNodeStop(P.height(), SibLeaf.stop(SibOfs) = b);
1893 // When we erase the last entry, update stop and move to a legal position.
1895 setNodeStop(IM.height, Node.stop(NewSize - 1));
1933 // If we removed the last branch, update stop and move to a legal pos.
1935 setNodeStop(Level, Parent.stop(NewSize - 1));
2009 KeyT Stop = Node[Pos]->stop(NewSize[Pos]-1);
2011 SplitRoot = insertNode(Level, NodeRef(Node[Pos], NewSize[Pos]), Stop);
2015 setNodeStop(Level, Stop);
2063 if (Traits::stopLess(posA.stop(), posB.start())) {
2066 if (!posA.valid() || !Traits::stopLess(posB.stop(), posA.start()))
2068 } else if (Traits::stopLess(posB.stop(), posA.start())) {
2071 if (!posB.valid() || !Traits::stopLess(posA.stop(), posB.start()))
2080 if (!posA.valid() || !Traits::stopLess(posB.stop(), posA.start()))
2084 if (!posB.valid() || !Traits::stopLess(posA.stop(), posB.start()))
2113 /// stop - End of the overlapping interval.
2114 KeyType stop() const {
2115 KeyType ak = a().stop();
2116 KeyType bk = b().stop();
2135 if (Traits::startLess(posB.stop(), posA.stop()))
2143 /// stopLess(x, stop()).
2148 if (Traits::stopLess(posA.stop(), x))
2150 if (Traits::stopLess(posB.stop(), x))