![]() |
Mace C++ Graph Library 1.0
The fast and flexible graph library for C++. Developed by Matthias Mace Hädrich.
|
The class that represents an edge in a graph. More...
#include <edge.h>
Public Member Functions | |
| edge (vertex *dest, int weight=0) | |
| The constructor. | |
| virtual | ~edge () |
| The destructor. | |
| int | weight () |
| Return the current weight for the edge or 0 if no weight is set. | |
| void | set_weight (int weight) |
| Set the weight of the edge. | |
| vertex * | dest () |
| Return the destination vertex of the edge. | |
| void | set_dest (vertex *p_dest) |
| Set a (new) destination vertex for the edge. | |
Private Attributes | |
| std::string | m_name |
| int | m_weight |
| vertex * | m_dest |
The class that represents an edge in a graph.
An edge always contains a weight (weight = 0 if none is set) and a destination vertex.
| edge::edge | ( | vertex * | dest, |
| int | weight = 0 |
||
| ) |
| vertex * edge::dest | ( | ) |
| void edge::set_dest | ( | vertex * | p_dest | ) |
| void edge::set_weight | ( | int | weight | ) |
| int edge::weight | ( | ) |
vertex* edge::m_dest [private] |
std::string edge::m_name [private] |
int edge::m_weight [private] |
1.7.4