/*
    Context for a line search method for unconstrained minimization
 */

#ifndef __TAO_LINESEARCH_H
#define __TAO_LINESEARCH_H
#include "src/tao_impl.h"

typedef struct {

/* --------------- Parameters used by line search method ----------------- */
  double maxstep;	     /* maximum step size */
  double rtol;		     /* relative tol for acceptable step (rtol>0) */
  double ftol;		     /* tol for sufficient decrease condition (ftol>0) */
  double gtol;		     /* tol for curvature condition (gtol>0)*/
  double stepmin;	     /* lower bound for step */
  double stepmax;	     /* upper bound for step */
  int    maxfev;	     /* maximum funct evals per line search call */
  int    nfev;		     /* number of funct evals per line search call */
  int    bracket;
  int    infoc;
} TAO_LINESEARCH;

int TaoSetOptions_LineSearch(TAO_SOLVER,void*);
int TaoView_LineSearch(TAO_SOLVER,void*);
int TaoStep_LineSearch(TAO_SOLVER,double *,double *,double *,
		       double*,double* ,double* ,double*, double *,double *);
int TaoDestroy_LineSearch(TAO_SOLVER,void*);

#endif
