7#ifndef _math_optimize_mcsearch_h
8#define _math_optimize_mcsearch_h
14#include <math/optimize/opt.h>
15#include <util/misc/autovec.h>
28 double gtol_, stpmin_, stpmax_;
31 double dg, fm, fx, fy, dgm, dgx, dgy, fxm, fym, stx, sty, dgxm,
34 double finit, width, stmin, stmax;
36 double width1, ftest1;
38 double dginit, dgtest;
41 double p, q, r__, s, sgnd, stpc, stpf, stpq, gamma, theta;
49 mcstep(
double *stx,
double *fx,
double *dx,
50 double *sty,
double *fy,
double *dy,
double *stp,
51 double *fp,
double *dp,
bool *brackt,
double *stpmin,
52 double *stpmax,
int *info);
55 mcsrch(
int *n,
double *x,
double *f,
56 double *g,
double *s,
double *stp,
double *ftol,
57 double *xtol,
int *maxfev,
int *info,
int *nfev,
The LineOpt abstract class is used to perform one dimensional optimizations.
Definition opt.h:123
This performs line searches with cubic steps.
Definition mcsearch.h:24
void init(RefSCVector &direction)
Initializes the line search object.
MCSearch(const Ref< KeyVal > &)
The MCSearch KeyVal CTOR does not read any input.
void init(RefSCVector &direction, Ref< Function > function)
Initializes the line search object.
Ref< Function > function() const
Returns information about the Function being optimized.
Definition opt.h:114
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition matrix.h:55
A template class that maintains references counts.
Definition ref.h:332
The auto_vec class functions much like auto_ptr, except it contains references to arrays.
Definition autovec.h:58