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

Private GIT Repository
Remove unused misc::address.
[loba.git] / cost_func.cpp
index c3a463b508c36ec0d9d428e35bddc385e3f73b50..73111999216e837fe156e5dbc0eb23d0c6ef3f7c 100644 (file)
@@ -3,6 +3,7 @@
 #include <cstring>
 #include <iterator>
 #include <sstream>
+
 #include "cost_func.h"
 
 cost_func::cost_func(const char* param)
@@ -40,10 +41,10 @@ cost_func& cost_func::operator=(const cost_func& ref)
 
 double cost_func::operator()(double amount) const
 {
-    double ret = factor[degree];
+    double result = factor[degree];
     for (int i = degree - 1; i >= 0 ; i--)
-        ret = amount * ret + factor[i];
-    return ret;
+        result = amount * result + factor[i];
+    return result;
 }
 
 std::string cost_func::to_string()