mirror of https://github.com/CGAL/cgal
Replace Coercion_traits with NT_converter.
This commit is contained in:
parent
60bcd2ce7d
commit
a8abffeda3
|
|
@ -42,6 +42,7 @@
|
|||
#include <CGAL/boost/iterator/counting_iterator.hpp>
|
||||
#include <CGAL/boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/functional.hpp>
|
||||
#include <CGAL/NT_converter.h>
|
||||
|
||||
// here is how it works. We have d+2 variables:
|
||||
// R (big radius), r (small radius), c (center). The problem is
|
||||
|
|
@ -627,7 +628,7 @@ private:
|
|||
std::transform( da_coord( points[ 0]),
|
||||
da_coord( points[ 0])+d+1,
|
||||
center_coords.begin(),
|
||||
typename Coercion_traits<ET,RT>::Cast());
|
||||
NT_converter<RT,ET>());
|
||||
sqr_i_rad_numer = ET( 0);
|
||||
sqr_o_rad_numer = ET( 0);
|
||||
sqr_rad_denom = ET( 1);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
// Kaspar Fischer
|
||||
|
||||
#include<CGAL/QP_functions.h>
|
||||
#include<CGAL/NT_converter.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -550,7 +551,7 @@ init_solution__b_C(Tag_true)
|
|||
{
|
||||
b_C.reserve(qp_m);
|
||||
std::transform(qp_b, qp_b+qp_m, std::back_inserter(b_C),
|
||||
typename Coercion_traits<ET,B_entry>::Cast());
|
||||
NT_converter<B_entry,ET>());
|
||||
}
|
||||
|
||||
template < typename Q, typename ET, typename Tags > inline // has ineq.
|
||||
|
|
@ -564,7 +565,7 @@ init_solution__b_C(Tag_false)
|
|||
std::transform(B_by_index_iterator(C.begin(), b_accessor),
|
||||
B_by_index_iterator(C.end (), b_accessor),
|
||||
b_C.begin(),
|
||||
typename Coercion_traits<ET,RT>::Cast());
|
||||
NT_converter<RT,ET>());
|
||||
}
|
||||
|
||||
// initial solution
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
#include <CGAL/QP_solver/QP_exact_bland_pricing.h>
|
||||
|
||||
#include <CGAL/algorithm.h>
|
||||
#include <CGAL/NT_converter.h>
|
||||
|
||||
#include <CGAL/IO/Verbose_ostream.h>
|
||||
|
||||
|
|
@ -1609,7 +1610,7 @@ ratio_test_1__q_x_S( Tag_false)
|
|||
_1,
|
||||
boost::bind(std::multiplies<ET>(), d,
|
||||
boost::bind(
|
||||
typename Coercion_traits<ET,RT>::Cast(),
|
||||
NT_converter<RT,ET>(),
|
||||
_2))));
|
||||
}
|
||||
|
||||
|
|
@ -1896,7 +1897,7 @@ basis_matrix_stays_regular()
|
|||
std::transform(A_row_by_index_iterator( B_O.begin(), a_accessor),
|
||||
A_row_by_index_iterator( B_O.end (), a_accessor),
|
||||
tmp_x.begin(),
|
||||
typename Coercion_traits<ET,RT>::Cast());
|
||||
NT_converter<RT,ET>());
|
||||
inv_M_B.multiply( tmp_x.begin(), // dummy (not used)
|
||||
tmp_x.begin(), tmp_l_2.begin(), tmp_x_2.begin(),
|
||||
Tag_false(), // QP
|
||||
|
|
@ -1976,7 +1977,7 @@ struct submul {
|
|||
ET const& d;
|
||||
submul(ET const&d):d(d) {}
|
||||
ET operator()(RT const&x, ET const&y) const {
|
||||
typename Coercion_traits<ET, RT>::Cast cast;
|
||||
NT_converter<RT, ET> cast;
|
||||
return cast(x) * d - y;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <CGAL/QP_solver/Initialization.h>
|
||||
#include <boost/bind.hpp>
|
||||
#include <CGAL/NT_converter.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -73,7 +74,7 @@ transition( )
|
|||
C_by_index_iterator( B_O.end (), c_accessor),
|
||||
minus_c_B.begin(),
|
||||
boost::bind(
|
||||
typename Coercion_traits<ET,RT>::Cast(),
|
||||
NT_converter<RT,ET>(),
|
||||
boost::bind(std::negate<RT>(), _1)));
|
||||
|
||||
// compute initial solution of phase II
|
||||
|
|
@ -425,7 +426,7 @@ ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j_, Tag_true)
|
|||
if ( j_ < qp_n) { // original variable
|
||||
|
||||
CGAL::transform_n( *(qp_A + j_), qp_m, A_Cj_it,
|
||||
typename Coercion_traits<ET,A_entry>::Cast());
|
||||
NT_converter<A_entry,ET>());
|
||||
|
||||
} else { // artificial variable
|
||||
|
||||
|
|
@ -447,7 +448,7 @@ ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j_, Tag_false)
|
|||
std::transform(A_by_index_iterator( C.begin(), a_accessor),
|
||||
A_by_index_iterator( C.end (), a_accessor),
|
||||
A_Cj_it,
|
||||
typename Coercion_traits<ET,RT>::Cast());
|
||||
NT_converter<RT,ET>());
|
||||
|
||||
} else {
|
||||
unsigned int k = j_;
|
||||
|
|
@ -473,7 +474,7 @@ ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j_, Tag_false)
|
|||
std::transform(S_by_index_iterator( C.begin(), s_accessor),
|
||||
S_by_index_iterator( C.end (), s_accessor),
|
||||
A_Cj_it,
|
||||
typename Coercion_traits<ET,RT>::Cast());
|
||||
NT_converter<RT,ET>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1451,7 +1452,7 @@ replace_variable_slack_slack( )
|
|||
std::transform(A_row_by_index_iterator( B_O.begin(), a_accessor),
|
||||
A_row_by_index_iterator( B_O.end (), a_accessor),
|
||||
tmp_x.begin(),
|
||||
typename Coercion_traits<ET,RT>::Cast());
|
||||
NT_converter<RT,ET>());
|
||||
if ( art_s_i > 0) { // special artificial
|
||||
tmp_x[ in_B[ art_s_i]] = ET( art_s[ new_row]);
|
||||
}
|
||||
|
|
@ -1604,7 +1605,7 @@ replace_variable_original_slack( )
|
|||
std::transform(A_row_by_index_iterator( B_O.begin(), a_accessor),
|
||||
A_row_by_index_iterator( B_O.end (), a_accessor),
|
||||
tmp_x.begin(),
|
||||
typename Coercion_traits<ET,RT>::Cast());
|
||||
NT_converter<RT,ET>());
|
||||
if ( art_s_i > 0) { // special art.
|
||||
tmp_x[ in_B[ art_s_i]] = ET( art_s[ new_row]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue