mirror of https://github.com/CGAL/cgal
start removing bind in QP_solver
This commit is contained in:
parent
d8d5f1de5b
commit
a925a64fcf
|
|
@ -410,7 +410,7 @@ class QP_basis_inverse {
|
|||
m_it1 = M.begin()+l;
|
||||
for ( row = 0; row < s; ++row, ++m_it1) {
|
||||
std::transform( m_it1->begin(), m_it1->begin()+s, m_it1->begin(),
|
||||
boost::bind2nd( std::multiplies<ET>(), d));
|
||||
[this](const ET& v){return v * this->d;});
|
||||
}
|
||||
|
||||
// new denominator: |det(A_B)|^2
|
||||
|
|
|
|||
|
|
@ -178,13 +178,11 @@ z_replace_original_by_original(ForwardIterator y_l_it,
|
|||
|
||||
// tmp_l -part
|
||||
std::transform(y_l_it, (y_l_it+s), x_l.begin(), tmp_l.begin(),
|
||||
compose2_2(std::plus<ET>(), Identity<ET>(),
|
||||
boost::bind1st(std::multiplies<ET>(), s_delta)));
|
||||
[&s_delta](const ET& v1, const ET& v2){ return Identity<ET>()(v1) + v2 * s_delta; });
|
||||
|
||||
// tmp_x -part
|
||||
std::transform(y_x_it, (y_x_it+b), x_x.begin(), tmp_x.begin(),
|
||||
compose2_2(std::plus<ET>(), Identity<ET>(),
|
||||
boost::bind1st(std::multiplies<ET>(), s_delta)));
|
||||
[&s_delta](const ET& v1, const ET& v2){ return Identity<ET>()(v1) + v2 * s_delta; });
|
||||
tmp_x[k_i] -= d;
|
||||
|
||||
// prepare \hat{k}_{2} -scalar
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <CGAL/Quotient.h>
|
||||
#include <CGAL/function_objects.h>
|
||||
#include <boost/bind.hpp>
|
||||
#include <functional>
|
||||
|
||||
// functor int x int -> Quotient<int>, (a,b) -> a/b
|
||||
// ------------------------------------------------
|
||||
|
|
@ -26,8 +26,8 @@ int main()
|
|||
// ---------------------------------------
|
||||
int three = 3;
|
||||
int two = 2;
|
||||
std::cout << boost::bind
|
||||
(Quotient_inverter(), boost::bind
|
||||
std::cout << std::bind
|
||||
(Quotient_inverter(), std::bind
|
||||
(Quotient_creator(), _1, _2))
|
||||
// ...and apply it to (3, 2)
|
||||
// -------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue