graphmatch 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/graphmatch.rb +16 -4
  2. metadata +1 -1
@@ -4,15 +4,27 @@ class Graphmatch
4
4
  # The edges must be specified as a hash of hashes, the keys being left vertices
5
5
  # and the values be a hash of right vertices and the weights to them.
6
6
  #
7
- # Ex. Matching ['a', 'b'] to [1, 2], restrict it so 'a' can only reach 2.
7
+ # Ex.
8
+ # Matching ['a', 'b'] to [1, 2], restrict it so 'a' can only reach 2.
8
9
  # All path lengths are uniform (= 0)
9
10
  #
10
- # left_vertices = ["a", "b"]
11
- # right_vertices = [1, 2]
11
+ # left = ["a", "b"]
12
+ # right = [1, 2]
12
13
  # edges = {"a" => {2 => 0},
13
14
  # "b" => {1 => 0, 2 >= 0}}
15
+ # Graphmatch.match(left, right, edges)
16
+ #
17
+ # Ex.
18
+ # Matching ['a', 'b'] to ['y', 'z'] with edge weights. 'a' is matched to 'y',
19
+ # 'b' is matched to 'z'
14
20
  #
15
- # If the path lengths are equal, set search to :shortest_path
21
+ # left = ['a', 'b']
22
+ # right ['y', z']
23
+ # edges = {'a' => {'y' => 1, 'z' => 100},
24
+ # 'b' => {'y' => 100, 'z' => 1}}
25
+ # Graphmatch.match(left, right, edges, search = :min_cost)
26
+ #
27
+ # If the path lengths are equal, set search to :shortest_path.
16
28
  # If the path lengths vary, set search to :min_cost to optimize for min-cost max-flow
17
29
  #
18
30
  # @param left_vertices [Array] list of names of vertices on the left
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphmatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: