Biorithm  1.1
Public Member Functions | Static Public Member Functions
MyEdge Class Reference

List of all members.

Public Member Functions

 MyEdge (MyNode &n1, MyNode &n2)
 MyEdge (const MyEdge &other)
const MyEdgeoperator= (const MyEdge &rhs)
bool operator< (const MyEdge &rhs) const
bool incident (string node) const
bool incident (string n1, string n2)
MyNodehead () const
MyNodetail () const
MyNodeopposite (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)

Member Function Documentation

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.

Parameters:
[out]edgeStringsa 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.

Parameters:
[in]wthe weight of the edge.
Warning:
Do not invoke this method directly! Always use MyGraph::setEdgeWeight(MyEdge *) or MyGraph::setEdgeWeight(string nodeId1, nodeId2, MyNT w), since these two methods will correctly update statistics on the total edge weight in the graph.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Friends