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
d5d1b9b3
Commit
d5d1b9b3
authored
Sep 30, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8c3b57c9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
9 deletions
+3
-9
wcfs/internal/xbtree/blib/rangemap.go.in
wcfs/internal/xbtree/blib/rangemap.go.in
+1
-3
wcfs/internal/xbtree/blib/zrangemap_str.go
wcfs/internal/xbtree/blib/zrangemap_str.go
+1
-3
wcfs/internal/xbtree/blib/zrangemap_void.go
wcfs/internal/xbtree/blib/zrangemap_void.go
+1
-3
No files found.
wcfs/internal/xbtree/blib/rangemap.go.in
View file @
d5d1b9b3
...
...
@@ -121,7 +121,7 @@ func (M *RangedMap) SetRange(r KeyRange, v VALUE) {
//
clear
range
for
r
and
insert
new
entry
//
TODO
optimize
for
same
-
value
/
set
case
(
just
merge
all
covered
//
entries
into
one
-
-
see
commented
AddRange
from
set
vvv
)
//
entries
into
one
-
see
commented
AddRange
from
set
vvv
)
i
:=
M
.
delRange
(
r
)
vInsert
(&
M
.
entryv
,
i
,
e
)
debugfRMap
(
"
\t
insert %s
\t
-> %s
\n
"
,
e
,
M
)
...
...
@@ -277,8 +277,6 @@ func (M *RangedMap) delRange(r KeyRange) (i int) {
return
0
}
//
XXX
if
jhi
-
ilo
==
0
{
return
"non-overlap"
}
?
//
[
ilo
+
1
:
jhi
-
1
]
should
be
deleted
//
[
ilo
]
and
[
jhi
-
1
]
overlap
with
[
r
.
lo
,
r
.
hi
)
-
they
should
be
deleted
,
or
shrinked
,
//
or
split
+
shrinked
if
ilo
==
jhi
-
1
and
r
is
inside
[
ilo
]
...
...
wcfs/internal/xbtree/blib/zrangemap_str.go
View file @
d5d1b9b3
...
...
@@ -123,7 +123,7 @@ func (M *_RangedMap_str) SetRange(r KeyRange, v string) {
// clear range for r and insert new entry
// TODO optimize for same-value/set case (just merge all covered
// entries into one -
-
see commented AddRange from set vvv)
// entries into one - see commented AddRange from set vvv)
i
:=
M
.
delRange
(
r
)
vInsert__RangedMap_str
(
&
M
.
entryv
,
i
,
e
)
debugf_RangedMap_str
(
"
\t
insert %s
\t
-> %s
\n
"
,
e
,
M
)
...
...
@@ -279,8 +279,6 @@ func (M *_RangedMap_str) delRange(r KeyRange) (i int) {
return
0
}
// XXX if jhi - ilo == 0 { return "non-overlap" } ?
// [ilo+1:jhi-1] should be deleted
// [ilo] and [jhi-1] overlap with [r.lo,r.hi) - they should be deleted, or shrinked,
// or split+shrinked if ilo==jhi-1 and r is inside [ilo]
...
...
wcfs/internal/xbtree/blib/zrangemap_void.go
View file @
d5d1b9b3
...
...
@@ -123,7 +123,7 @@ func (M *_RangedMap_void) SetRange(r KeyRange, v void) {
// clear range for r and insert new entry
// TODO optimize for same-value/set case (just merge all covered
// entries into one -
-
see commented AddRange from set vvv)
// entries into one - see commented AddRange from set vvv)
i
:=
M
.
delRange
(
r
)
vInsert__RangedMap_void
(
&
M
.
entryv
,
i
,
e
)
debugf_RangedMap_void
(
"
\t
insert %s
\t
-> %s
\n
"
,
e
,
M
)
...
...
@@ -279,8 +279,6 @@ func (M *_RangedMap_void) delRange(r KeyRange) (i int) {
return
0
}
// XXX if jhi - ilo == 0 { return "non-overlap" } ?
// [ilo+1:jhi-1] should be deleted
// [ilo] and [jhi-1] overlap with [r.lo,r.hi) - they should be deleted, or shrinked,
// or split+shrinked if ilo==jhi-1 and r is inside [ilo]
...
...
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