{
using std::tr1::bind;
using std::tr1::placeholders::_1;
+ using std::tr1::placeholders::_2;
pneigh_sort_by_load(std::less<double>());
// find limit between least loaded neighbors, and more loaded ones
pneigh_type::iterator bound =
- std::find_if(pneigh.begin(), pneigh.end(),
- bind(std::less_equal<double>(),
- get_load(), bind(&neighbor::get_load, _1)));
+ std::lower_bound(pneigh.begin(), pneigh.end(),
+ get_load(),
+ bind(std::less<double>(),
+ bind(&neighbor::get_load, _1), _2));
// compute load differences
std::vector<double> delta(bound - pneigh.begin());