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

Private GIT Repository
Correctly initialize members for deployment_generator::host_parameters.
[loba.git] / cost_func.h
index 57d1188ddbbdde9c7ee02687f44cadcda1c81eba..d7310d2d412bb789ee1638bba3f09e1e7a8b8d5e 100644 (file)
@@ -4,9 +4,12 @@
 #include <iostream>
 #include <string>
 
 #include <iostream>
 #include <string>
 
+// Define a polynomial function
+// The factors are given at construction time, in a C-style string,
+// separated by commas (eg. "1, 2, 3" for x^2 + 2x +3).
 class cost_func {
 public:
 class cost_func {
 public:
-    cost_func(const char *param);
+    cost_func(const charparam);
     ~cost_func();
     cost_func& operator=(const cost_func& ref);
 
     ~cost_func();
     cost_func& operator=(const cost_func& ref);
 
@@ -14,7 +17,7 @@ public:
     std::string to_string();
 private:
     int degree;
     std::string to_string();
 private:
     int degree;
-    double *factor;
+    doublefactor;
 };
 
 #endif // !COST_FUNC_H
 };
 
 #endif // !COST_FUNC_H