// file: examples/Triangulation_2/hierarchy.C #include #include #include #include #include #include struct K : CGAL::Exact_predicates_inexact_constructions_kernel {}; typedef CGAL::Triangulation_vertex_base_2 Vbb; typedef CGAL::Triangulation_hierarchy_vertex_base_2 Vb; typedef CGAL::Triangulation_face_base_2 Fb; typedef CGAL::Triangulation_data_structure_2 Tds; typedef CGAL::Delaunay_triangulation_2 Dt; typedef CGAL::Triangulation_hierarchy_2
Triangulation; typedef Triangulation::Point Point; typedef CGAL::Creator_uniform_2 Creator; int main( ) { std::cout << "insertion of 1000 random points" << std::endl; Triangulation t; CGAL::Random_points_in_square_2 g(1.); CGAL::copy_n( g, 1000, std::back_inserter(t)); //verbose mode of is_valid ; shows the number of vertices at each level std::cout << "The number of vertices at successive levels" << std::endl; assert(t.is_valid(true)); return 0; }