golib  0.5
goGraphEdge< NodeType > Class Template Reference

Graph edge base class. More...

#include <gograph.h>

Public Member Functions

void setNodes (NodeType *n1, NodeType *n2)
 
NodeType * getOtherNode (const NodeType *askingNode)
 
goIndex_t getIndex (const NodeType *askingNode)
 Get index of this edge in adj array. More...
 
void setIndex (goIndex_t i1, goIndex_t i2)
 Set index of this edge in adj elements of nodes. More...
 

Protected Member Functions

 goGraphEdge (NodeType *n1=0, NodeType *n2=0)
 

Protected Attributes

NodeType * myNode1
 
NodeType * myNode2
 
goIndex_t myIndex1
 
goIndex_t myIndex2
 

Detailed Description

template<class NodeType>
class goGraphEdge< NodeType >

Graph edge base class.

Use derived classes with goGraphAlgorithm.

Member Function Documentation

◆ getIndex()

template<class NodeType>
goIndex_t goGraphEdge< NodeType >::getIndex ( const NodeType *  askingNode)
inline

Get index of this edge in adj array.

Parameters
askingNodeNode that is asking.
Returns
The index of this edge in the adj array of askingNode.

◆ setIndex()

template<class NodeType>
void goGraphEdge< NodeType >::setIndex ( goIndex_t  i1,
goIndex_t  i2 
)
inline

Set index of this edge in adj elements of nodes.

See also
getIndex()
Parameters
i1Index1
i2Index2

The documentation for this class was generated from the following file: