@@ -83,9 +83,10 @@ void vfOptimizeParameters(xr_vector<xr_vector<REAL>>& A, xr_vector<xr_vector<REA
8383 {
8484 dPreviousFunctional = dFunctional;
8585 dafGradient (daEvalResults, daGradient, B, dNormaFactor);
86- std::transform (
87- daGradient.begin (), daGradient.end (), daGradient.begin (), std::bind2nd (std::multiplies<REAL>(), -dAlpha));
88- std::transform (daDelta.begin (), daDelta.end (), daDelta.begin (), std::bind2nd (std::multiplies<REAL>(), dBeta));
86+ std::transform (daGradient.begin (), daGradient.end (), daGradient.begin (),
87+ std::bind (std::multiplies<REAL>(), std::placeholders::_1, -dAlpha));
88+ std::transform (daDelta.begin (), daDelta.end (), daDelta.begin (),
89+ std::bind (std::multiplies<REAL>(), std::placeholders::_1, dBeta));
8990 std::transform (daGradient.begin (), daGradient.end (), daDelta.begin (), daDelta.begin (), std::plus<REAL>());
9091 std::transform (C.begin (), C.end (), daDelta.begin (), C.begin (), std::plus<REAL>());
9192 std::transform (D.begin (), D.end (), daDelta.begin (), D.begin (), std::plus<REAL>());
@@ -95,7 +96,8 @@ void vfOptimizeParameters(xr_vector<xr_vector<REAL>>& A, xr_vector<xr_vector<REA
9596
9697 if (dPreviousFunctional < dFunctional)
9798 {
98- std::transform (daDelta.begin (), daDelta.end (), daDelta.begin (), std::bind2nd (std::multiplies<REAL>(), -1 .f ));
99+ std::transform (daDelta.begin (), daDelta.end (), daDelta.begin (),
100+ std::bind (std::multiplies<REAL>(), std::placeholders::_1, -1 .f ));
99101 std::transform (C.begin (), C.end (), daDelta.begin (), C.begin (), std::plus<REAL>());
100102 std::transform (D.begin (), D.end (), daDelta.begin (), D.begin (), std::plus<REAL>());
101103 }
0 commit comments