Class: GraphMatching::Algorithm::MatchingAlgorithm

Inherits:
Object
  • Object
show all
Defined in:
lib/graph_matching/algorithm/matching_algorithm.rb

Overview

All matching algorithms operate on a graph, hence the common constructor.

Direct Known Subclasses

MCMBipartite, MCMGeneral, MWMGeneral

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(graph) ⇒ MatchingAlgorithm

Returns a new instance of MatchingAlgorithm.



13
14
15
# File 'lib/graph_matching/algorithm/matching_algorithm.rb', line 13

def initialize(graph)
  @g = graph
end

Instance Attribute Details

#gObject (readonly)

Returns the value of attribute g.



11
12
13
# File 'lib/graph_matching/algorithm/matching_algorithm.rb', line 11

def g
  @g
end

Instance Method Details

#assert(obj) ⇒ Object



17
18
19
# File 'lib/graph_matching/algorithm/matching_algorithm.rb', line 17

def assert(obj)
  Assertion.new(obj)
end