Skip to content

Commit 462a04e

Browse files
committed
add reverse bounded iterators
1 parent 7ddaac6 commit 462a04e

File tree

7 files changed

+369
-34
lines changed

7 files changed

+369
-34
lines changed

docs/index/index-k.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</head>
1313
<body><div class="entry">
1414
<div class="name">keys</div>
15-
<div class="occurrences"><a href="../xyz/hyperreal/btree/MemoryBPlusTree$Node.html" class="extype" name="xyz.hyperreal.btree.MemoryBPlusTree.Node">Node</a> </div>
15+
<div class="occurrences"><a href="../xyz/hyperreal/btree/BPlusTree.html" class="extype" name="xyz.hyperreal.btree.BPlusTree">BPlusTree</a> <a href="../xyz/hyperreal/btree/MemoryBPlusTree$Node.html" class="extype" name="xyz.hyperreal.btree.MemoryBPlusTree.Node">Node</a> </div>
1616
</div><div class="entry">
1717
<div class="name">keysIterator</div>
1818
<div class="occurrences"><a href="../xyz/hyperreal/btree/BPlusTree.html" class="extype" name="xyz.hyperreal.btree.BPlusTree">BPlusTree</a> </div>

docs/index/index-r.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@
2525
</div><div class="entry">
2626
<div class="name">removeLeaf</div>
2727
<div class="occurrences"><a href="../xyz/hyperreal/btree/BPlusTree.html" class="extype" name="xyz.hyperreal.btree.BPlusTree">BPlusTree</a> <a href="../xyz/hyperreal/btree/FileBPlusTree.html" class="extype" name="xyz.hyperreal.btree.FileBPlusTree">FileBPlusTree</a> <a href="../xyz/hyperreal/btree/MemoryBPlusTree.html" class="extype" name="xyz.hyperreal.btree.MemoryBPlusTree">MemoryBPlusTree</a> </div>
28+
</div><div class="entry">
29+
<div class="name">reverseBoundedIterator</div>
30+
<div class="occurrences"><a href="../xyz/hyperreal/btree/BPlusTree.html" class="extype" name="xyz.hyperreal.btree.BPlusTree">BPlusTree</a> </div>
31+
</div><div class="entry">
32+
<div class="name">reverseBoundedKeysIterator</div>
33+
<div class="occurrences"><a href="../xyz/hyperreal/btree/BPlusTree.html" class="extype" name="xyz.hyperreal.btree.BPlusTree">BPlusTree</a> </div>
34+
</div><div class="entry">
35+
<div class="name">reverseBoundedPositionIterator</div>
36+
<div class="occurrences"><a href="../xyz/hyperreal/btree/BPlusTree.html" class="extype" name="xyz.hyperreal.btree.BPlusTree">BPlusTree</a> </div>
37+
</div><div class="entry">
38+
<div class="name">reverseBoundedValuesIterator</div>
39+
<div class="occurrences"><a href="../xyz/hyperreal/btree/BPlusTree.html" class="extype" name="xyz.hyperreal.btree.BPlusTree">BPlusTree</a> </div>
2840
</div><div class="entry">
2941
<div class="name">reverseIterator</div>
3042
<div class="occurrences"><a href="../xyz/hyperreal/btree/BPlusTree.html" class="extype" name="xyz.hyperreal.btree.BPlusTree">BPlusTree</a> </div>

