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
d3f4a457
Commit
d3f4a457
authored
Jun 07, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9ee64c92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+22
-22
No files found.
wcfs/internal/xbtree/δbtail_test.go
View file @
d3f4a457
...
@@ -536,7 +536,7 @@ func KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
...
@@ -536,7 +536,7 @@ func KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
kadj12
:=
_KAdj
(
t1
,
t2
,
keysv
...
)
kadj12
:=
_KAdj
(
t1
,
t2
,
keysv
...
)
kadj21
:=
_KAdj
(
t2
,
t1
,
keysv
...
)
kadj21
:=
_KAdj
(
t2
,
t1
,
keysv
...
)
if
!
reflect
.
DeepEqual
(
kadj12
,
kadj21
)
{
if
!
reflect
.
DeepEqual
(
kadj12
,
kadj21
)
{
panicf
(
"KAdj not symmetric:
\n
t1: %s
\
b
t2: %s
\n
kadj12: %v
\n
kadj21: %v"
,
panicf
(
"KAdj not symmetric:
\n
t1: %s
\
n
t2: %s
\n
kadj12: %v
\n
kadj21: %v"
,
t1
.
tree
,
t2
.
tree
,
kadj12
,
kadj21
)
t1
.
tree
,
t2
.
tree
,
kadj12
,
kadj21
)
}
}
return
kadj12
return
kadj12
...
@@ -686,7 +686,7 @@ func _KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
...
@@ -686,7 +686,7 @@ func _KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
q2
.
Clear
()
q2
.
Clear
()
}
}
adj
:=
SetKey
{};
adj
.
Add
(
k
);
adj
.
Update
(
adj1
);
adj
.
Update
(
adj2
)
adj
:=
SetKey
{};
adj
.
Add
(
k
);
adj
.
Update
(
adj1
);
adj
.
Update
(
adj2
)
// XXX kill Add(k)
kadj
[
k
]
=
adj
kadj
[
k
]
=
adj
}
}
...
@@ -1456,57 +1456,57 @@ func TestΔBTail(t *testing.T) {
...
@@ -1456,57 +1456,57 @@ func TestΔBTail(t *testing.T) {
// +1
// +1
Δ
(
"T/B1:a"
,
Δ
(
"T/B1:a"
,
A
{
1
:
K
(
1
),
A
{
1
:
K
(
1
,
oo
),
oo
:
K
(
1
,
oo
)}),
oo
:
K
(
1
,
oo
)}),
// +2
// +2
Δ
(
"T/B1:a,2:b"
,
Δ
(
"T/B1:a,2:b"
,
A
{
1
:
K
(
1
,
2
),
A
{
1
:
K
(
1
,
2
,
oo
),
2
:
K
(
1
,
2
),
2
:
K
(
1
,
2
,
oo
),
oo
:
K
(
1
,
2
,
oo
)}),
oo
:
K
(
1
,
2
,
oo
)}),
// -1
// -1
Δ
(
"T/B2:b"
,
Δ
(
"T/B2:b"
,
A
{
1
:
K
(
1
,
2
),
A
{
1
:
K
(
1
,
2
,
oo
),
2
:
K
(
1
,
2
),
2
:
K
(
1
,
2
,
oo
),
oo
:
K
(
1
,
2
,
oo
)}),
oo
:
K
(
1
,
2
,
oo
)}),
//*/
//*/
// 2: b->c
// 2: b->c
Δ
(
"T/B2:c"
,
Δ
(
"T/B2:c"
,
A
{
2
:
K
(
2
),
A
{
2
:
K
(
2
,
oo
),
oo
:
K
(
2
,
oo
)}),
oo
:
K
(
2
,
oo
)}),
// +1 in new bucket (to the left)
// +1 in new bucket (to the left)
Δ
(
"T2/B1:a-B2:c"
,
Δ
(
"T2/B1:a-B2:c"
,
A
{
1
:
K
(
1
,
2
),
A
{
1
:
K
(
1
,
2
,
oo
),
2
:
K
(
2
),
2
:
K
(
1
,
2
,
oo
),
oo
:
K
(
2
,
oo
)}),
// NOTE no ∞ -> 1, because 1 is added to the left
oo
:
K
(
1
,
2
,
oo
)}),
// +3 in new bucket (to the right)
// +3 in new bucket (to the right)
Δ
(
"T2,3/B1:a-B2:c-B3:c"
,
Δ
(
"T2,3/B1:a-B2:c-B3:c"
,
A
{
1
:
K
(
1
),
A
{
1
:
K
(
1
),
2
:
K
(
2
),
2
:
K
(
2
,
3
,
oo
),
3
:
K
(
2
,
3
),
3
:
K
(
2
,
3
,
oo
),
oo
:
K
(
2
,
3
,
oo
)}),
oo
:
K
(
2
,
3
,
oo
)}),
// bucket split; +3 in new bucket
// bucket split; +3 in new bucket
"T/B1:a,2:b"
,
"T/B1:a,2:b"
,
Δ
(
"T2/B1:a-B2:b,3:c"
,
Δ
(
"T2/B1:a-B2:b,3:c"
,
A
{
1
:
K
(
1
,
2
,
3
),
A
{
1
:
K
(
1
,
2
,
3
,
oo
),
2
:
K
(
1
,
2
,
3
),
2
:
K
(
1
,
2
,
3
,
oo
),
3
:
K
(
1
,
2
,
3
),
3
:
K
(
1
,
2
,
3
,
oo
),
oo
:
K
(
1
,
2
,
3
,
oo
)}),
oo
:
K
(
1
,
2
,
3
,
oo
)}),
// bucket split; +3 in new bucket; +4 +5 in another new bucket
// bucket split; +3 in new bucket; +4 +5 in another new bucket
//
which remain not tracked unless previously accessed.
//
everything becomes tracked because original bucket had [-∞,∞) coverage
"T/B1:a,2:b"
,
"T/B1:a,2:b"
,
Δ
(
"T2,4/B1:a-B2:b,3:c-B4:d,5:e"
,
Δ
(
"T2,4/B1:a-B2:b,3:c-B4:d,5:e"
,
A
{
1
:
K
(
1
,
2
,
3
),
A
{
1
:
K
(
1
,
2
,
3
,
4
,
5
,
oo
),
2
:
K
(
1
,
2
,
3
),
2
:
K
(
1
,
2
,
3
,
4
,
5
,
oo
),
3
:
K
(
1
,
2
,
3
),
3
:
K
(
1
,
2
,
3
,
4
,
5
,
oo
),
4
:
K
(
1
,
2
,
3
,
4
,
5
),
4
:
K
(
1
,
2
,
3
,
4
,
5
,
oo
),
5
:
K
(
1
,
2
,
3
,
4
,
5
),
5
:
K
(
1
,
2
,
3
,
4
,
5
,
oo
),
oo
:
K
(
1
,
2
,
3
,
4
,
5
,
oo
)}),
oo
:
K
(
1
,
2
,
3
,
4
,
5
,
oo
)}),
// reflow of keys: even if tracked={1}, changes to all B nodes need to be rescanned:
// reflow of keys: even if tracked={1}, changes to all B nodes need to be rescanned:
...
...
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