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
d37761bb
Commit
d37761bb
authored
Sep 24, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
61d79c05
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
wcfs/internal/xbtree/xbtreetest/rtree.go
wcfs/internal/xbtree/xbtreetest/rtree.go
+9
-9
No files found.
wcfs/internal/xbtree/xbtreetest/rtree.go
View file @
d37761bb
...
...
@@ -29,11 +29,8 @@ import (
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree/blib"
)
// RTree represents Tree node that RBucket refers to as parent.
type
RTree
struct
{
Oid
zodb
.
Oid
Parent
*
RTree
}
// RBucketSet represents set of buckets covering whole [-∞,∞) range.
type
RBucketSet
[]
*
RBucket
// k↑
// RBucket represents Bucket node with values covering [lo, hi_] key range in its Tree.
// NOTE it is not [lo,hi) but [lo,hi_] instead to avoid overflow at KeyMax.
...
...
@@ -44,6 +41,13 @@ type RBucket struct {
KV
map
[
Key
]
string
// bucket's k->v; values were ZBlk objects whose data is loaded instead.
}
// RTree represents Tree node that RBucket refers to as parent.
type
RTree
struct
{
Oid
zodb
.
Oid
Parent
*
RTree
}
// Path returns path to this bucket from tree root.
func
(
rb
*
RBucket
)
Path
()
[]
zodb
.
Oid
{
path
:=
[]
zodb
.
Oid
{
rb
.
Oid
}
...
...
@@ -55,10 +59,6 @@ func (rb *RBucket) Path() []zodb.Oid {
return
path
}
// RBucketSet represents set of buckets covering whole [-∞,∞) range.
type
RBucketSet
[]
*
RBucket
// k↑
// Get returns RBucket which covers key k.
func
(
rbs
RBucketSet
)
Get
(
k
Key
)
*
RBucket
{
i
:=
sort
.
Search
(
len
(
rbs
),
func
(
i
int
)
bool
{
...
...
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