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
1dcd1f61
Commit
1dcd1f61
authored
Jun 23, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
96c28df2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
wcfs/δbtail.go
wcfs/δbtail.go
+7
-7
No files found.
wcfs/δbtail.go
View file @
1dcd1f61
...
...
@@ -532,13 +532,13 @@ func (rs rangeSplit) Get(k Key) *nodeInRange { // XXX -> Get_ -> rn, ok
// rnode must be initially in *prs.
// rnode.node must be tree.
// rnode.node must be aleady activated.
func
(
prs
*
range
Cover
)
Expand
(
rnode
*
nodeInRange
)
[]
*
nodeInRange
{
func
(
prs
*
range
Split
)
Expand
(
rnode
*
nodeInRange
)
[]
*
nodeInRange
{
rs
:=
*
prs
i
:=
sort
.
Search
(
len
(
rs
),
func
(
i
int
)
bool
{
return
rnode
.
hi_
<=
rs
[
i
]
.
hi_
})
if
i
==
len
(
rs
)
||
rs
[
i
]
!=
rnode
{
panicf
(
"%s not in range
Cover
"
,
rnode
)
panicf
(
"%s not in range
Split
"
,
rnode
)
}
// [i].Key ≤ [i].Child.*.Key < [i+1].Key i ∈ [0, len([]))
...
...
@@ -566,9 +566,9 @@ func (prs *rangeCover) Expand(rnode *nodeInRange) []*nodeInRange {
return
children
}
func
(
r
c
rangeCover
)
String
()
string
{
func
(
r
s
rangeSplit
)
String
()
string
{
s
:=
""
for
_
,
rn
:=
range
r
c
{
for
_
,
rn
:=
range
r
s
{
if
s
!=
""
{
s
+=
" "
}
...
...
@@ -698,14 +698,14 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
δ
=
map
[
Key
]
ΔValue
{}
defer
fmt
.
Printf
(
" -> δt: %v
\n
"
,
δ
)
var
av
range
Cover
var
bv
range
Cover
var
av
range
Split
var
bv
range
Split
// initial phase: expand changed nodes in a till buckets
// XXX maybe walk till a from root to get more precise initial range?
if
a
!=
nil
{
atop
:=
&
nodeInRange
{
lo
:
KeyMin
,
hi_
:
KeyMax
,
node
:
a
}
// [-∞, ∞)
av
=
range
Cover
{
atop
}
av
=
range
Split
{
atop
}
aq
:=
[]
*
nodeInRange
{
atop
}
// stack
for
len
(
aq
)
>
0
{
l
:=
len
(
aq
)
...
...
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