// Mandatory Header File for Steepest Descent Project for Ma5903 #include #include #include // Vector Structure typedef struct {int n; float *comp;} Vec; // Prototypes for objective function f and gradient float F(const Vec x); Vec GradF(const Vec x); // Prototype for Wolfe condition test int WolfeTest( const Vec x, const float alpha, const Vec p, const float fval, const Vec gradfval, float (*F)(const Vec x), Vec (*GradF)(const Vec x) ); // Prototype for the steepest descent iterator Vec Iterator( const Vec x, float (*F)(const Vec x), Vec (*GradF)(const Vec x) ); // Prototype for the convergence control Vec SteepestDescent( const Vec X0, const float Tolerance, const int MaxSteps, float (*F)(const Vec x), Vec (*GradF)(const Vec x) ); // Prototype for the Norm float Norm(const Vec x); // Prototype for Printing void PrintScalar(Vec *VecList, int n, float (*F)(const Vec x)); // External Parameters!