00001
00154 #ifndef _AlphaDivision_h
00155 #define _AlphaDivision_h
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165 #include "../DoubleParameter.h"
00166 #include "../ProblemBase.h"
00167 #include "../SectionLineSearch.h"
00168 #include "../UnivariateFunction.h"
00169
00170
00171
00172
00173
00174 class AlphaDivision
00175 : public SectionLineSearch
00176 {
00177 public:
00178 friend class AlphaDivisionPanel;
00179
00180
00181
00182
00185 ~AlphaDivision(void);
00186
00187
00188
00189
00190
00191
00192
00195 virtual std::auto_ptr<Method> Clone() const;
00196
00197
00200 virtual const wxString& Name() const;
00201
00204 virtual MethodIdType Id() const;
00205
00208 static MethodIdType ClassId();
00209
00210 virtual wxString ToString(bool standalone = true) const;
00211
00212
00213
00214 virtual bool CanHandle(const ProblemBase* pProblem) const;
00215
00216 protected:
00217
00220 AlphaDivision(void);
00221
00226 AlphaDivision(const AlphaDivision& from);
00227
00228
00231 DoubleParameter mAlpha;
00232
00235 bool mGoldenSection;
00236
00237 virtual wxString& rName();
00238 private:
00239
00240 virtual std::auto_ptr<Result> Solve(
00241 const UnivariateFunction& function,
00242 double a,
00243 double b,
00244 bool generateResult)
00245 const throw(OptimizationError);
00246
00247
00248 static wxString mName;
00249 static AlphaDivision mAlphaDivision;
00250 };
00251
00252
00253
00254
00255
00256
00257
00258 #endif // _AlphaDivision_h_