00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef QMCMikesBracketingStepLengthSelector_H
00014 #define QMCMikesBracketingStepLengthSelector_H
00015
00016 #include <iostream>
00017
00018 #include "IeeeMath.h"
00019 #include "QMCLineSearchStepLengthSelectionAlgorithm.h"
00020
00021 using namespace std;
00022
00030 class QMCMikesBracketingStepLengthSelector :
00031 public QMCLineSearchStepLengthSelectionAlgorithm
00032 {
00033 public:
00034 double stepLength(QMCObjectiveFunction *function,
00035 Array1D<double> & position,
00036 Array1D<double> & searchDirection,
00037 Array1D<double> & gradient,
00038 Array2D<double> & unused,
00039 double functionValue);
00040
00041 private:
00042 void bracket(QMCObjectiveFunction *OF,Array1D<double> & position,
00043 Array1D<double> & searchDirection,
00044 double alpha_zero,double scale,int recursion_depth);
00045
00046 void quadratic_rebracketer(QMCObjectiveFunction * OF,
00047 Array1D<double> & position,
00048 Array1D<double> & searchDirection);
00049
00050 void print_interval();
00051
00052
00053
00054
00055 double alpha_left;
00056 double alpha_middle;
00057 double alpha_right;
00058 double score_left;
00059 double score_middle;
00060 double score_right;
00061
00062
00063 };
00064
00065 #endif