From a6d426f99bb302b910a108fac3042f1919f39531 Mon Sep 17 00:00:00 2001 From: Yves Brise Date: Wed, 27 Oct 2010 07:09:33 +0000 Subject: [PATCH] Putting int as the difference type in all counting_iterator transformations --- QP_solver/include/CGAL/QP_models.h | 22 ++++++++++------------ QP_solver/include/CGAL/QP_solution.h | 18 +++++++++--------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/QP_solver/include/CGAL/QP_models.h b/QP_solver/include/CGAL/QP_models.h index f4970ff64ae..b39b9cf1948 100644 --- a/QP_solver/include/CGAL/QP_models.h +++ b/QP_solver/include/CGAL/QP_models.h @@ -423,14 +423,13 @@ private: // Sparse_vector_iterators //typedef CGAL::Fake_random_access_const_iterator typedef boost::transform_iterator, - boost::counting_iterator > + boost::counting_iterator > Sparse_vector_iterator; typedef boost::transform_iterator, - boost::counting_iterator > - //boost::counting_iterator > + boost::counting_iterator > Sparse_r_vector_iterator; typedef boost::transform_iterator, - boost::counting_iterator > + boost::counting_iterator > Sparse_f_vector_iterator; // Sparse_matrix_iterator @@ -438,7 +437,7 @@ private: { Sparse_vector_iterator operator() (const Sparse_vector& v) const { return Sparse_vector_iterator - (boost::counting_iterator(0), + (boost::counting_iterator(0), CGAL::Map_with_default(&v, NT(0)));} }; @@ -523,7 +522,7 @@ public: B_iterator get_b() const { CGAL_qpe_assertion(is_valid()); - return B_iterator (boost::counting_iterator(0), + return B_iterator (boost::counting_iterator(0), CGAL::Map_with_default (&b_vector, NT(0))); } @@ -531,42 +530,41 @@ public: { CGAL_qpe_assertion(is_valid()); return R_iterator (boost::counting_iterator(0), - //return R_iterator (boost::counting_iterator(0), CGAL::Map_with_default (&r_vector, default_r)); } FL_iterator get_fl() const { CGAL_qpe_assertion(is_valid()); - return FL_iterator (boost::counting_iterator(0), + return FL_iterator (boost::counting_iterator(0), CGAL::Map_with_default (&fl_vector, default_fl)); } L_iterator get_l() const { CGAL_qpe_assertion(is_valid()); - return L_iterator (boost::counting_iterator(0), + return L_iterator (boost::counting_iterator(0), CGAL::Map_with_default (&l_vector, default_l)); } FU_iterator get_fu() const { CGAL_qpe_assertion(is_valid()); - return FU_iterator (boost::counting_iterator(0), + return FU_iterator (boost::counting_iterator(0), CGAL::Map_with_default (&fu_vector, default_fu)); } U_iterator get_u() const { CGAL_qpe_assertion(is_valid()); - return U_iterator (boost::counting_iterator(0), + return U_iterator (boost::counting_iterator(0), CGAL::Map_with_default (&u_vector, default_u)); } C_iterator get_c() const { CGAL_qpe_assertion(is_valid()); - return C_iterator (boost::counting_iterator(0), + return C_iterator (boost::counting_iterator(0), CGAL::Map_with_default (&c_vector, NT(0))); } diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index ee827a8a4ae..20ad095b5f3 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -91,7 +91,7 @@ public: typedef typename QP_solution_detail::Value_by_index Value_by_index; typedef typename boost::transform_iterator - > + > Variable_numerator_iterator; typedef boost::transform_iterator @@ -102,14 +102,14 @@ public: Unbounded_direction_by_index; typedef boost::transform_iterator - > + > Unbounded_direction_iterator; typedef typename QP_solution_detail::Lambda_by_index Lambda_by_index; typedef boost::transform_iterator - > + > Lambda_numerator_iterator; typedef boost::transform_iterator @@ -150,14 +150,14 @@ public: Variable_numerator_iterator original_variables_numerator_begin( ) const { return Variable_numerator_iterator - (boost::counting_iterator(0), + (boost::counting_iterator(0), Value_by_index(this));} Variable_numerator_iterator original_variables_numerator_end ( ) const { return Variable_numerator_iterator - (boost::counting_iterator(number_of_variables()) , + (boost::counting_iterator(number_of_variables()) , Value_by_index(this));} // value type Quotient @@ -200,14 +200,14 @@ public: Unbounded_direction_iterator unbounded_direction_begin() const { return Unbounded_direction_iterator - (boost::counting_iterator(0), + (boost::counting_iterator(0), Unbounded_direction_by_index(this));} // Returns the past-the-end iterator corresponding to // unbounded_direction_begin(). Unbounded_direction_iterator unbounded_direction_end() const { return Unbounded_direction_iterator - (boost::counting_iterator(number_of_variables()), + (boost::counting_iterator(number_of_variables()), Unbounded_direction_by_index(this));} @@ -220,13 +220,13 @@ public: Lambda_numerator_iterator lambda_numerator_begin() const { return Lambda_numerator_iterator - (boost::counting_iterator(0), + (boost::counting_iterator(0), Lambda_by_index(this));} Lambda_numerator_iterator lambda_numerator_end() const { return Lambda_numerator_iterator - (boost::counting_iterator(number_of_constraints()), + (boost::counting_iterator(number_of_constraints()), Lambda_by_index(this));} // value type Quotient