#include <iostream>
#include <fstream>
#include <cassert>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Segment_Delaunay_graph_2.h>
#include <CGAL/Segment_Delaunay_graph_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;
}