#include #include #include #include #include #include #include #include #include #include #include typedef double NT; typedef CGAL::Homogeneous R; typedef CGAL::Point_2 Point; typedef CGAL::Creator_uniform_2 Creator; typedef std::vector Points; typedef Points::iterator Point_it; typedef Flavored_object Flavored_point; int main(int argc, char** argv) { Points points; Point_it point_it; CGAL::Random random; int min_flavor = static_cast(VANILLA); int max_flavor = static_cast(PISTACHIO); points.reserve(100); CGAL::Random_points_in_disc_2 g(1.0); CGAL::copy_n(g, 90, std::back_inserter(points)); CGAL::random_collinear_points_2(points.begin(), points.end(), 10, std::back_inserter(points)); std::random_shuffle(points.begin(), points.end(), CGAL::default_random); for (point_it = points.begin(); point_it != points.end() ; point_it++) { Flavored_point flav_pt(*point_it); flav_pt.set_flavor(static_cast(random.get_int(min_flavor, max_flavor+1))); flav_pt.enhance_flavor(); if (! flav_pt.is_valid()) { exit (1); } } exit (0); }