GClasses

GClasses::GGraphEdgeIterator Class Reference

Iterates over the edges that connect to the specified node. More...

#include <GGraph.h>

List of all members.

Public Member Functions

 GGraphEdgeIterator (GGraphCut *pGraph, size_t nNode)
 ~GGraphEdgeIterator ()
void reset (size_t nNode)
 Starts over with a new node.
bool next (size_t *pNode, float *pEdgeWeight, bool *pOutgoing)
 Gets the next edge. Returns false if there isn't one left to get. If it returns true, pNode, pEdgeWeight, and pOutgoing will contain the values of the edge. (Note that pOutgoing tells you which direction the edge is going, even though my implementation of graph-cut treats them as undirected edges.)

Protected Attributes

GGraphCutm_pGraph
size_t m_nNode
struct GGraphCutEdge * m_pCurrentEdge

Detailed Description

Iterates over the edges that connect to the specified node.


Constructor & Destructor Documentation

GClasses::GGraphEdgeIterator::GGraphEdgeIterator ( GGraphCut pGraph,
size_t  nNode 
)
GClasses::GGraphEdgeIterator::~GGraphEdgeIterator ( )

Member Function Documentation

bool GClasses::GGraphEdgeIterator::next ( size_t *  pNode,
float *  pEdgeWeight,
bool *  pOutgoing 
)

Gets the next edge. Returns false if there isn't one left to get. If it returns true, pNode, pEdgeWeight, and pOutgoing will contain the values of the edge. (Note that pOutgoing tells you which direction the edge is going, even though my implementation of graph-cut treats them as undirected edges.)

void GClasses::GGraphEdgeIterator::reset ( size_t  nNode)

Starts over with a new node.


Member Data Documentation

struct GGraphCutEdge* GClasses::GGraphEdgeIterator::m_pCurrentEdge [protected]