11 #ifndef PRIMATOLOGIST_OPTIMIZATION_WOLFE_DECL_H 12 #define PRIMATOLOGIST_OPTIMIZATION_WOLFE_DECL_H 15 #include <cartobase/config/verbose.h> 54 const Vector & x =
Vector(),
55 const Vector & p =
Vector() );
113 bool wolfe1(
float a )
const;
116 bool wolfe2(
float a )
const;
127 #endif // PRIMATOLOGIST_OPTIMIZATION_WOLFE_DECL_H int _max_it
maximum number of iterations
void setMaximize(bool maximize=false)
void setPosition(const Vector &x=Vector())
WolfeLineSearch(const Objective &f=Objective(), const Vector &x=Vector(), const Vector &p=Vector())
bool wolfe2s(float a) const
strong 2nd Wolfe condition
float _current_value
f(x + a.p)
void setSearchDirection(const Vector &p=Vector())
WolfeLineSearch< O > & operator=(const WolfeLineSearch< O > &other)
void setVerbose(int v=carto::verbose)
bool wolfe2(float a) const
select condition based on _strong
bool checkDirection()
Compute f(x) and <p, g(x)>.
void setMaxIterations(int n=- 1)
const Vector & searchDirection() const
Matrix class implementing matrix operations.
bool wolfe2w(float a) const
weak 2nd Wolfe condition
const Objective & objectiveFunction() const
float _previous_value
f(x)
void setStrongWolfe(bool strong=false)
void setObjectiveFunction(const Objective &f)
void setC1(float c1=1E-4)
bool wolfe1(float a) const
Armijo (= Wolfe 1st) condition.
int maxIterations() const
Objective _f
objectiveFunction
int _verbose
verbosity level
Once an ascent direction is given, this class performs a line search that respects wolfe conditions...
bool _maximize
maximize or minimize
float _previous_scalarprod
<p, g(x)>
const Vector & position() const