00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef QMCWolfeStepLengthSelector_H
00014 #define QMCWolfeStepLengthSelector_H
00015
00016 #include <iostream>
00017
00018 #include "QMCLineSearchStepLengthSelectionAlgorithm.h"
00019
00020 using namespace std;
00021
00028 class QMCWolfeStepLengthSelector :
00029 public QMCLineSearchStepLengthSelectionAlgorithm
00030 {
00031 public:
00032 double stepLength(QMCObjectiveFunction *function,
00033 Array1D<double> & position,
00034 Array1D<double> & searchDirection,
00035 Array1D<double> & gradient,
00036 Array2D<double> & unused,
00037 double functionValue);
00038
00039 private:
00043 QMCObjectiveFunction *OF;
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 double calculateLineSearchObjectiveFunction(Array1D<double> & params,
00063 Array1D<double> & searchDirection,
00064 double stepLength);
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 double calculateLineSearchObjectiveFunctionDerivative(
00084 Array1D<double> & params,
00085 Array1D<double> & searchDirection,
00086 double stepLength);
00102 double cubicInterpolateStep(double alphaLo, double alphaHi,
00103 double phi_0,
00104 double phi_alphaLo, double phi_alphaHi,
00105 double phiPrime_0);
00106
00124 double zoom(double alphaLo, double alphaHi, double phi_0,
00125 double phi_alphaLo, double phi_alphaHi,
00126 double phiPrime_0, Array1D<double> & params,
00127 Array1D<double> & searchDirection);
00128
00142 double wolfeStepLength(double alphaGuess, Array1D<double> & params,
00143 Array1D<double> & searchDirection,
00144 Array1D<double> & gradient,
00145 double functionValue);
00146
00147
00148 };
00149
00150 #endif