Class: RGL::EdmondsKarpAlgorithm::EdmondsKarpBFSIterator

### Home Classes Methods

### In Files

- lib/rgl/edmonds_karp.rb

### Parent

BFSIterator

### Methods

- ::new
- #follow_edge?
- #handle_tree_edge
- #reset

### Class/Module Index

Quicksearch

- RGL
- RGL::AdjacencyGraph
- RGL::BFSIterator
- RGL::BellmanFordAlgorithm
- RGL::BellmanFordVisitor
- RGL::BidirectionalGraph
- RGL::BipartiteBFSIterator
- RGL::DFSIterator
- RGL::DFSVisitor
- RGL::DOT
- RGL::DOT::Digraph
- RGL::DOT::DirectedEdge
- RGL::DOT::Edge
- RGL::DOT::Element
- RGL::DOT::Graph
- RGL::DOT::Node
- RGL::DOT::Port
- RGL::DOT::Subgraph
- RGL::DijkstraAlgorithm
- RGL::DijkstraVisitor
- RGL::DirectedAdjacencyGraph
- RGL::Edge
- RGL::Edge::DirectedEdge
- RGL::Edge::UnDirectedEdge
- RGL::EdgePropertiesMap
- RGL::EdmondsKarpAlgorithm
- RGL::EdmondsKarpAlgorithm::EdmondsKarpBFSIterator
- RGL::Graph
- RGL::Graph::TarjanSccVisitor
- RGL::GraphIterator
- RGL::GraphVisitor
- RGL::GraphVisitor::ClassMethods
- RGL::GraphVisitor::DistanceMapSupport
- RGL::ImplicitGraph
- RGL::MutableGraph
- RGL::MutableGraph::MutableGraphParser
- RGL::NoEdgeError
- RGL::NoVertexError
- RGL::NonNegativeEdgePropertiesMap
- RGL::NotDirectedError
- RGL::NotUndirectedError
- RGL::PrimAlgorithm
- RGL::TopsortIterator
- Enumerable
- Object

No matching classes.

# RGL::EdmondsKarpAlgorithm::EdmondsKarpBFSIterator

### Attributes

parents_map[RW]

### Public Class Methods

new(graph, start, stop, residual_capacities) click to toggle source

    # File lib/rgl/edmonds_karp.rb, line 90
    def initialize(graph, start, stop, residual_capacities)
      super(graph, start)
      @residual_capacities = residual_capacities
      @stop_vertex = stop
    end

### Public Instance Methods

follow_edge?(u, v) click to toggle source

    # File lib/rgl/edmonds_karp.rb, line 101
    def follow_edge?(u, v)
      # follow only edges with positive residual capacity
      super && @residual_capacities[u, v] > 0
    end

handle_tree_edge(u, v) click to toggle source

    # File lib/rgl/edmonds_karp.rb, line 106
    def handle_tree_edge(u, v)
      super
      @parents_map[v] = u
    end

reset() click to toggle source

    # File lib/rgl/edmonds_karp.rb, line 96
    def reset
      super
      @parents_map = {}
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.