#include <iostream>
#include <fstream>
#include <cassert>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
int main()
{
std::ifstream ifs("data/sites.cin");
assert( ifs );
std::vector<Gt::Point_2> points;
std::vector<std::pair<std::size_t,std::size_t> > indices;
SDG2::Site_2 site;
ifs >> site;
assert( site.is_segment() );
points.push_back( site.source_of_supporting_site() );
std::size_t k=0;
while ( ifs >> site ) {
assert( site.is_segment() );
points.push_back( site.source_of_supporting_site() );
indices.push_back( std::make_pair(k, k+1) );
++k;
}
indices.push_back( std::make_pair(k, 0) );
ifs.close();
SDG2 sdg;
sdg.insert_segments( points.begin(), points.end(), indices.begin(), indices.end() );
assert( sdg.is_valid(true, 1) );
return 0;
}
The class Segment_Delaunay_graph_Linf_2 represents the segment Delaunay graph under the metric (whic...
Definition: Segment_Delaunay_graph_Linf_2.h:34
The class Segment_Delaunay_graph_Linf_filtered_traits_without_intersections_2 provides a model for th...
Definition: Segment_Delaunay_graph_Linf_filtered_traits_2.h:63