]> AND Private Git Repository - loba.git/blobdiff - cost_func.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
ag_parameters: set -S0.5 and -g2000.
[loba.git] / cost_func.cpp
index 12c20f6a2cd88824de1645f4c7650f4f6488c6a9..d6cba8c88ed667484b1f6af6ce0b95a3ec9244da 100644 (file)
@@ -1,5 +1,5 @@
 #include <algorithm>
-#include <tr1/functional>
+#include <functional>
 #include <numeric>
 #include <iterator>
 #include <sstream>
@@ -30,13 +30,12 @@ cost_func::~cost_func()
 
 double cost_func::operator()(double amount) const
 {
-    using std::tr1::bind;
-    using std::tr1::placeholders::_1;
-    using std::tr1::placeholders::_2;
+    using std::placeholders::_1;
+    using std::placeholders::_2;
     return std::accumulate(++factors.begin(), factors.end(), factors.front(),
-                           bind(std::plus<double>(),
-                                bind(std::multiplies<double>(), amount, _1),
-                                _2));
+                           std::bind(std::plus<double>(),
+                                     std::bind(std::multiplies<double>(),
+                                               amount, _1), _2));
 }
 
 std::string cost_func::to_string()