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
a9a791c5
Commit
a9a791c5
authored
Jun 02, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
82e47bc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
wcfs/internal/xbtree/pptreesubset.go
wcfs/internal/xbtree/pptreesubset.go
+9
-1
wcfs/internal/xbtree/rangeset.go
wcfs/internal/xbtree/rangeset.go
+14
-2
No files found.
wcfs/internal/xbtree/pptreesubset.go
View file @
a9a791c5
...
...
@@ -160,7 +160,15 @@ func (A PPTreeSubSet) UnionInplace(B PPTreeSubSet) {
A
.
xUnionInplace
(
B
)
}
// XXX Difference
// Difference returns D = PP(A.leafs \ B.leafs)
//
// In other words ... XXX
func
(
A
PPTreeSubSet
)
Difference
(
B
PPTreeSubSet
)
PPTreeSubSet
{
D
:=
A
.
Clone
()
D
.
DifferenceInplace
(
B
)
return
D
}
// DifferenceInplace sets A = PP(A.leafs \ B.leafs)
//
...
...
wcfs/internal/xbtree/rangeset.go
View file @
a9a791c5
...
...
@@ -128,8 +128,6 @@ func (S *RangeSet) verify() {
}
}
// XXX Equal
// Clone returns copy of the set.
func
(
orig
*
RangeSet
)
Clone
()
*
RangeSet
{
klon
:=
&
RangeSet
{}
...
...
@@ -137,6 +135,20 @@ func (orig *RangeSet) Clone() *RangeSet {
return
klon
}
// Equal returns whether A == B.
func
(
A
*
RangeSet
)
Equal
(
B
*
RangeSet
)
bool
{
if
len
(
A
.
rangev
)
!=
len
(
B
.
rangev
)
{
return
false
}
for
i
,
ra
:=
range
A
.
rangev
{
rb
:=
B
.
rangev
[
i
]
if
ra
!=
rb
{
return
false
}
}
return
true
}
func
(
S
RangeSet
)
String
()
string
{
s
:=
"{"
for
i
,
r
:=
range
S
.
rangev
{
...
...
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