GClasses
GClasses::GGraphEdgeIterator Class Reference

Detailed Description

Iterates over the edges that connect to the specified node.

#include <GGraph.h>

Public Member Functions

 GGraphEdgeIterator (GGraphCut *pGraph, size_t nNode)
 
 ~GGraphEdgeIterator ()
 
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.) More...
 
void reset (size_t nNode)
 Starts over with a new node. More...
 

Protected Attributes

size_t m_nNode
 
struct GGraphCutEdge * m_pCurrentEdge
 
GGraphCutm_pGraph
 

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

size_t GClasses::GGraphEdgeIterator::m_nNode
protected
struct GGraphCutEdge* GClasses::GGraphEdgeIterator::m_pCurrentEdge
protected
GGraphCut* GClasses::GGraphEdgeIterator::m_pGraph
protected