EvolutionaryMethodLayer.h

00001 
00006 #ifndef _EvolutionaryMethodLayer_h
00007 #define _EvolutionaryMethodLayer_h
00008 
00009 // SYSTEM INCLUDES
00010 //
00011 
00012 // PROJECT INCLUDES
00013 //
00014 
00015 // LOCAL INCLUDES
00016 //
00017 #include "../methods/EvolutionaryMethodIteration.h"
00018 #include "PlotControl.h"
00019 #include "XyResultLayer.h"
00020 
00021 // FORWARD REFERENCES
00022 //
00023 
00024 class EvolutionaryMethodLayer
00025     : public XyResultLayer
00026 {
00027 public:
00028 
00029     friend class DrawDeceasedAction;
00030     friend class OnlyBestAction;
00031 
00032 // LIFECYCLE
00033 /*
00034     struct PointInRegion
00035     {
00036         PointInRegion(const ColumnVector& point)
00037             : mPoint(point)
00038         {
00039         };
00040 
00041         ColumnVector    mPoint;
00042         int             mBoxPartX;
00043         int             mBoxPartY;
00044     };
00045 */
00048     EvolutionaryMethodLayer(const PlotControl&          plotControl,
00049                             const Result&               result,
00050                                   CountedPtr<PlotLayer> cpFunctionLayer);
00051 
00054     EvolutionaryMethodLayer(const EvolutionaryMethodLayer& from);
00055 
00056 
00059     ~EvolutionaryMethodLayer(void);
00060 
00061 
00062 // OPERATORS
00063 
00064 // OPERATIONS
00065 
00066     virtual void    Draw(wxDC& dc) const;
00067 
00068     virtual vector<ToolbarTool> CreateTools(PlotControl* pPlotControl);
00069 
00070     virtual Region  IterationBoundingBox(unsigned iterationNumber) const;
00071 
00074     static std::auto_ptr<ResultLayer>   Create(
00075                           const PlotControl&            plotControl,
00076                           const Result&                 result,
00077                                 CountedPtr<PlotLayer>   cpFunctionLayer);
00078 // ACCESS
00079 
00080 // INQUIRY
00081 
00082 
00083 protected:
00084 private:
00085 
00086     void            DrawIteration(wxDC&     dc,
00087                                   unsigned  iterationNumber,
00088                                   bool      highlight) const;
00089 
00090     void            DrawDeceased
00091                         (      wxDC&                        dc,
00092                          const EvolutionaryMethodIteration& iteration) const;
00093 
00094     void            DrawSurvivors
00095                         (      wxDC&                        dc,
00096                          const EvolutionaryMethodIteration& iteration) const;
00097 
00098     void            DrawMutants
00099                         (      wxDC&                        dc,
00100                          const EvolutionaryMethodIteration& iteration) const;
00101 
00102     void            DrawChildren
00103                         (      wxDC&                        dc,
00104                          const EvolutionaryMethodIteration& iteration) const;
00105 
00106     void            DrawStartingBest
00107                         (      wxDC&                        dc,
00108                          const EvolutionaryMethodIteration& iteration,
00109                                bool                         highlight) const;
00110 
00111     void            DrawEndBest
00112                         (      wxDC&                        dc,
00113                          const EvolutionaryMethodIteration& iteration,
00114                                bool                         highlight) const;
00115 
00116     void            DrawImprovementLine
00117                         (      wxDC&                        dc,
00118                          const EvolutionaryMethodIteration& iteration,
00119                                bool                         highlight) const;
00120 
00121     void            DrawChromosomeContainer(wxDC&           dc,
00122     const EvolutionaryMethodIteration::ChromosomeContainer& container,
00123           AttributeDatabase::AttributeType                  attribute) const;
00124 /*
00125     void            RemoveOutliers(const Region&            boundingBox,
00126                                    vector<PointInRegion>&   points) const;
00127 
00128 */
00129     bool            mDrawDeceased;
00130     bool            mDrawOnlyBest;
00131 
00132     const static void*  mRegistrationDummy;
00133 
00134 };
00135 
00136 // INLINE METHODS
00137 //
00138 
00139 // EXTERNAL REFERENCES
00140 //
00141 
00142 #endif  // _EvolutionaryMethodLayer_h

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