00001 //----------------------------------------------------------------------------- 00002 // Author: Jim Holmström 00003 // Date: 2002-02-13 00004 //----------------------------------------------------------------------------- 00005 00006 #ifndef __GNGEDGE_H 00007 #define __GNGEDGE_H 00008 00009 class GNGNode; 00010 00017 class GNGEdge 00018 { 00019 public: 00025 GNGEdge(GNGNode * h1, GNGNode * h2); 00026 00029 virtual ~GNGEdge(); 00030 00036 GNGNode const & GetOtherNode(GNGNode const & node) const; // throws Exception 00037 00043 GNGNode & GetOtherNode(GNGNode const & node); // throws Exception 00044 00049 GNGNode & GetNode1() const; 00050 00055 GNGNode & GetNode2() const; 00056 00061 double GetAge(); 00062 00067 void SetAge(double d); 00068 00069 00070 friend bool operator== (GNGEdge const & e1, GNGEdge const & e2); 00071 friend bool operator< (GNGEdge const & e1, GNGEdge const & e2); 00072 00073 protected: 00074 double m_age; 00075 GNGNode * m_node1; 00076 GNGNode * m_node2; 00077 }; 00078 00079 00080 #endif