Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
cb447db0
Commit
cb447db0
authored
May 04, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7799b429
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+5
-2
No files found.
wcfs/internal/xbtree.py
View file @
cb447db0
...
@@ -194,14 +194,17 @@ def _keyvSliceBy(keyv, klo, khi):
...
@@ -194,14 +194,17 @@ def _keyvSliceBy(keyv, klo, khi):
assert
_keyvSorted
(
keyv
)
assert
_keyvSorted
(
keyv
)
return
list
([
k
for
k
in
keyv
if
(
klo
<=
k
<
khi
)])
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
# hi > lo
# XXX nsplit > ...
# XXX nsplit > ...
# lo <= si < hi
# lo <= si < hi
# si < s_{i+1}
# si < s_{i+1}
#
#
# XXX remove lo and hi from the output?
# 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
:
if
nsplit
==
0
:
yield
[
lo
,
hi
]
yield
[
lo
,
hi
]
return
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment