Fix insert(It,It, false).

Some points were added twice when is_large_point_set is set to false.
This commit is contained in:
Aymeric PELLE 2015-07-02 17:22:26 +02:00 committed by Aymeric PELLÉ
parent 15e771ff05
commit 287d01a6a0
2 changed files with 23 additions and 22 deletions

View File

@ -177,10 +177,11 @@ public:
template < typename InputIterator >
Periodic_3_regular_triangulation_3(InputIterator first, InputIterator last,
const Iso_cuboid& domain = Iso_cuboid(0,0,0,1,1,1),
const Geometric_traits& gt = Geometric_traits() )
const Geometric_traits& gt = Geometric_traits(),
bool is_large_point_set = false)
: Base(domain, gt)
{
insert(first, last);
insert(first, last, is_large_point_set);
}
void create_initial_triangulation()
@ -363,7 +364,7 @@ public:
Conflict_tester tester(*pbegin, this);
Point_hider hider(this);
Cover_manager cover_manager(*this);
double_vertices = Base::insert_in_conflict(points.begin(), points.end(), hint, tester, hider, cover_manager);
double_vertices = Base::insert_in_conflict(pbegin, points.end(), hint, tester, hider, cover_manager);
if (is_large_point_set)
{

View File

@ -713,9 +713,9 @@ void test_insert_range (unsigned pt_count, unsigned seed)
assert(p3rt3.number_of_sheets() == CGAL::make_array(1,1,1));
}
void test_construct_and_insert_range (unsigned pt_count, unsigned seed)
void test_construction_and_insert_range (unsigned pt_count, unsigned seed)
{
std::cout << "--- test_construct_and_insert_range" << std::endl;
std::cout << "--- test_construction_and_insert_range" << std::endl;
CGAL::Random random(seed);
typedef CGAL::Creator_uniform_3<double,Bare_point> Creator;
@ -865,25 +865,25 @@ int main (int argc, char** argv)
CGAL::force_ieee_double_precision();
// test_construct_and_insert_range(800, 7);
// test_number_of_hidden_points();
// test_locate_geometry();
// test_dummy_points();
// test_construction();
// test_insert_1();
// test_insert_point();
// test_insert_hidden_point();
// test_insert_hiding_point();
// test_insert_a_point_twice();
// test_insert_two_points_with_the_same_position();
// test_remove();
// test_27_to_1_sheeted_covering();
test_insert_range(800, 7);
test_construction_and_insert_range(800, 7);
test_number_of_hidden_points();
test_locate_geometry();
test_dummy_points();
test_construction();
test_insert_1();
test_insert_point();
test_insert_hidden_point();
test_insert_hiding_point();
test_insert_a_point_twice();
test_insert_two_points_with_the_same_position();
test_remove();
test_27_to_1_sheeted_covering();
//// Iso_cuboid unitaire -> 0 <= weight < 0.015625
// test_insert_rnd_as_delaunay(100, 0.);
// test_insert_rnd_as_delaunay(100, 0.01);
// test_insert_rnd_then_remove_all(5000, 7);
// test_insert_rnd_then_remove_all(5000, 12);
test_insert_rnd_as_delaunay(100, 0.);
test_insert_rnd_as_delaunay(100, 0.01);
test_insert_rnd_then_remove_all(5000, 7);
test_insert_rnd_then_remove_all(5000, 12);
std::cout << "EXIT SUCCESS" << std::endl;
return EXIT_SUCCESS;