#include <CGAL/Simple_cartesian.h>
#include <cassert>
#include <vector>
#include <algorithm>
#include <CGAL/point_generators_2.h>
#include <CGAL/algorithm.h>
#include <CGAL/random_selection.h>
typedef R::Point_2 Point;
typedef std::vector<Point> Vector;
int main() {
Vector points;
points.reserve(1000);
std::copy_n( g, 600, std::back_inserter(points));
points_on_square_grid_2( 250.0, 200, std::back_inserter(points),Creator());
random_selection( points.begin(), points.end(), 100,
std::back_inserter(points));
random_collinear_points_2( points.begin(), points.end(), 100,
std::back_inserter( points));
assert( points.size() == 1000);
for ( Vector::iterator i = points.begin(); i != points.end(); i++){
assert( i->x() <= 251);
assert( i->x() >= -251);
assert( i->y() <= 251);
assert( i->y() >= -251);
}
return 0;
}
The class Random_points_in_disc_2 is an input iterator creating points uniformly distributed in an op...
Definition: point_generators_2.h:157
void random_shuffle(RandomAccessIterator begin, RandomAccessIterator end, RandomGenerator &random)