Class: GraphMatching::Graph::WeightedGraph

Inherits:
Graph
  • Object
show all
Includes:
Weighted
Defined in:
lib/graph_matching/graph/weighted_graph.rb

Overview

A graph whose edges have weights. See ‘Weighted`.

Instance Method Summary collapse

Methods included from Weighted

included, #init_weights, #max_w, #set_w, #w

Methods inherited from Graph

[], #adjacent_vertex_set, #connected?, #initialize, #max_v, #maximum_cardinality_matching, #print, #vertexes, #vertexes_must_be_integers

Constructor Details

This class inherits a constructor from GraphMatching::Graph::Graph

Instance Method Details

#maximum_weighted_matching(max_cardinality) ⇒ Object



12
13
14
# File 'lib/graph_matching/graph/weighted_graph.rb', line 12

def maximum_weighted_matching(max_cardinality)
  Algorithm::MWMGeneral.new(self).match(max_cardinality)
end