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.



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

def initialize(graph)
  @g = graph
end

Instance Attribute Details

#gObject (readonly)

Returns the value of attribute g.



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

def g
  @g
end

Instance Method Details

#assert(obj) ⇒ Object



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

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