this is the class for edges between the nodes More...
#include <GraphEdge.h>
Public Member Functions | |
GraphEdge (int _from, int _to, double _cost) | |
ctor | |
~GraphEdge () | |
dtor | |
void | setFrom (const int _NewIndex) |
mutator to set the a position of the spring | |
void | setTo (const int _NewIndex) |
mutator to set the b position of the spring | |
int | getFromIndex () const |
accesor for the spring a position | |
int | getToIndex () const |
accesor for the spring b position | |
Private Attributes | |
int | m_indexOfA |
variable to hold the index of the node A | |
int | m_indexOfB |
variable to hold the index of the node B | |
double | m_Cost |
variable to hold the cost of the edge |
this is the class for edges between the nodes
Definition at line 15 of file GraphEdge.h.
GraphEdge::GraphEdge | ( | int | _from, | |
int | _to, | |||
double | _cost | |||
) |
ctor
[in] | _from | the index node from which the edge starts |
[in] | _to | the index node from which the edge starts |
[in] | _cost | the cost of the edge |
GraphEdge::~GraphEdge | ( | ) |
dtor
int GraphEdge::getFromIndex | ( | ) | const [inline] |
accesor for the spring a position
Definition at line 47 of file GraphEdge.h.
References m_indexOfA.
00047 {return m_indexOfA;}
int GraphEdge::getToIndex | ( | ) | const [inline] |
accesor for the spring b position
Definition at line 52 of file GraphEdge.h.
References m_indexOfB.
00052 {return m_indexOfB;}
void GraphEdge::setFrom | ( | const int | _NewIndex | ) | [inline] |
mutator to set the a position of the spring
[in] | _a | the value to set |
Definition at line 36 of file GraphEdge.h.
References m_indexOfA.
00036 {m_indexOfA = _NewIndex;}
void GraphEdge::setTo | ( | const int | _NewIndex | ) | [inline] |
mutator to set the b position of the spring
[in] | _b | the value to set |
Definition at line 41 of file GraphEdge.h.
References m_indexOfB.
00041 {m_indexOfB = _NewIndex;}
double GraphEdge::m_Cost [private] |
variable to hold the cost of the edge
Definition at line 68 of file GraphEdge.h.
int GraphEdge::m_indexOfA [private] |
variable to hold the index of the node A
Definition at line 60 of file GraphEdge.h.
int GraphEdge::m_indexOfB [private] |
variable to hold the index of the node B
Definition at line 64 of file GraphEdge.h.