docs/xyz/hyperreal/btree/BPlusTree.html

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,23 @@ <h4 class="signature">
14051405
</a>
14061406
</span>
14071407
<p class="shortcomment cmt">Returns an iterator over all key/value pairs in the tree in ascending sorted key order.</p>
1408+
</li><li name="xyz.hyperreal.btree.BPlusTree#keys" visbl="pub" data-isabs="false" fullComment="no" group="Ungrouped">
1409+
<a id="keys:scala.collection.AbstractIterable[K]"></a>
1410+
<a id="keys:AbstractIterable[K]"></a>
1411+
<h4 class="signature">
1412+
<span class="modifier_kind">
1413+
<span class="modifier"></span>
1414+
<span class="kind">def</span>
1415+
</span>
1416+
<span class="symbol">
1417+
<span class="name">keys</span><span class="result">: <span class="extype" name="scala.collection.AbstractIterable">AbstractIterable</span>[<span class="extype" name="xyz.hyperreal.btree.BPlusTree.K">K</span>]</span>
1418+
</span>
1419+
</h4><span class="permalink">
1420+
<a href="../../../index.html#xyz.hyperreal.btree.BPlusTree@keys:scala.collection.AbstractIterable[K]" title="Permalink" target="_top">
1421+
<img src="../../../lib/permalink.png" alt="Permalink" />
1422+
</a>
1423+
</span>
1424+
<p class="shortcomment cmt">Returns a non-strict <code>Iterable</code> containing the keys in the tree.</p>
14081425
</li><li name="xyz.hyperreal.btree.BPlusTree#keysIterator" visbl="pub" data-isabs="false" fullComment="no" group="Ungrouped">
14091426
<a id="keysIterator:Iterator[K]"></a>
14101427
<a id="keysIterator:Iterator[K]"></a>
@@ -1897,6 +1914,78 @@ <h4 class="signature">
18971914
</span>
18981915
<p class="shortcomment cmt">Returns the node/index pair pointing to the location of the leaf node key preceding the one at <code>index</code> in <code>leaf</code>.</p><div class="fullcomment"><div class="comment cmt"><p>Returns the node/index pair pointing to the location of the leaf node key preceding the one at <code>index</code> in <code>leaf</code>.
18991916
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected </dd></dl></div>
1917+
</li><li name="xyz.hyperreal.btree.BPlusTree#reverseBoundedIterator" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
1918+
<a id="reverseBoundedIterator(bounds:(Symbol,K)*):Iterator[(K,V)]"></a>
1919+
<a id="reverseBoundedIterator((Symbol,K)*):Iterator[(K,V)]"></a>
1920+
<h4 class="signature">
1921+
<span class="modifier_kind">
1922+
<span class="modifier"></span>
1923+
<span class="kind">def</span>
1924+
</span>
1925+
<span class="symbol">
1926+
<span class="name">reverseBoundedIterator</span><span class="params">(<span name="bounds">bounds: (<span class="extype" name="scala.Symbol">Symbol</span>, <span class="extype" name="xyz.hyperreal.btree.BPlusTree.K">K</span>)*</span>)</span><span class="result">: <span class="extype" name="scala.Iterator">Iterator</span>[(<span class="extype" name="xyz.hyperreal.btree.BPlusTree.K">K</span>, <span class="extype" name="xyz.hyperreal.btree.BPlusTree.V">V</span>)]</span>
1927+
</span>
1928+
</h4><span class="permalink">
1929+
<a href="../../../index.html#xyz.hyperreal.btree.BPlusTree@reverseBoundedIterator(bounds:(Symbol,K)*):Iterator[(K,V)]" title="Permalink" target="_top">
1930+
<img src="../../../lib/permalink.png" alt="Permalink" />
1931+
</a>
1932+
</span>
1933+
<p class="shortcomment cmt">Returns a bounded iterator over a range of key/value pairs in the tree in descending sorted key order.</p><div class="fullcomment"><div class="comment cmt"><p>Returns a bounded iterator over a range of key/value pairs in the tree in descending sorted key order. The range of key/value pairs in the iterator is specified by <code>bounds</code>. <code>bounds</code> must contain one or two pairs where the first element in the pair is a symbol corresponding to the type of bound (i.e. '&lt;, '&lt;=, '&gt;, '&gt;=) and the second element is a key value.</p><p>An example of a reverse bounded iterator over all elements in a tree (with <code>String</code> keys) that will include all keys that sort greater than or equal to &quot;a&quot; and up to but not including &quot;e&quot;, iterated over in reverse order, is <code>reverseBoundedIterator( ('&gt;=, &quot;a&quot;), ('&lt;, &quot;e&quot;) )</code>.
1934+
</p></div></div>
1935+
</li><li name="xyz.hyperreal.btree.BPlusTree#reverseBoundedKeysIterator" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
1936+
<a id="reverseBoundedKeysIterator(bounds:(Symbol,K)*):Iterator[K]"></a>
1937+
<a id="reverseBoundedKeysIterator((Symbol,K)*):Iterator[K]"></a>
1938+
<h4 class="signature">
1939+
<span class="modifier_kind">
1940+
<span class="modifier"></span>
1941+
<span class="kind">def</span>
1942+
</span>
1943+
<span class="symbol">
1944+
<span class="name">reverseBoundedKeysIterator</span><span class="params">(<span name="bounds">bounds: (<span class="extype" name="scala.Symbol">Symbol</span>, <span class="extype" name="xyz.hyperreal.btree.BPlusTree.K">K</span>)*</span>)</span><span class="result">: <span class="extype" name="scala.collection.Iterator">Iterator</span>[<span class="extype" name="xyz.hyperreal.btree.BPlusTree.K">K</span>]</span>
1945+
</span>
1946+
</h4><span class="permalink">
1947+
<a href="../../../index.html#xyz.hyperreal.btree.BPlusTree@reverseBoundedKeysIterator(bounds:(Symbol,K)*):Iterator[K]" title="Permalink" target="_top">
1948+
<img src="../../../lib/permalink.png" alt="Permalink" />
1949+
</a>
1950+
</span>
1951+
<p class="shortcomment cmt">Returns a bounded iterator over a range of keys in the tree in descending sorted key order.</p><div class="fullcomment"><div class="comment cmt"><p>Returns a bounded iterator over a range of keys in the tree in descending sorted key order. The <code>bounds</code> parameter is the same as for <a href="#boundedIterator(bounds:(Symbol,K)*):Iterator[(K,V)]" class="extmbr" name="xyz.hyperreal.btree.BPlusTree#boundedIterator">boundedIterator</a>.
1952+
</p></div></div>
1953+
</li><li name="xyz.hyperreal.btree.BPlusTree#reverseBoundedPositionIterator" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped">
1954+
<a id="reverseBoundedPositionIterator(bounds:(Symbol,K)*):Iterator[(BPlusTree.this.N,Int)]"></a>
1955+
<a id="reverseBoundedPositionIterator((Symbol,K)*):Iterator[(N,Int)]"></a>
1956+
<h4 class="signature">
1957+
<span class="modifier_kind">
1958+
<span class="modifier"></span>
1959+
<span class="kind">def</span>
1960+
</span>
1961+
<span class="symbol">
1962+
<span class="name">reverseBoundedPositionIterator</span><span class="params">(<span name="bounds">bounds: (<span class="extype" name="scala.Symbol">Symbol</span>, <span class="extype" name="xyz.hyperreal.btree.BPlusTree.K">K</span>)*</span>)</span><span class="result">: <span class="extype" name="scala.Iterator">Iterator</span>[(<a href="#N" class="extmbr" name="xyz.hyperreal.btree.BPlusTree.N">N</a>, <span class="extype" name="scala.Int">Int</span>)]</span>
1963+
</span>
1964+
</h4><span class="permalink">
1965+
<a href="../../../index.html#xyz.hyperreal.btree.BPlusTree@reverseBoundedPositionIterator(bounds:(Symbol,K)*):Iterator[(BPlusTree.this.N,Int)]" title="Permalink" target="_top">
1966+
<img src="../../../lib/permalink.png" alt="Permalink" />
1967+
</a>
1968+
</span>
1969+
<p class="shortcomment cmt">Returns a bounded iterator over a range of key positions (node/index pairs) in the tree in descending sorted key order.</p><div class="fullcomment"><div class="comment cmt"><p>Returns a bounded iterator over a range of key positions (node/index pairs) in the tree in descending sorted key order. The <code>bounds</code> parameter is the same as for <a href="#boundedIterator(bounds:(Symbol,K)*):Iterator[(K,V)]" class="extmbr" name="xyz.hyperreal.btree.BPlusTree#boundedIterator">boundedIterator</a>.
1970+
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected </dd></dl></div>
1971+
</li><li name="xyz.hyperreal.btree.BPlusTree#reverseBoundedValuesIterator" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
1972+
<a id="reverseBoundedValuesIterator(bounds:(Symbol,K)*):Iterator[V]"></a>
1973+
<a id="reverseBoundedValuesIterator((Symbol,K)*):Iterator[V]"></a>
1974+
<h4 class="signature">
1975+
<span class="modifier_kind">
1976+
<span class="modifier"></span>
1977+
<span class="kind">def</span>
1978+
</span>
1979+
<span class="symbol">
1980+
<span class="name">reverseBoundedValuesIterator</span><span class="params">(<span name="bounds">bounds: (<span class="extype" name="scala.Symbol">Symbol</span>, <span class="extype" name="xyz.hyperreal.btree.BPlusTree.K">K</span>)*</span>)</span><span class="result">: <span class="extype" name="scala.collection.Iterator">Iterator</span>[<span class="extype" name="xyz.hyperreal.btree.BPlusTree.V">V</span>]</span>
1981+
</span>
1982+
</h4><span class="permalink">
1983+
<a href="../../../index.html#xyz.hyperreal.btree.BPlusTree@reverseBoundedValuesIterator(bounds:(Symbol,K)*):Iterator[V]" title="Permalink" target="_top">
1984+
<img src="../../../lib/permalink.png" alt="Permalink" />
1985+
</a>
1986+
</span>
1987+
<p class="shortcomment cmt">Returns a bounded iterator over a range of values in the tree in descending sorted key order.</p><div class="fullcomment"><div class="comment cmt"><p>Returns a bounded iterator over a range of values in the tree in descending sorted key order. The <code>bounds</code> parameter is the same as for <a href="#boundedIterator(bounds:(Symbol,K)*):Iterator[(K,V)]" class="extmbr" name="xyz.hyperreal.btree.BPlusTree#boundedIterator">boundedIterator</a>.
1988+
</p></div></div>
19001989
</li><li name="xyz.hyperreal.btree.BPlusTree#reverseIterator" visbl="pub" data-isabs="false" fullComment="no" group="Ungrouped">
19011990
<a id="reverseIterator:Iterator[(K,V)]"></a>
19021991
<a id="reverseIterator:Iterator[(K,V)]"></a>

0 commit comments

Comments
 (0)