HookeJeevesIteration.h

00001 
00006 #ifndef _HookeJeevesIteration_h
00007 #define _HookeJeevesIteration_h
00008 
00009 // SYSTEM INCLUDES
00010 //
00011 
00012 // PROJECT INCLUDES
00013 //
00014 
00015 // LOCAL INCLUDES
00016 //
00017 #include "../IterationData.h"
00018 
00019 // FORWARD REFERENCES
00020 //
00021 
00022 
00023 class HookeJeevesIteration
00024     : public IterationData
00025 {
00026 public:
00027     struct TrialPoint
00028     {
00029         TrialPoint(const ColumnVector& point, bool better)
00030             : mPoint(point), mBetter(better)    { };
00031 
00032         ColumnVector    mPoint;
00033         bool            mBetter;
00034     };
00035 
00037     typedef vector<TrialPoint>  TrialPointContainer;
00038 
00039 // LIFECYCLE
00040 
00043     HookeJeevesIteration(void);
00044 
00049     HookeJeevesIteration(const ColumnVector& staringPoint);
00050 
00053     ~HookeJeevesIteration(void);
00054 
00055 // OPERATORS
00056 
00057 // OPERATIONS
00058 
00059     void                AddTrialPoint(const ColumnVector& point, bool better);
00060 
00061 
00062 // ACCESS
00063 
00064     virtual ColumnVector                EndValuePoint() const;
00065 
00066     virtual vector<IterationDataIdType> ClassIds() const;
00067 
00068     static IterationDataIdType          ClassId();
00069 
00070     const ColumnVector& StartingPoint() const;
00071     ColumnVector&       rStartingPoint();
00072 
00073     const ColumnVector& OldBasePoint() const;
00074     ColumnVector&       rOldBasePoint();
00075 
00076     const TrialPointContainer&  TrialPoints() const;
00077 
00078     const ColumnVector& BasePoint() const;
00079     ColumnVector&       rBasePoint();
00080 
00081     ColumnVector        StepVector() const;
00082 
00083     const ColumnVector& EndPoint() const;
00084     ColumnVector&       rEndPoint();
00085 
00086     double              OldTau() const;
00087     double&             rOldTau();
00088     double              NewTau() const;
00089     double&             rNewTau();
00090 
00091     bool&               rStepCancelled();
00092 
00093 // INQUIRY
00094     bool                IsStepCancelled() const;
00095 
00096 protected:
00097 private:
00098     ColumnVector    mStartingPoint; 
00099     ColumnVector    mOldBasePoint;  
00100 
00101     TrialPointContainer  mTrialPoints;   
00102 
00103     ColumnVector    mBasePoint;     
00104     ColumnVector    mEndPoint;      
00105 
00106     bool    mCancelStep;    
00107     double  mOldTau;        
00108     double  mNewTau;        
00109 };
00110 
00111 // INLINE METHODS
00112 //
00113 
00114 // EXTERNAL REFERENCES
00115 //
00116 
00117 #endif  // _HookeJeevesIteration_h

Wygenerowano Fri Sep 29 21:04:47 2006 dla EduOptim2 programem  doxygen 1.4.6