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
2310a8d0
Commit
2310a8d0
authored
Jun 07, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e3d1d90e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
78 deletions
+1
-78
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+1
-78
No files found.
wcfs/internal/xbtree/δbtail_test.go
View file @
2310a8d0
...
@@ -300,20 +300,6 @@ func (rbs RBucketSet) coverage() string {
...
@@ -300,20 +300,6 @@ func (rbs RBucketSet) coverage() string {
return
s
return
s
}
}
/* XXX kill
// holeIdx returns what should be ΔBtree.holeIdx for specified tracked key set.
func (rbs RBucketSet) holeIdx(tracked SetKey) SetKey {
holes := SetKey{}
for k := range tracked {
_, keyin := rbs.Get(k).kv[k]
if !keyin {
holes.Add(k)
}
}
return holes
}
*/
// trackSet returns what should be ΔBtree.trackSet for specified tracked key set.
// trackSet returns what should be ΔBtree.trackSet for specified tracked key set.
func
(
rbs
RBucketSet
)
trackSet
(
tracked
SetKey
)
PPTreeSubSet
{
func
(
rbs
RBucketSet
)
trackSet
(
tracked
SetKey
)
PPTreeSubSet
{
trackSet
:=
PPTreeSubSet
{}
trackSet
:=
PPTreeSubSet
{}
...
@@ -541,69 +527,6 @@ func KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
...
@@ -541,69 +527,6 @@ func KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
return
kadj12
return
kadj12
}
}
// XXX kill after holeIdx removal
func
_KAdj_old
(
t1
,
t2
*
tTreeCommit
,
keysv
...
SetKey
)
(
kadj
KAdjMatrix
)
{
var
keys
SetKey
switch
len
(
keysv
)
{
case
0
:
keys
=
allTestKeys
(
t1
,
t2
)
case
1
:
keys
=
keysv
[
0
]
default
:
panic
(
"multiple key sets on the call"
)
}
// kadj = {} k -> adjacent keys.
// if k is tracked -> changes to adjacents must be in Update(t1->t2).
kadj
=
KAdjMatrix
{}
for
k
:=
range
keys
{
adj1
:=
SetKey
{}
adj2
:=
SetKey
{}
q1
:=
[]
Key
{
k
}
q2
:=
[]
Key
{
k
}
//tracef("\n")
for
len
(
q1
)
>
0
||
len
(
q2
)
>
0
{
//tracef("q1: %v\n", q1)
//tracef("q2: %v\n", q2)
if
l1
:=
len
(
q1
);
l1
>
0
{
k1
:=
q1
[
l1
-
1
];
q1
=
q1
[
:
l1
-
1
]
if
!
adj1
.
Has
(
k1
)
{
for
k_
:=
range
t1
.
xkv
.
Get
(
k1
)
.
kv
{
adj1
.
Add
(
k_
)
for
k__
:=
range
t2
.
xkv
.
Get
(
k_
)
.
kv
{
if
!
adj2
.
Has
(
k__
)
{
q2
=
append
(
q2
,
k__
)
}
}
}
}
}
if
l2
:=
len
(
q2
);
l2
>
0
{
k2
:=
q2
[
l2
-
1
];
q2
=
q2
[
:
l2
-
1
]
if
!
adj2
.
Has
(
k2
)
{
for
k_
:=
range
t2
.
xkv
.
Get
(
k2
)
.
kv
{
adj2
.
Add
(
k_
)
for
k__
:=
range
t1
.
xkv
.
Get
(
k_
)
.
kv
{
if
!
adj1
.
Has
(
k__
)
{
q1
=
append
(
q1
,
k__
)
}
}
}
}
}
}
adj
:=
SetKey
{};
adj
.
Add
(
k
);
adj
.
Update
(
adj1
);
adj
.
Update
(
adj2
)
kadj
[
k
]
=
adj
}
return
kadj
}
const
debugKAdj
=
false
const
debugKAdj
=
false
func
debugfKAdj
(
format
string
,
argv
...
interface
{})
{
func
debugfKAdj
(
format
string
,
argv
...
interface
{})
{
if
debugKAdj
{
if
debugKAdj
{
...
@@ -705,7 +628,7 @@ func _KAdj(t1, t2 *tTreeCommit, keysv ...SetKey) (kadj KAdjMatrix) {
...
@@ -705,7 +628,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
)
// XXX kill Add(k
)
adj
:=
SetKey
{};
adj
.
Update
(
adj1
);
adj
.
Update
(
adj2
)
kadj
[
k
]
=
adj
kadj
[
k
]
=
adj
}
}
...
...
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