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
c0c2a901
Commit
c0c2a901
authored
Jun 07, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
34fda4fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+11
-11
No files found.
wcfs/internal/xbtree/δbtail_test.go
View file @
c0c2a901
...
...
@@ -616,10 +616,10 @@ func _KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
panic
(
"multiple key sets on the call"
)
}
tracef
(
"
\n\n
_KAdj
\n
"
)
tracef
(
"t1: %s
\n
"
,
t1
.
tree
)
tracef
(
"t2: %s
\n
"
,
t2
.
tree
)
tracef
(
"keys: %s
\n
"
,
keys
)
//
tracef("\n\n_KAdj\n")
//
tracef("t1: %s\n", t1.tree)
//
tracef("t2: %s\n", t2.tree)
//
tracef("keys: %s\n", keys)
// kadj = {} k -> adjacent keys.
// if k is tracked -> changes to adjacents must be in Update(t1->t2).
...
...
@@ -633,15 +633,15 @@ func _KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
done1
:=
&
RangedKeySet
{}
done2
:=
&
RangedKeySet
{}
tracef
(
"
\n
k%d
\n
"
,
k
)
//
tracef("\nk%d\n", k)
for
!
q1
.
Empty
()
||
!
q2
.
Empty
()
{
tracef
(
"q1: %s
\t
done1: %s
\n
"
,
q1
,
done1
)
tracef
(
"q2: %s
\t
done2: %s
\n
"
,
q2
,
done2
)
//
tracef("q1: %s\tdone1: %s\n", q1, done1)
//
tracef("q2: %s\tdone2: %s\n", q2, done2)
for
_
,
r1
:=
range
q1
.
AllRanges
()
{
lo1
:=
r1
.
lo
for
{
b1
:=
t1
.
xkv
.
Get
(
lo1
)
tracef
(
" b1: %s
\n
"
,
b1
)
//
tracef(" b1: %s\n", b1)
for
k_
:=
range
keys
{
if
b1
.
lo
<=
k_
&&
k_
<=
b1
.
hi_
{
adj1
.
Add
(
k_
)
...
...
@@ -654,7 +654,7 @@ func _KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
δq2
.
AddRange
(
b1r
)
δq2
.
DifferenceInplace
(
done2
)
q2
.
UnionInplace
(
δq2
)
tracef
(
"q2 += %s
\t
-> %s
\n
"
,
δq2
,
q2
)
//
tracef("q2 += %s\t-> %s\n", δq2, q2)
// continue with next right bucket until r1 coverage is complete
lo1
=
b1
.
hi_
+
1
...
...
@@ -669,7 +669,7 @@ func _KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
lo2
:=
r2
.
lo
for
{
b2
:=
t2
.
xkv
.
Get
(
lo2
)
tracef
(
" b2: %s
\n
"
,
b2
)
//
tracef(" b2: %s\n", b2)
for
k_
:=
range
keys
{
if
b2
.
lo
<=
k_
&&
k_
<=
b2
.
hi_
{
adj2
.
Add
(
k_
)
...
...
@@ -682,7 +682,7 @@ func _KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
δq1
.
AddRange
(
b2r
)
δq1
.
DifferenceInplace
(
done1
)
q1
.
UnionInplace
(
δq1
)
tracef
(
"q1 += %s
\t
-> %s
\n
"
,
δq1
,
q1
)
//
tracef("q1 += %s\t-> %s\n", δq1, q1)
// continue with next right bucket until r2 coverage is complete
lo2
=
b2
.
hi_
+
1
...
...
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