Commit cb447db0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7799b429
......@@ -194,14 +194,17 @@ def _keyvSliceBy(keyv, klo, khi):
assert _keyvSorted(keyv)
return list([k for k in keyv if (klo <= k < khi)])
# iterSplitByN iterates through all nsplit splitting of [lo, hi) range.
# _iterSplitByN iterates through all nsplit splitting of [lo, hi) range.
# hi > lo
# XXX nsplit > ...
# lo <= si < hi
# si < s_{i+1}
#
# XXX remove lo and hi from the output?
def iterSplitByN(lo, hi, nsplit): # -> [] of [lo, s1, s2, ..., sn, hi)
def _iterSplitByN(lo, hi, nsplit): # -> [] of [lo, s1, s2, ..., sn, hi)
assert lo <= hi
assert nsplit >= 0
if nsplit == 0:
yield [lo, hi]
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment