diff --git a/hist/hist/src/TKDE.cxx b/hist/hist/src/TKDE.cxx index 2d0d39c7c8eba7e3ac2881b8028fe98e8e90e8ec..0771da51c777fa8828a0fb9fab064076d754a779 100644 --- a/hist/hist/src/TKDE.cxx +++ b/hist/hist/src/TKDE.cxx @@ -720,7 +720,8 @@ void TKDE::TKernel::ComputeAdaptiveWeights() { } Double_t kAPPROX_GEO_MEAN = 0.241970724519143365; // 1 / TMath::Power(2 * TMath::Pi(), .5) * TMath::Exp(-.5). Approximated geometric mean over pointwise data (the KDE function is substituted by the "real Gaussian" pdf) and proportional to sigma. Used directly when the mirroring is enabled, otherwise computed from the data fKDE->fAdaptiveBandwidthFactor = fKDE->fUseMirroring ? kAPPROX_GEO_MEAN / fKDE->fSigmaRob : std::sqrt(std::exp(fKDE->fAdaptiveBandwidthFactor / fKDE->fData.size())); - transform(weights.begin(), weights.end(), fWeights.begin(), std::bind2nd(std::multiplies<Double_t>(), fKDE->fAdaptiveBandwidthFactor)); + transform(weights.begin(), weights.end(), fWeights.begin(), + std::bind(std::multiplies<Double_t>(), std::placeholders::_1, fKDE->fAdaptiveBandwidthFactor)); //printf("adaptive bandwidth factor % f weight 0 %f , %f \n",fKDE->fAdaptiveBandwidthFactor, weights[0],fWeights[0] ); } diff --git a/math/mathcore/src/GoFTest.cxx b/math/mathcore/src/GoFTest.cxx index a6575e0ca72c3b4131f1dd8d44b66487cac5e969..f5badbbe2415bd95f1f322fc7fa7623fcd801cfe 100644 --- a/math/mathcore/src/GoFTest.cxx +++ b/math/mathcore/src/GoFTest.cxx @@ -670,7 +670,8 @@ void GoFTest::AndersonDarling2SamplesTest(Double_t& pvalue, Double_t& testStat) for (std::vector<Double_t>::iterator data = z.begin(); data != endUnique; ++data) { UInt_t n = std::count(fCombinedSamples.begin(), fCombinedSamples.end(), *data); h.push_back(n); - H.push_back(std::count_if(fCombinedSamples.begin(), fCombinedSamples.end(), bind2nd(std::less<Double_t>(), *data)) + n / 2.); + H.push_back(std::count_if(fCombinedSamples.begin(), fCombinedSamples.end(), + std::bind(std::less<Double_t>(), std::placeholders::_1, *data)) + n / 2.); } std::cout << "time for H"; w.Print(); @@ -679,7 +680,8 @@ void GoFTest::AndersonDarling2SamplesTest(Double_t& pvalue, Double_t& testStat) for (UInt_t i = 0; i < nSamples; ++i) { for (std::vector<Double_t>::iterator data = z.begin(); data != endUnique; ++data) { UInt_t n = std::count(fSamples[i].begin(), fSamples[i].end(), *data); - F[i].push_back(std::count_if(fSamples[i].begin(), fSamples[i].end(), bind2nd(std::less<Double_t>(), *data)) + n / 2.); + F[i].push_back(std::count_if(fSamples[i].begin(), fSamples[i].end(), + std::bind(std::less<Double_t>(), std::placeholders::_1, *data)) + n / 2.); } } std::cout << "time for F"; diff --git a/misc/memstat/inc/TMemStatHelpers.h b/misc/memstat/inc/TMemStatHelpers.h index 87b5ef16ecf68cffa3eab7e9837050da2ccff4f9..10c59621ef468e8dbea6a487bc9cf0ae7c70e34d 100644 --- a/misc/memstat/inc/TMemStatHelpers.h +++ b/misc/memstat/inc/TMemStatHelpers.h @@ -48,7 +48,7 @@ namespace Memstat { iterator_t iter(&_Container); iterator_t found( - std::find_if(iter.Begin(), iterator_t::End(), bind2nd(SFind_t(), _ToFind)) + std::find_if(iter.Begin(), iterator_t::End(), std::bind(SFind_t(), std::placeholders::_1, _ToFind)) ); return ((!(*found)) ? -1 : std::distance(iter.Begin(), found)); } diff --git a/net/glite/src/TGLite.cxx b/net/glite/src/TGLite.cxx index 2735fa36eab23fc9fc0e183368e251f9de8a096f..389a59b6f0c4dbd221a9417e40676e5d43a614c8 100644 --- a/net/glite/src/TGLite.cxx +++ b/net/glite/src/TGLite.cxx @@ -202,7 +202,7 @@ struct SAddMapElementFunc: public binary_function<SLFCFileInfo_t, TGLiteResult*, // Add replication info for_each(_lfc_info.m_LFCRepInfoVector.begin(), _lfc_info.m_LFCRepInfoVector.end(), - bind2nd(SAddRepInfo(), map)); + std::bind(SAddRepInfo(), std::placeholders::_1, map)); _Result->Add(map); return true; @@ -321,7 +321,7 @@ TGridResult* TGLite::Query(const char *_path, const char *_pattern /*= NULL*/, c // Creating ROOT containers to store the resultset TGLiteResult *result = new TGLiteResult(); - for_each(container.begin(), container.end(), bind2nd(SAddMapElementFunc(), result)); + for_each(container.begin(), container.end(), std::bind(SAddMapElementFunc(), std::placeholders::_1, result)); return result; } @@ -369,7 +369,7 @@ TGridResult* TGLite::Ls(const char *_ldn, Option_t* /*options*/, Bool_t /*verbos // Creating a ROOT container to store the resultset TGLiteResult *result = new TGLiteResult(); - for_each(container.begin(), container.end(), bind2nd(SAddMapElementFunc(), result)); + for_each(container.begin(), container.end(), std::bind(SAddMapElementFunc(), std::placeholders::_1, result)); return result; } diff --git a/tmva/tmva/src/MethodFDA.cxx b/tmva/tmva/src/MethodFDA.cxx index 0e540f912da5e66b447acfbfd7e1b33c2b25ce0f..c9d51208a240a597e600d08bf8fbb6d5ee6c73fd 100644 --- a/tmva/tmva/src/MethodFDA.cxx +++ b/tmva/tmva/src/MethodFDA.cxx @@ -596,9 +596,6 @@ void TMVA::MethodFDA::CalculateMulticlassValues( const TMVA::Event*& evt, std::v values.push_back( value ); sum += value; } - - // // normalize to sum of value (commented out, .. have to think of how to treat negative classifier values) - // std::transform( fMulticlassReturnVal.begin(), fMulticlassReturnVal.end(), fMulticlassReturnVal.begin(), bind2nd( std::divides<float>(), sum) ); } //////////////////////////////////////////////////////////////////////////////// diff --git a/tmva/tmva/src/RuleFitParams.cxx b/tmva/tmva/src/RuleFitParams.cxx index c2aa58d10eca8915109bc7166a8a752c5a53e94a..6824d0c209c924f81487f841ba9af732074dde69 100644 --- a/tmva/tmva/src/RuleFitParams.cxx +++ b/tmva/tmva/src/RuleFitParams.cxx @@ -1079,11 +1079,13 @@ Double_t TMVA::RuleFitParams::ErrorRateRocRaw( std::vector<Double_t> & sFsig, // for (Int_t i=0; i<np; i++) { fcut = minf + df*Double_t(i); - indit = std::find_if( sFsig.begin(), sFsig.end(), std::bind2nd(std::greater_equal<Double_t>(), fcut)); + indit = std::find_if(sFsig.begin(), sFsig.end(), + std::bind(std::greater_equal<Double_t>(), std::placeholders::_1, fcut)); nesig = sFsig.end()-indit; // number of sig accepted with F>cut if (TMath::Abs(pnesig-nesig)>0) { npok++; - indit = std::find_if( sFbkg.begin(), sFbkg.end(), std::bind2nd(std::greater_equal<Double_t>(), fcut)); + indit = std::find_if(sFbkg.begin(), sFbkg.end(), + std::bind(std::greater_equal<Double_t>(), std::placeholders::_1, fcut)); nrbkg = indit-sFbkg.begin(); // number of bkg rejected with F>cut rejb = Double_t(nrbkg)/Double_t(nbkg); effs = Double_t(nesig)/Double_t(nsig);