mirror of https://github.com/CGAL/cgal
Renaming away 'exact' and minor changes
This commit is contained in:
parent
991874b81d
commit
affece6748
|
|
@ -41,25 +41,25 @@ void run(std::list<Point> all_points)
|
||||||
typename SearchTraits::Point_d qq(q);
|
typename SearchTraits::Point_d qq(q);
|
||||||
|
|
||||||
|
|
||||||
Iso_rectangle exact_ic(p,q);
|
Iso_rectangle ic(p,q);
|
||||||
|
|
||||||
Fuzzy_box exact_range(pp,qq);
|
Fuzzy_box default_range(pp,qq);
|
||||||
|
|
||||||
std::list<typename SearchTraits::Point_d> result;
|
std::list<typename SearchTraits::Point_d> result;
|
||||||
// Searching the box r exactly
|
// Searching the box ic
|
||||||
tree.search( std::back_inserter( result ), exact_range);
|
tree.search( std::back_inserter( result ), default_range);
|
||||||
|
|
||||||
tree.search(CGAL::Emptyset_iterator(), Fuzzy_box(p,q) ); //test compilation when Point != Traits::Point_d
|
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);
|
std::list<Point> copy_all_points(all_points);
|
||||||
for (typename std::list<typename SearchTraits::Point_d>::iterator pt=result.begin(); (pt != result.end()); ++pt) {
|
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));
|
copy_all_points.remove(get_point(*pt));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::list<Point>::iterator pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ void run(std::list<Point> all_points)
|
||||||
|
|
||||||
|
|
||||||
result.clear();
|
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);
|
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 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));
|
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;
|
Tree tree;
|
||||||
Random_points_iterator rpg;
|
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);
|
tree.reserve(N);
|
||||||
|
|
||||||
//to test wether the tree.capacity() function works properly.
|
//to test wether the tree.capacity() function works properly.
|
||||||
|
|
@ -47,7 +46,7 @@ main() {
|
||||||
Point_d q(0.7, 0.7);
|
Point_d q(0.7, 0.7);
|
||||||
|
|
||||||
// Searching an exact range
|
// 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_box exact_range(r); replaced by
|
||||||
Fuzzy_iso_box exact_range(p,q);
|
Fuzzy_iso_box exact_range(p,q);
|
||||||
std::cout << "tree.search(..)" << std::endl;
|
std::cout << "tree.search(..)" << std::endl;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue