#include <GNGEdge.hpp>
Public Member Functions | |
GNGEdge (GNGNode *h1, GNGNode *h2) | |
Constructs a new GNGEdge given 2 nodes. | |
virtual | ~GNGEdge () |
GNGNode const & | GetOtherNode (GNGNode const &node) const |
Given a node, retreives the other node of the edge. | |
GNGNode & | GetOtherNode (GNGNode const &node) |
Given a node, retreives the other node of the edge. | |
GNGNode & | GetNode1 () const |
Returns the first node of the edge. | |
GNGNode & | GetNode2 () const |
Returns the second node of the edge. | |
double | GetAge () |
Returns the current age of the edge. | |
void | SetAge (double d) |
Sets the current age of the edge. | |
Protected Attributes | |
double | m_age |
GNGNode * | m_node1 |
GNGNode * | m_node2 |
Friends | |
bool | operator== (GNGEdge const &e1, GNGEdge const &e2) |
bool | operator< (GNGEdge const &e1, GNGEdge const &e2) |
When an edge is created it is given two nodes that it will register with. When it is deleted it will again notify the relevant nodes.
|
Constructs a new GNGEdge given 2 nodes.
|
|
|
|
Given a node, retreives the other node of the edge.
|
|
Given a node, retreives the other node of the edge.
|
|
Returns the first node of the edge.
|
|
Returns the second node of the edge.
|
|
Returns the current age of the edge.
|
|
Sets the current age of the edge.
|
|
|
|
|
|
|
|
|
|
|