Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fp-succinct-trees-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Mehren
fp-succinct-trees-1
Commits
f8941282
Commit
f8941282
authored
Jul 6, 2018
by
Kevin Kaßelmann
Browse files
Options
Downloads
Patches
Plain Diff
[BPTree] removed ignore from test
parent
dc3bb558
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/datastructures/min_max.rs
+12
-12
12 additions, 12 deletions
src/datastructures/min_max.rs
src/trees/bp_tree.rs
+0
-1
0 additions, 1 deletion
src/trees/bp_tree.rs
with
12 additions
and
13 deletions
src/datastructures/min_max.rs
+
12
−
12
View file @
f8941282
...
@@ -278,7 +278,6 @@ impl MinMax {
...
@@ -278,7 +278,6 @@ impl MinMax {
}
}
fn
bwd_search
(
&
self
,
index
:
u64
,
diff
:
i64
)
->
Result
<
u64
,
NodeError
>
{
fn
bwd_search
(
&
self
,
index
:
u64
,
diff
:
i64
)
->
Result
<
u64
,
NodeError
>
{
let
mut
block_no
=
index
/
self
.block_size
;
let
mut
block_no
=
index
/
self
.block_size
;
let
mut
begin_of_block
=
block_no
*
self
.block_size
;
let
mut
begin_of_block
=
block_no
*
self
.block_size
;
let
mut
end_of_block
=
begin_of_block
+
self
.block_size
-
1
;
let
mut
end_of_block
=
begin_of_block
+
self
.block_size
-
1
;
...
@@ -309,8 +308,9 @@ impl MinMax {
...
@@ -309,8 +308,9 @@ impl MinMax {
while
bottom_up
&&
current_node
>
0
{
while
bottom_up
&&
current_node
>
0
{
if
current_node
%
2
==
0
{
if
current_node
%
2
==
0
{
if
self
.heap
[
current_node
as
usize
-
1
]
.max_excess
>=
look_for
&&
if
self
.heap
[
current_node
as
usize
-
1
]
.max_excess
>=
look_for
self
.heap
[
current_node
as
usize
-
1
]
.min_excess
<=
look_for
{
&&
self
.heap
[
current_node
as
usize
-
1
]
.min_excess
<=
look_for
{
bottom_up
=
false
;
bottom_up
=
false
;
top_down
=
true
;
top_down
=
true
;
current_node
-=
1
;
current_node
-=
1
;
...
@@ -324,20 +324,20 @@ impl MinMax {
...
@@ -324,20 +324,20 @@ impl MinMax {
}
}
while
top_down
{
while
top_down
{
if
self
.heap
[
current_node
as
usize
*
2
+
2
]
.max_excess
>=
look_for
&&
if
self
.heap
[
current_node
as
usize
*
2
+
2
]
.max_excess
>=
look_for
self
.heap
[
current_node
as
usize
*
2
+
2
]
.min_excess
<=
look_for
{
&&
self
.heap
[
current_node
as
usize
*
2
+
2
]
.min_excess
<=
look_for
{
current_node
=
current_node
*
2
+
2
;
current_node
=
current_node
*
2
+
2
;
}
else
if
self
.heap
[
current_node
as
usize
*
2
+
1
]
.max_excess
>=
look_for
&&
}
else
if
self
.heap
[
current_node
as
usize
*
2
+
1
]
.max_excess
>=
look_for
self
.heap
[
current_node
as
usize
*
2
+
1
]
.min_excess
<=
look_for
{
&&
self
.heap
[
current_node
as
usize
*
2
+
1
]
.min_excess
<=
look_for
{
current_node
=
current_node
*
2
+
1
;
current_node
=
current_node
*
2
+
1
;
}
}
if
current_node
<
self
.heap
.len
()
as
u64
/
2
{
if
current_node
<
self
.heap
.len
()
as
u64
/
2
{
top_down
=
false
;
top_down
=
false
;
}
}
}
}
}
}
Ok
(
1
)
Ok
(
1
)
...
...
This diff is collapsed.
Click to expand it.
src/trees/bp_tree.rs
+
0
−
1
View file @
f8941282
...
@@ -391,7 +391,6 @@ mod tests {
...
@@ -391,7 +391,6 @@ mod tests {
}
}
#[test]
#[test]
#[ignore]
fn
next_sibling
()
{
fn
next_sibling
()
{
let
bitvec
=
bit_vec!
(
true
,
true
,
false
,
true
,
false
,
false
);
let
bitvec
=
bit_vec!
(
true
,
true
,
false
,
true
,
false
,
false
);
let
tree
:
BPTree
<
String
>
=
BPTree
::
from_bitvec
(
bitvec
.clone
())
.unwrap
();
let
tree
:
BPTree
<
String
>
=
BPTree
::
from_bitvec
(
bitvec
.clone
())
.unwrap
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment