mirror of https://github.com/CGAL/cgal
Minor improvements to P3T3's tests
-- It's a bit dangerous to take random points in the complete periodic domain because insert(p) should have p in the original domain and half the border of the periodic domain is open -- Cleaned some unused variables
This commit is contained in:
parent
ed9562e565
commit
3abbace437
|
|
@ -133,8 +133,7 @@ _test_cls_periodic_3_delaunay_3(const Periodic_3Triangulation_3 &,
|
||||||
|
|
||||||
std::cout << " Special constructor" << std::endl;
|
std::cout << " Special constructor" << std::endl;
|
||||||
|
|
||||||
P3T3 PT_range(pts_rnd10.begin(), pts_rnd10.end(),
|
P3T3 PT_range(pts_rnd10.begin(), pts_rnd10.end(), Iso_cuboid(-1,-1,-1, 1,1,1));
|
||||||
Iso_cuboid(-1,-1,-1,1,1,1));
|
|
||||||
assert(PT_range.number_of_vertices() == 10);
|
assert(PT_range.number_of_vertices() == 10);
|
||||||
assert(PT_range.is_valid());
|
assert(PT_range.is_valid());
|
||||||
|
|
||||||
|
|
@ -214,7 +213,8 @@ _test_cls_periodic_3_delaunay_3(const Periodic_3Triangulation_3 &,
|
||||||
|
|
||||||
std::cout << " Iterator range insertion" << std::endl;
|
std::cout << " Iterator range insertion" << std::endl;
|
||||||
|
|
||||||
P3T3 PT_range_ins(Iso_cuboid(-1,-1,-1,1,1,1));
|
// "1.1" because random points are in the cube (-1,-1,-1, 1,1,1)
|
||||||
|
P3T3 PT_range_ins(Iso_cuboid(-1,-1,-1, 1.1,1.1,1.1));
|
||||||
pts_rnd1000.push_back(Point(-1,-1,-1));
|
pts_rnd1000.push_back(Point(-1,-1,-1));
|
||||||
assert(PT_range_ins.insert(pts_rnd1000.begin(), pts_rnd1000.end(), true)
|
assert(PT_range_ins.insert(pts_rnd1000.begin(), pts_rnd1000.end(), true)
|
||||||
== 1001);
|
== 1001);
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@ public:
|
||||||
std::cout << "--- test_insert_rnd (" << pt_count << ", " << seed << ')' << std::endl;
|
std::cout << "--- test_insert_rnd (" << pt_count << ", " << seed << ')' << std::endl;
|
||||||
|
|
||||||
CGAL::Random random(seed);
|
CGAL::Random random(seed);
|
||||||
typedef CGAL::Creator_uniform_3<double, Point_3> Creator;
|
// typedef CGAL::Creator_uniform_3<double, Point_3> Creator;
|
||||||
CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(0.5, random);
|
// CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(0.5, random);
|
||||||
|
|
||||||
Iso_cuboid iso_cuboid(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
|
Iso_cuboid iso_cuboid(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
|
||||||
P3RT3 p3rt3(iso_cuboid);
|
P3RT3 p3rt3(iso_cuboid);
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ public:
|
||||||
typedef CGAL::Creator_uniform_3<double, Point_3> Creator;
|
typedef CGAL::Creator_uniform_3<double, Point_3> Creator;
|
||||||
CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(0.5, random);
|
CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(0.5, random);
|
||||||
|
|
||||||
Iso_cuboid iso_cuboid(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
|
Iso_cuboid iso_cuboid(-0.5, -0.5, -0.5, 0.6, 0.6, 0.6);
|
||||||
P3RT3 p3rt3(iso_cuboid);
|
P3RT3 p3rt3(iso_cuboid);
|
||||||
|
|
||||||
for (unsigned cnt = 1; cnt <= pt_count; ++cnt)
|
for (unsigned cnt = 1; cnt <= pt_count; ++cnt)
|
||||||
|
|
@ -488,13 +488,13 @@ public:
|
||||||
assert(p3rt3 == p3rt3_b);
|
assert(p3rt3 == p3rt3_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_insert_range (unsigned pt_count, unsigned seed)
|
static void test_insert_range (unsigned pt_count, unsigned /* seed */)
|
||||||
{
|
{
|
||||||
std::cout << "--- test_insert_range" << std::endl;
|
std::cout << "--- test_insert_range" << std::endl;
|
||||||
|
|
||||||
CGAL::Random random(seed);
|
// CGAL::Random random(seed);
|
||||||
typedef CGAL::Creator_uniform_3<double, Point_3> Creator;
|
// typedef CGAL::Creator_uniform_3<double, Point_3> Creator;
|
||||||
CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(0.5, random);
|
// CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(0.5, random);
|
||||||
|
|
||||||
Iso_cuboid iso_cuboid(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
|
Iso_cuboid iso_cuboid(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
|
||||||
P3RT3 p3rt3(iso_cuboid);
|
P3RT3 p3rt3(iso_cuboid);
|
||||||
|
|
@ -693,7 +693,7 @@ public:
|
||||||
typedef CGAL::Creator_uniform_3<double, Point_3> Creator;
|
typedef CGAL::Creator_uniform_3<double, Point_3> Creator;
|
||||||
CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(0.5, random);
|
CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(0.5, random);
|
||||||
|
|
||||||
Iso_cuboid iso_cuboid(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
|
Iso_cuboid iso_cuboid(-0.5, -0.5, -0.5, 0.6, 0.6, 0.6);
|
||||||
P3RT3 p3rt3(iso_cuboid);
|
P3RT3 p3rt3(iso_cuboid);
|
||||||
|
|
||||||
std::vector<Weighted_point_3> points;
|
std::vector<Weighted_point_3> points;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue