#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:
cost_func(const char* param);