lib/bipartite_graph/hungarian_algorithm.rb
# subgraph of edges where weight = sum of end labels
subgraph of edges where weight = sum of end labels
subgraph of edges where weight = sum of end labels
def recalculate_equality_graph
        equality_graph.clear
        graph.edges.select {|e| e.weight == labels[e.from] + labels[e.to]}.each do |edge|
          equality_graph.add_edge(edge)
        end
      end
def recalculate_equality_graph equality_graph . clear graph . edges . select { | e | e . weight == labels [ e . from ] + labels [ e . to ] } . each do | edge | equality_graph . add_edge ( edge ) end end
subgraph of edges where weight = sum of end labels
subgraph of edges where weight = sum of end labels