Public Member Functions | Private Attributes

FlowEdgeIterator Class Reference

Iterator class for getting edges from a FlowStatMap. More...

Public Member Functions

 FlowEdgeIterator (LinkGraphJob *job)
 Constructor.
void SetNode (NodeID source, NodeID node)
 Setup the node to retrieve edges from.
NodeID Next ()
 Get the next node for which a flow exists.

Private Attributes

LinkGraphJobjob
 Link graph job we're working with.
std::map< StationID, NodeID > station_to_node
 Lookup table for getting NodeIDs from StationIDs.
FlowStat::SharesMap::const_iterator it
 Current iterator in the shares map.
FlowStat::SharesMap::const_iterator end
 End of the shares map.

Detailed Description

Iterator class for getting edges from a FlowStatMap.

Definition at line 54 of file mcf.cpp.


Constructor & Destructor Documentation

FlowEdgeIterator::FlowEdgeIterator ( LinkGraphJob job  )  [inline]

Constructor.

Parameters:
job Link graph job to work with.

Definition at line 72 of file mcf.cpp.

References LinkGraph::GetNode(), LinkGraph::GetSize(), LinkGraphJob::Graph(), Node::station, and station_to_node.


Member Function Documentation

NodeID FlowEdgeIterator::Next (  )  [inline]

Get the next node for which a flow exists.

Returns:
ID of next node with flow.

Definition at line 102 of file mcf.cpp.

References end, it, and station_to_node.

void FlowEdgeIterator::SetNode ( NodeID  source,
NodeID  node 
) [inline]

Setup the node to retrieve edges from.

Parameters:
source Root of the current path tree.
node Current node to be checked for outgoing flows.

Definition at line 84 of file mcf.cpp.

References end, NodeAnnotation::flows, LinkGraph::GetNode(), LinkGraphJob::GetNode(), LinkGraphJob::Graph(), it, job, and Node::station.


Field Documentation

FlowStat::SharesMap::const_iterator FlowEdgeIterator::end [private]

End of the shares map.

Definition at line 65 of file mcf.cpp.

Referenced by Next(), and SetNode().

FlowStat::SharesMap::const_iterator FlowEdgeIterator::it [private]

Current iterator in the shares map.

Definition at line 62 of file mcf.cpp.

Referenced by Next(), and SetNode().

std::map<StationID, NodeID> FlowEdgeIterator::station_to_node [private]

Lookup table for getting NodeIDs from StationIDs.

Definition at line 59 of file mcf.cpp.

Referenced by FlowEdgeIterator(), and Next().


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