Index: voronoi_benchmark_segments.cpp
===================================================================
--- voronoi_benchmark_segments.cpp	(revision 84122)
+++ voronoi_benchmark_segments.cpp	(working copy)
@@ -25,17 +25,19 @@
 typedef boost::polygon::voronoi_diagram<double> VD_BOOST;
 
 // Includes for the CGAL library.
-#include <CGAL/Quotient.h>
-#include <CGAL/MP_Float.h>
-#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
 #include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
 #include <CGAL/Segment_Delaunay_graph_2.h>
-typedef CGAL::Quotient<CGAL::MP_Float> ENT;
-typedef CGAL::Simple_cartesian<double> CK;
-typedef CGAL::Simple_cartesian<ENT> EK;
-typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<
-    CK, CGAL::Field_with_sqrt_tag, EK, CGAL::Field_tag> Gt;
-typedef CGAL::Segment_Delaunay_graph_2<Gt> SDT_CGAL;
+#include <CGAL/Spatial_sort_traits_adapter_2.h>
+#include <boost/iterator/counting_iterator.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Field_with_sqrt_tag MTag;
+typedef CGAL::Integral_domain_without_division_tag EMTag;
+typedef CGAL::Simple_cartesian<CGAL::Gmpq> EK;
+
+typedef CGAL::Segment_Delaunay_graph_filtered_traits_without_intersections_2<K, MTag, EK, EMTag>  Gt;
+typedef CGAL::Segment_Delaunay_graph_2<Gt>  SDT_CGAL;
 typedef SDT_CGAL::Point_2 Point_CGAL;
 typedef SDT_CGAL::Site_2 Site_CGAL;
 
@@ -140,8 +142,25 @@
   bf << "\n";
 }
 
+struct Naive_dual
+  : public std::unary_function<
+      const SDT_CGAL::Face&,
+      Point_CGAL >
+{
+  Gt::Construct_svd_vertex_2 svd_vertex;
+  Point_CGAL
+  operator()(const SDT_CGAL::Face& face) const
+  {
+    return svd_vertex(
+      face.vertex(0)->site(),
+      face.vertex(1)->site(),
+      face.vertex(2)->site() );
+  }
+};
+
 void run_cgal_test(const std::vector<double> &running_times) {
   boost::mt19937 gen(RANDOM_SEED);
+  Naive_dual compute_dual;
   bf << "CGAL Triangulation of Segments:\n";
   for (int i = 0; i < NUM_TESTS; ++i) {
     timer.restart();
@@ -156,12 +175,61 @@
                                    POINT_POLYGON(x1 + dx, y1 + dy)));
       }
       clean_segment_set(ssd);
-      SDT_CGAL dt;
-      for (SSD_POLYGON::iterator it = ssd.begin(); it != ssd.end(); ++it) {
-        dt.insert(Site_CGAL::construct_site_2(
-          Point_CGAL(it->low().x(), it->low().y()),
-          Point_CGAL(it->high().x(), it->high().y())));
+
+      typedef std::vector<Point_CGAL> Points_container;
+      typedef std::vector<Points_container>::size_type Index_type;
+      typedef std::vector< std::pair<Index_type,Index_type> > Constraints_container;
+
+      typedef std::vector<std::ptrdiff_t> Indices;
+      typedef std::vector<SDT_CGAL::Vertex_handle> Vertices;
+
+      Points_container points;
+      Constraints_container constraints;
+      points.reserve(ssd.size() * 2);
+      constraints.reserve(ssd.size());
+      for(SSD_POLYGON::iterator it = ssd.begin(); it != ssd.end(); ++it) { 
+        points.push_back(Point_CGAL(boost::polygon::x(it->low()), boost::polygon::y(it->low())));
+        points.push_back(Point_CGAL(boost::polygon::x(it->high()), boost::polygon::y(it->high())));
+        constraints.push_back(std::make_pair(points.size() -2, points.size() - 1));
       }
+
+      Indices indices;
+      indices.reserve(ssd.size());
+      CGAL::Spatial_sort_traits_adapter_2<K,Point_CGAL*> sort_traits(&(points[0]));
+      
+      
+      std::copy(boost::counting_iterator<std::ptrdiff_t>(0),
+                boost::counting_iterator<std::ptrdiff_t>(points.size()),
+                std::back_inserter(indices));
+
+      CGAL::spatial_sort(indices.begin(), indices.end(), sort_traits);
+
+      SDT_CGAL sdg;
+
+      Vertices vertices;
+      vertices.resize(points.size());
+      SDT_CGAL::Vertex_handle hint;
+      for(Indices::const_iterator  pt_ptr_it = indices.begin(), end = indices.end();
+          pt_ptr_it != end; ++pt_ptr_it) {
+        SDT_CGAL::Vertex_handle vh = sdg.insert(points[*pt_ptr_it], hint);
+        hint = vh;
+        vertices[*pt_ptr_it] = vh;
+      }
+
+      for(Constraints_container::const_iterator  cit = constraints.begin(), end = constraints.end();
+          cit != end; ++cit) {
+        const SDT_CGAL::Vertex_handle& v1 = vertices[cit->first];
+        const SDT_CGAL::Vertex_handle& v2 = vertices[cit->second];
+        if(v1 != v2)
+          sdg.insert(v1, v2);
+      }
+      std::size_t nb_faces = sdg.number_of_faces();
+      std::vector<Point_CGAL> voronoi_vertices;
+      voronoi_vertices.reserve( nb_faces );
+      std::transform(sdg.finite_faces_begin(), sdg.finite_faces_end(),
+                     std::back_inserter(voronoi_vertices),compute_dual);
+      if ( nb_faces>voronoi_vertices.size() ) std::cerr << "ERROR\n";
+
     }
     double time_per_test = (timer.elapsed() - running_times[i]) / NUM_RUNS[i];
     format_line(NUM_SEGMENTS[i], NUM_RUNS[i], time_per_test);
