BALL 1.5.0
Loading...
Searching...
No Matches
lineSearch.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: lineSearch.h,v 1.20.18.3 2007/08/07 09:12:34 aleru Exp $
5//
6
7// Line Search Minimizer: A special class for the line search minimization algorithm
8
9#ifndef BALL_MOLMEC_MINIMIZATION_LINESEARCH_H
10#define BALL_MOLMEC_MINIMIZATION_LINESEARCH_H
11
12#ifndef BALL_COMMON_H
13# include <BALL/common.h>
14#endif
15
16namespace BALL
17{
18 class EnergyMinimizer;
19
33 {
34 public:
35
39
41
42
45
49
52 LineSearch(const LineSearch& line_search);
53
56 virtual ~LineSearch() ;
57
59
62
65 const LineSearch& operator=(const LineSearch& LineSearch);
66
68
71
75 void setAlpha(double alpha);
76
80 void setBeta(double beta);
81
85 double getAlpha() const;
86
90 double getBeta() const;
91
95
98 void setMaxSteps(Size steps);
99
103 void setLowerBound(double lbound);
104
107 double getLowerBound() const;
108
111 void setXTol(double xtol);
112
115 double getXTol() const;
116
124 void setBracketedFlag(bool bracktd);
125
130 bool isBracketed() const;
131
136
158 virtual void takeStep(double &st_a, double &f_a, double &g_a, double &st_b, double &f_b,
159 double &g_b, double &stp, double f, double g, double minstp, double maxstp);
160
162
165
195 virtual bool minimize(double& stp, bool keep_gradient = false);
197
198 protected:
199
200 /*_ Parameter alpha for line search criterion.
201 */
202 double alpha_;
203
204 /*_ Parameter beta for line search criterion.
205 */
206 double beta_;
207
208 /*_ Parameter for the number of interpolation steps
209 */
211
212 /*_ Lower bound for energy values.
213 */
215
216 /*_ Nonnegative relative tolerance for an acceptable step.
217 */
218 double stptol_;
219
220 /*_ Specifies whether a minimizer has already been bracketed or not.
221 */
223
224 /*_ Calling minimizer class which provides the search direction among other things.
225 */
227
228 };
229
230} // namespace BALL
231
232#endif // BALL_MOLMEC_MINIMIZATION/LINESEARCH_H
#define BALL_EXPORT
void setMinimizer(EnergyMinimizer &minimizer)
bool isBracketed() const
double getBeta() const
virtual bool minimize(double &stp, bool keep_gradient=false)
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)
double getLowerBound() const
EnergyMinimizer * minimizer_
Definition lineSearch.h:226
void setBracketedFlag(bool bracktd)
double getXTol() const
double getAlpha() const
double lower_energy_bound_
Definition lineSearch.h:214
void setAlpha(double alpha)
void setXTol(double xtol)
Size getMaxSteps() const
void setLowerBound(double lbound)
void setMaxSteps(Size steps)
void setBeta(double beta)
#define BALL_CREATE(name)
Definition create.h:62
BALL_SIZE_TYPE Size