00001
00061 #ifndef _SecantDivision_h
00062 #define _SecantDivision_h
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 #include "../DoubleParameter.h"
00073 #include "../ProblemBase.h"
00074 #include "../SectionLineSearch.h"
00075 #include "../UnivariateFunction.h"
00076 #include "../ui/SectionLineSearchPanel.h"
00077
00078
00079
00080
00081
00082 class SecantDivision
00083 : public SectionLineSearch
00084 {
00085 public:
00086 friend class SectionLineSearchPanel<SecantDivision>;
00087
00088
00089
00090
00093 ~SecantDivision(void);
00094
00095
00096
00097
00098
00099
00100
00103 virtual std::auto_ptr<Method> Clone() const;
00104
00105
00108 virtual const wxString& Name() const;
00109
00112 virtual MethodIdType Id() const;
00113
00116 static MethodIdType ClassId();
00117
00118
00119
00120 virtual bool CanHandle(const ProblemBase* pProblem) const;
00121 virtual bool CanAssist(const ProblemBase* pProblem) const;
00122
00123
00124 protected:
00125
00128 SecantDivision(void);
00129
00134 SecantDivision(const SecantDivision& from);
00135
00136 virtual wxString& rName();
00137 private:
00138
00139 virtual std::auto_ptr<Result> Solve(
00140 const UnivariateFunction& function,
00141 double a,
00142 double b,
00143 bool generateResult)
00144 const throw(OptimizationError);
00145
00148 static wxString mName;
00151 static SecantDivision mSecantDivision;
00152 };
00153
00154
00155
00156
00157
00158
00159
00160 #endif // _SecantDivision_h_