#include #include using namespace std; using Vec = vector; Vec operator+(const Vec& a, const Vec& b); Vec operator-(const Vec& a, const Vec& b); Vec operator*(double s, const Vec& a); double norm(const Vec& a); double line_search( const Vec& x, const Vec& dir, function obj, double a = -1., double b = 1. ); Vec powell( Vec x, function obj, double tol = 1e-8, int max_iter = 200 );