Biorithm
1.1
|
Public Member Functions | |
MyEdge (MyNode &n1, MyNode &n2) | |
MyEdge (const MyEdge &other) | |
const MyEdge & | operator= (const MyEdge &rhs) |
bool | operator< (const MyEdge &rhs) const |
bool | incident (string node) const |
bool | incident (string n1, string n2) |
MyNode & | head () const |
MyNode & | tail () const |
MyNode * | opposite (const MyNode &node) const |
void | setStatus (string statusType) |
void | clearStatus (string statusType) |
bool | getStatus (string statusType) |
void | setWeight (MyNT w) |
Set the weight of the edge. | |
MyNT | getWeight () const |
bool | hasType (string type) |
void | addType (string type) |
void | addTypes (const set< string > &types) |
void | getTypes (set< string > &types) const |
set< string > | getTypes () const |
void | getEdgeStrings (vector< string > &edgeStrings) const |
string | getEdgeString () const |
Static Public Member Functions | |
static string | getEdgeString (string headId, string tailId) |
string MyEdge::getEdgeString | ( | ) | const [inline] |
Return a string representing the nodes incident on the edge.
The method concatenates the head and tail of the edge in lexicographic order into a single string, separating the two node ids (arbtirarily) by five underscores.
static string MyEdge::getEdgeString | ( | string | headId, |
string | tailId | ||
) | [inline, static] |
Return a string representing the nodes incident on the edge.
This static method is useful when you do not have an instance of an edge but only the ids of the head and tail. The method concatenates the head and tail in lexicographic order into a single string, separating the two node ids (arbtirarily) by five underscores.
void MyEdge::getEdgeStrings | ( | vector< string > & | edgeStrings | ) | const |
For each edge type, construct a string containing the nodes indicent on the edge and the type of that edge.
[out] | edgeStrings | a vector that will hold the strings. |
This method converts an edge in a canonical way into a list of strings, one of for each edge type. Each string consists of
void MyEdge::setWeight | ( | MyNT | w | ) | [inline] |
Set the weight of the edge.
[in] | w | the weight of the edge. |