DefaultNodeInserter.hpp

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // Author: Jim Holmström
00003 // Date:   2002-02-13
00004 //-----------------------------------------------------------------------------
00005 
00006 #ifndef __DEFAULTNODEINSERTER_H
00007 #define __DEFAULTNODEINSERTER_H
00008 
00009 #include "../GNGCore/IGNGNodeInserter.hpp"
00010 class IGNGContainer;
00011 class GNGNode;
00012 
00016 class DefaultNodeInserter : public IGNGNodeInserter
00017 {
00018 public:
00019   DefaultNodeInserter();
00020 
00027   virtual void SetGNGContainer(IGNGContainer * c);
00028 
00033   virtual bool IsInsertCriteriaMet();
00034 
00040   virtual void InsertNewNode();
00041 
00047   void SetParamInsertEvery(unsigned int i);
00048 
00054   void SetParamMaxNodes(unsigned int i);
00055 
00065   void SetParamNewNodePos(double i);
00066 
00073   void SetParamErrorDecay(double i);
00074 
00075 
00076 protected:
00077 
00082   virtual GNGNode * FindNodeWithLargestError();
00083 
00088   virtual GNGNode * FindNeighborWithLargestError(GNGNode const & u);
00089 
00096   virtual double NewError(double errorU, double errorV);
00097   
00098 protected:
00099   unsigned int    m_iteration;
00100 
00101   unsigned int    m_paramInsertEvery;
00102   unsigned int    m_paramMaxNodes;
00103   double          m_paramNewNodePos;
00104   double          m_paramErrorDecay;
00105 
00106   IGNGContainer * m_container;
00107 };
00108 
00109 #endif
00110 

Generated on Mon Mar 22 16:40:47 2004 for GNG_GL by doxygen 1.3.6