18 # ifndef __GRAD_DESCEND__H 19 # define __GRAD_DESCEND__H 74 void line_search(Matrix_real& x, Matrix_real& g, Matrix_real& search_direction, Matrix_real& x0_search, Matrix_real& g0_search,
double& maximal_step,
double& d__dot__g,
double& f);
81 virtual void Optimize(Matrix_real& x,
double& f);
99 virtual void get_search_direction(Matrix_real& g, Matrix_real& search_direction,
double& search_direction__grad_overlap);
119 Grad_Descend(
void (* f_pointer) (Matrix_real,
void *,
double *, Matrix_real&),
void* meta_data_in);
128 Grad_Descend(
void (* f_pointer) (Matrix_real,
void *,
double *, Matrix_real&),
void (* export_pointer)(
double , Matrix_real&,
void* ),
void* meta_data_in);
void * meta_data
additional data needed to evaluate the cost function
A class implementing the BFGS iterations on the.
void get_f_ang_gradient(Matrix_real &x, double &f, Matrix_real &g)
Call this method to obtain the cost function and its gradient at a gives position given by x...
void get_Maximal_Line_Search_Step(Matrix_real &search_direction, double &maximal_step, double &search_direction__grad_overlap)
Call this method to obtain the maximal step size during the line search.
long maximal_iterations
maximal count of iterations during the optimization
void line_search(Matrix_real &x, Matrix_real &g, Matrix_real &search_direction, Matrix_real &x0_search, Matrix_real &g0_search, double &maximal_step, double &d__dot__g, double &f)
Call to perform inexact line search terminated with Wolfe 1st and 2nd conditions. ...
void(* export_fnc)(double, Matrix_real &, void *)
function pointer to evaluate the cost function and its gradient vector
double Start_Optimization(Matrix_real &x, long maximal_iterations_in=5001)
Call this method to start the optimization.
~Grad_Descend()
Destructor of the class.
virtual void Optimize(Matrix_real &x, double &f)
Call this method to start the optimization process.
enum solver_status status
status of the solver
long function_call_count
number of function calls during the optimization process
Grad_Descend(void(*f_pointer)(Matrix_real, void *, double *, Matrix_real &), void *meta_data_in)
Constructor of the class.
int variable_num
number of independent variables in the problem
double num_precision
numerical precision used in the calculations
virtual void get_search_direction(Matrix_real &g, Matrix_real &search_direction, double &search_direction__grad_overlap)
Method to get the search direction in the next line search.
Class to store data of complex arrays and its properties.
solver_status
status indicators of the solver
void(* costfnc__and__gradient)(Matrix_real x, void *params, double *f, Matrix_real &g)
function pointer to evaluate the cost function and its gradient vector