* Setup the node to retrieve edges from. * @param source Root of the current path tree. * @param node Current node to be checked for outgoing flows. */
| 164 | * @param node Current node to be checked for outgoing flows. |
| 165 | */ |
| 166 | void SetNode(NodeID source, NodeID node) |
| 167 | { |
| 168 | const FlowStatMap &flows = this->job[node].flows; |
| 169 | FlowStatMap::const_iterator it = flows.find(this->job[source].base.station); |
| 170 | if (it != flows.end()) { |
| 171 | this->it = it->second.GetShares()->begin(); |
| 172 | this->end = it->second.GetShares()->end(); |
| 173 | } else { |
| 174 | this->it = FlowStat::empty_sharesmap.begin(); |
| 175 | this->end = FlowStat::empty_sharesmap.end(); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * Get the next node for which a flow exists. |