mirror of https://github.com/CGAL/cgal
Renaming away 'exact' and minor changes
This commit is contained in:
parent
991874b81d
commit
affece6748
|
|
@ -39,27 +39,27 @@ void run(std::list<Point> all_points)
|
|||
Point q(0.3, 0.5);
|
||||
typename SearchTraits::Point_d pp(p);
|
||||
typename SearchTraits::Point_d qq(q);
|
||||
|
||||
|
||||
Iso_rectangle exact_ic(p,q);
|
||||
|
||||
Fuzzy_box exact_range(pp,qq);
|
||||
|
||||
Iso_rectangle ic(p,q);
|
||||
|
||||
Fuzzy_box default_range(pp,qq);
|
||||
|
||||
std::list<typename SearchTraits::Point_d> result;
|
||||
// Searching the box r exactly
|
||||
tree.search( std::back_inserter( result ), exact_range);
|
||||
|
||||
// Searching the box ic
|
||||
tree.search( std::back_inserter( result ), default_range);
|
||||
|
||||
tree.search(CGAL::Emptyset_iterator(), Fuzzy_box(p,q) ); //test compilation when Point != Traits::Point_d
|
||||
|
||||
// test the results of the exact query
|
||||
|
||||
// test the results of the default query
|
||||
std::list<Point> copy_all_points(all_points);
|
||||
for (typename std::list<typename SearchTraits::Point_d>::iterator pt=result.begin(); (pt != result.end()); ++pt) {
|
||||
assert(! exact_ic.has_on_unbounded_side(get_point(*pt)) || exact_ic.has_on_boundary(get_point(*pt)));
|
||||
assert(! ic.has_on_unbounded_side(get_point(*pt)) || ic.has_on_boundary(get_point(*pt)));
|
||||
copy_all_points.remove(get_point(*pt));
|
||||
}
|
||||
|
||||
for (std::list<Point>::iterator pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++pt) {
|
||||
assert(exact_ic.has_on_unbounded_side(*pt) || exact_ic.has_on_boundary(*pt));
|
||||
assert(ic.has_on_unbounded_side(*pt) || ic.has_on_boundary(*pt));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,22 +48,22 @@ void run(std::list<Point> all_points)
|
|||
std::list<typename SearchTraits::Point_d> result;
|
||||
// Searching the box r exactly
|
||||
tree.search( std::back_inserter( result ), exact_range);
|
||||
|
||||
|
||||
// test the results of the exact query
|
||||
std::list<Point> copy_all_points(all_points);
|
||||
|
||||
|
||||
for (typename std::list<typename SearchTraits::Point_d>::iterator pt=result.begin(); (pt != result.end()); ++pt) {
|
||||
assert(! exact_ic.has_on_unbounded_side(get_point(*pt)));
|
||||
copy_all_points.remove(get_point(*pt));
|
||||
}
|
||||
|
||||
|
||||
for (std::list<Point>::iterator pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++pt) {
|
||||
assert(exact_ic.has_on_unbounded_side(*pt));
|
||||
}
|
||||
|
||||
|
||||
result.clear();
|
||||
// approximate range searching using value 0.1 for fuzziness parameter
|
||||
// approximate range searching using value 0.05 for fuzziness parameter
|
||||
Fuzzy_box approximate_range(pp,qq,0.05);
|
||||
Iso_cuboid inner_ic(p+ 0.05*Vector(1,1,1),q-0.05*Vector(1,1,1));
|
||||
Iso_cuboid outer_ic(p- 0.05*Vector(1,1,1),q+0.05*Vector(1,1,1));
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ main() {
|
|||
Tree tree;
|
||||
Random_points_iterator rpg;
|
||||
|
||||
//inserting N points one-by-one, thus the use of "reserve" is recommended, and thus we use it
|
||||
|
||||
//inserting N points one-by-one, thus the use of "reserve" is recommended, and we use it
|
||||
tree.reserve(N);
|
||||
|
||||
//to test wether the tree.capacity() function works properly.
|
||||
|
|
@ -47,7 +46,7 @@ main() {
|
|||
Point_d q(0.7, 0.7);
|
||||
|
||||
// Searching an exact range
|
||||
// using default value 0.0 for epsilon fuzziness paramater
|
||||
// using default value 0.0 for epsilon fuzziness parameter
|
||||
// Fuzzy_box exact_range(r); replaced by
|
||||
Fuzzy_iso_box exact_range(p,q);
|
||||
std::cout << "tree.search(..)" << std::endl;
|
||||
|
|
|
|||
Loading…
Reference in New Issue