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
1a4b5673
Commit
1a4b5673
authored
May 12, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
333da094
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
wcfs/δbtail.go
wcfs/δbtail.go
+1
-1
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+15
-0
No files found.
wcfs/δbtail.go
View file @
1a4b5673
...
@@ -957,7 +957,7 @@ func (rs rangeSplit) Get_(k Key) (rnode *nodeInRange, ok bool) {
...
@@ -957,7 +957,7 @@ func (rs rangeSplit) Get_(k Key) (rnode *nodeInRange, ok bool) {
// rnode.node must be tree.
// rnode.node must be tree.
// rnode.node must be already activated.
// rnode.node must be already activated.
//
//
// inserted children
is also
returned for convenience.
// inserted children
are
returned for convenience.
func
(
prs
*
rangeSplit
)
Expand
(
rnode
*
nodeInRange
)
(
children
rangeSplit
)
{
func
(
prs
*
rangeSplit
)
Expand
(
rnode
*
nodeInRange
)
(
children
rangeSplit
)
{
rs
:=
*
prs
rs
:=
*
prs
i
:=
sort
.
Search
(
len
(
rs
),
func
(
i
int
)
bool
{
i
:=
sort
.
Search
(
len
(
rs
),
func
(
i
int
)
bool
{
...
...
wcfs/δbtail_test.go
View file @
1a4b5673
...
@@ -546,6 +546,10 @@ func xzgetBlkDataAt(db *zodb.DB, zblkOid zodb.Oid, at zodb.Tid) string {
...
@@ -546,6 +546,10 @@ func xzgetBlkDataAt(db *zodb.DB, zblkOid zodb.Oid, at zodb.Tid) string {
//
//
// i.e. = δ(Av, Bv) for k: k ∈ U kadj(A,B)[·]
// i.e. = δ(Av, Bv) for k: k ∈ U kadj(A,B)[·]
// ·∈T
// ·∈T
//
// XXX adjacency matrix is symmetric: XXX KAdj verifies this at runtime
//
// kadj(A,B) == kadj(B,A)
type
KAdjMatrix
map
[
Key
]
SetKey
type
KAdjMatrix
map
[
Key
]
SetKey
// Map returns kadj·keys .
// Map returns kadj·keys .
...
@@ -568,6 +572,17 @@ func (kadj KAdjMatrix) Map(keys SetKey) SetKey {
...
@@ -568,6 +572,17 @@ func (kadj KAdjMatrix) Map(keys SetKey) SetKey {
//
//
// KAdj itself is verified by testΔBTail on entries with .kadjOK set.
// KAdj itself is verified by testΔBTail on entries with .kadjOK set.
func
KAdj
(
t1
,
t2
*
tTreeCommit
,
keysv
...
SetKey
)
(
kadj
KAdjMatrix
)
{
func
KAdj
(
t1
,
t2
*
tTreeCommit
,
keysv
...
SetKey
)
(
kadj
KAdjMatrix
)
{
// XXX vvv verifies that KAdj(A,B) == KAdj(B,A)
kadj12
:=
_KAdj
(
t1
,
t2
,
keysv
...
)
kadj21
:=
_KAdj
(
t2
,
t1
,
keysv
...
)
if
!
reflect
.
DeepEqual
(
kadj12
,
kadj21
)
{
panicf
(
"KAdj not symmetric:
\n
t1: %s
\b
t2: %s
\n
kadj12: %v
\n
kadj21: %v"
,
t1
.
tree
,
t2
.
tree
,
kadj12
,
kadj21
)
}
return
kadj12
}
func
_KAdj
(
t1
,
t2
*
tTreeCommit
,
keysv
...
SetKey
)
(
kadj
KAdjMatrix
)
{
var
keys
SetKey
var
keys
SetKey
switch
len
(
keysv
)
{
switch
len
(
keysv
)
{
case
0
:
case
0
:
...
...
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