X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/d47d44b2ed067c834ef210ad544512e7581a1c8e..e536ac5528b51d2c1dec76a5bc1c37b9aaeae67f:/cost_func.h?ds=sidebyside diff --git a/cost_func.h b/cost_func.h index 57d1188..d7310d2 100644 --- a/cost_func.h +++ b/cost_func.h @@ -4,9 +4,12 @@ #include #include +// 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: - cost_func(const char *param); + cost_func(const char* param); ~cost_func(); cost_func& operator=(const cost_func& ref); @@ -14,7 +17,7 @@ public: std::string to_string(); private: int degree; - double *factor; + double* factor; }; #endif // !COST_FUNC_H