#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/point_generators_2.h>
#include <CGAL/Optimal_transportation_reconstruction_2.h>
#include <fstream>
#include <iostream>
#include <vector>
typedef K::Point_2 Point;
int main ()
{
CGAL::get_default_random() = CGAL::Random(1671586136);
std::vector<Point> points;
CGAL::Random_points_on_square_2<Point> point_generator(1.);
std::copy_n(point_generator, 100, std::back_inserter(points));
Otr otr(points);
if (otr.run(100))
std::cerr << "All done." << std::endl;
else
std::cerr << "Premature ending." << std::endl;
return 0;
}
This class provides a means to reconstruct a 1-dimensional shape from a set of 2D points with masses.
Definition: Optimal_transportation_reconstruction_2.h:85