Loading...
Searching...
No Matches
lineSearch.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: lineSearch.h,v 1.20.18.3 2007/08/07 09:12:34 aleru Exp $
//
// Line Search Minimizer: A special class for the line search minimization algorithm
#ifndef BALL_MOLMEC_MINIMIZATION_LINESEARCH_H
#define BALL_MOLMEC_MINIMIZATION_LINESEARCH_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
namespace BALL
{
class EnergyMinimizer;
class BALL_EXPORT LineSearch
{
public:
BALL_CREATE(LineSearch)
LineSearch();
LineSearch(EnergyMinimizer& minimizer);
LineSearch(const LineSearch& line_search);
virtual ~LineSearch() ;
const LineSearch& operator=(const LineSearch& LineSearch);
void setAlpha(double alpha);
void setBeta(double beta);
double getAlpha() const;
double getBeta() const;
Size getMaxSteps() const;
void setMaxSteps(Size steps);
void setLowerBound(double lbound);
double getLowerBound() const;
void setXTol(double xtol);
double getXTol() const;
void setBracketedFlag(bool bracktd);
bool isBracketed() const;
void setMinimizer(EnergyMinimizer& minimizer);
virtual void takeStep(double &st_a, double &f_a, double &g_a, double &st_b, double &f_b,
double &g_b, double &stp, double f, double g, double minstp, double maxstp);
virtual bool minimize(double& stp, bool keep_gradient = false);
protected:
/*_ Parameter alpha for line search criterion.
*/
double alpha_;
/*_ Parameter beta for line search criterion.
*/
double beta_;
/*_ Parameter for the number of interpolation steps
*/
Size max_steps_;
/*_ Lower bound for energy values.
*/
double lower_energy_bound_;
/*_ Nonnegative relative tolerance for an acceptable step.
*/
double stptol_;
/*_ Specifies whether a minimizer has already been bracketed or not.
*/
bool is_bracketed_;
/*_ Calling minimizer class which provides the search direction among other things.
*/
EnergyMinimizer* minimizer_;
};
} // namespace BALL
#endif // BALL_MOLMEC_MINIMIZATION/LINESEARCH_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::EnergyMinimizer
Definition energyMinimizer.h:30
BALL::LineSearch::setMinimizer
void setMinimizer(EnergyMinimizer &minimizer)
BALL::LineSearch::isBracketed
bool isBracketed() const
BALL::LineSearch::getBeta
double getBeta() const
BALL::LineSearch::beta_
double beta_
Definition lineSearch.h:206
BALL::LineSearch::minimize
virtual bool minimize(double &stp, bool keep_gradient=false)
BALL::LineSearch::takeStep
virtual void takeStep(double &st_a, double &f_a, double &g_a, double &st_b, double &f_b, double &g_b, double &stp, double f, double g, double minstp, double maxstp)
BALL::LineSearch::getLowerBound
double getLowerBound() const
BALL::LineSearch::minimizer_
EnergyMinimizer * minimizer_
Definition lineSearch.h:226
BALL::LineSearch::setBracketedFlag
void setBracketedFlag(bool bracktd)
BALL::LineSearch::getXTol
double getXTol() const
BALL::LineSearch::stptol_
double stptol_
Definition lineSearch.h:218
BALL::LineSearch::getAlpha
double getAlpha() const
BALL::LineSearch::alpha_
double alpha_
Definition lineSearch.h:202
BALL::LineSearch::lower_energy_bound_
double lower_energy_bound_
Definition lineSearch.h:214
BALL::LineSearch::setAlpha
void setAlpha(double alpha)
BALL::LineSearch::setXTol
void setXTol(double xtol)
BALL::LineSearch::getMaxSteps
Size getMaxSteps() const
BALL::LineSearch::setLowerBound
void setLowerBound(double lbound)
BALL::LineSearch::LineSearch
LineSearch()
BALL::LineSearch::setMaxSteps
void setMaxSteps(Size steps)
BALL::LineSearch::is_bracketed_
bool is_bracketed_
Definition lineSearch.h:222
BALL::LineSearch::setBeta
void setBeta(double beta)
BALL::LineSearch::max_steps_
Size max_steps_
Definition lineSearch.h:210
common.h
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114