Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mateusz Pawlik
ted-experiments
Commits
47c77cf4
Commit
47c77cf4
authored
Nov 12, 2018
by
Thomas Huetter
Browse files
added upper bound to the algorithm in t join
parent
6c505fe6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/join_algs/join_algs_experiments.cc
View file @
47c77cf4
...
...
@@ -128,27 +128,17 @@ void execute_t_join(std::vector<node::Node<Label>>& trees_collection, std::strin
std
::
cout
<<
"
\"
verification_candidates
\"
: "
<<
join_candidates
.
size
()
<<
", "
;
if
(
upperbound
==
"greedy"
)
{
ted_ub
::
GreedyUB
<
Label
,
CostModel
>
gub
;
//
ted_ub::GreedyUB<Label, CostModel> gub;
// Initialized Timing object
Timing
::
Interval
*
greedyub
=
timing
.
create_enroll
(
"GreedyUB"
);
// Start timing
greedyub
->
start
();
std
::
vector
<
std
::
pair
<
unsigned
int
,
unsigned
int
>>::
iterator
it
=
join_candidates
.
begin
();
while
(
it
!=
join_candidates
.
end
())
{
double
ub_value
=
gub
.
verify
(
trees_collection
[
it
->
first
],
trees_collection
[
it
->
second
],
distance_threshold
);
if
(
ub_value
<=
distance_threshold
)
{
join_result
.
emplace_back
(
it
->
first
,
it
->
second
,
ub_value
);
*
it
=
join_candidates
.
back
();
join_candidates
.
pop_back
();
}
else
{
++
it
;
}
}
// Send candidates to the result if their label guided mapping upper
// bound is below the threshold.
tj
.
upperbound
(
trees_collection
,
join_candidates
,
join_result
,
distance_threshold
);
// Stop timing
greedyub
->
stop
();
...
...
@@ -267,6 +257,7 @@ void execute_tang_join(std::vector<node::Node<Label>>& trees_collection,
double
ub_value
=
gub
.
verify
(
trees_collection
[
it
->
first
],
trees_collection
[
it
->
second
],
distance_threshold
);
if
(
ub_value
<=
distance_threshold
)
{
join_result
.
emplace_back
(
it
->
first
,
it
->
second
,
ub_value
);
it
=
join_candidates
.
erase
(
it
);
...
...
Write
Preview
Supports
Markdown
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