diff --git a/Polytope_distance_d/include/CGAL/Polytope_distance_d.h b/Polytope_distance_d/include/CGAL/Polytope_distance_d.h index 16070febe98..a339a9c7795 100644 --- a/Polytope_distance_d/include/CGAL/Polytope_distance_d.h +++ b/Polytope_distance_d/include/CGAL/Polytope_distance_d.h @@ -112,15 +112,15 @@ namespace PD_detail { template class A_matrix : public std::unary_function - > > + , + boost::counting_iterator > > { typedef PD_detail::A_column A_column; public: - typedef CGAL::Transform_diff_const_iterator - result_type; + typedef boost::transform_iterator + > result_type; A_matrix () {} @@ -247,10 +247,12 @@ namespace PD_detail { // functor for matrix D template class D_matrix : public std::unary_function - > > + , + boost::counting_iterator > > { public: - typedef CGAL::Transform_diff_const_iterator > result_type; + typedef boost::transform_iterator, + boost::counting_iterator > result_type; D_matrix () {} D_matrix (int d) @@ -328,16 +330,19 @@ private: // QP solver iterator types typedef PD_detail::A_matrix A_matrix; - typedef CGAL::Transform_diff_const_iterator A_iterator; + typedef boost::transform_iterator< + A_matrix, boost::counting_iterator > A_iterator; typedef PD_detail::B_vector B_vector; - typedef CGAL::Transform_diff_const_iterator B_iterator; + typedef boost::transform_iterator< + B_vector, boost::counting_iterator > B_iterator; typedef CGAL::Const_oneset_iterator R_iterator; typedef CGAL::Const_oneset_iterator C_iterator; typedef PD_detail::D_matrix D_matrix; - typedef CGAL::Transform_diff_const_iterator D_iterator; + typedef boost::transform_iterator < + D_matrix, boost::counting_iterator > D_iterator; // Program type typedef CGAL::Nonnegative_quadratic_program_from_iterators @@ -685,11 +690,12 @@ private: CGAL_optimisation_precondition (p_points.size() > 0); QP qp (n, m, A_iterator - (0, A_matrix (d, da_coord, p_points.begin(), p_points.size(), + (boost::counting_iterator(0), + A_matrix (d, da_coord, p_points.begin(), p_points.size(), q_points.begin())), - B_iterator (0, B_vector (d)), + B_iterator (boost::counting_iterator(0), B_vector (d)), R_iterator (CGAL::EQUAL), - D_iterator (0, D_matrix (d)), + D_iterator (boost::counting_iterator(0), D_matrix (d)), C_iterator (nt_0)); delete solver;