Index: voronoi_benchmark_points.cpp
===================================================================
--- voronoi_benchmark_points.cpp	(revision 84122)
+++ voronoi_benchmark_points.cpp	(working copy)
@@ -26,19 +26,13 @@
 typedef boost::polygon::voronoi_diagram<double> VD_BOOST;
 
 // Includes for the CGAL library.
-#include <CGAL/Quotient.h>
-#include <CGAL/MP_Float.h>
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
-#include <CGAL/Segment_Delaunay_graph_2.h>
-typedef CGAL::Quotient<CGAL::MP_Float> ENT;
-typedef CGAL::Simple_cartesian<double> CK;
-typedef CGAL::Simple_cartesian<ENT> EK;
-typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<
-    CK, CGAL::Field_with_sqrt_tag, EK, CGAL::Field_tag> Gt;
-typedef CGAL::Segment_Delaunay_graph_2<Gt> SDT_CGAL;
-typedef SDT_CGAL::Point_2 Point_CGAL;
 
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Delaunay_triangulation_2.h>
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Gt;
+typedef CGAL::Delaunay_triangulation_2<Gt> DT2_CGAL;
+typedef Gt::Point_2 Point_CGAL;
+
 // Includes for the S-Hull library.
 #include <s_hull.h>
 
@@ -75,17 +69,43 @@
   bf << "\n";
 }
 
+struct Naive_dual
+  : public std::unary_function<
+      const DT2_CGAL::Face&,
+      Point_CGAL >
+{
+  Gt::Construct_circumcenter_2 circumcenter;
+  Point_CGAL
+  operator()(const DT2_CGAL::Face& face) const
+  {
+    return circumcenter(
+      face.vertex(0)->point(),
+      face.vertex(1)->point(),
+      face.vertex(2)->point() );
+  }
+};
+
 void run_cgal_test() {
   boost::mt19937 gen(RANDOM_SEED);
   bf << "CGAL Triangulation of Points:\n";
+  Naive_dual compute_dual;
   for (int i = 0; i < NUM_TESTS; ++i) {
     timer.restart();
     for (int j = 0; j < NUM_RUNS[i]; ++j) {
-      SDT_CGAL dt;
+      DT2_CGAL dt;
+      std::vector<Point_CGAL> points;
+      points.reserve(NUM_POINTS[i]);
       for (int k = 0; k < NUM_POINTS[i]; ++k) {
-        dt.insert(Point_CGAL(
+        points.push_back(Point_CGAL(
             static_cast<int32>(gen()), static_cast<int32>(gen())));
       }
+      dt.insert(points.begin(), points.end() );
+      std::vector<Point_CGAL> voronoi_vertices;
+      std::size_t nb_faces = dt.number_of_faces();
+      voronoi_vertices.reserve( nb_faces );
+      std::transform(dt.finite_faces_begin(), dt.finite_faces_end(),
+                     std::back_inserter(voronoi_vertices),compute_dual);
+      if ( nb_faces!=voronoi_vertices.size() ) std::cerr << "ERROR\n";
     }
     double time_per_test = timer.elapsed() / NUM_RUNS[i];
     format_line(NUM_POINTS[i], NUM_RUNS[i], time_per_test);

