graph_matching 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.rubocop.yml +112 -0
- data/.ruby-version +1 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +205 -0
- data/Rakefile +9 -0
- data/benchmark/mcm_bipartite/complete_bigraphs/benchmark.rb +33 -0
- data/benchmark/mcm_bipartite/complete_bigraphs/compare.gnuplot +19 -0
- data/benchmark/mcm_bipartite/complete_bigraphs/edges_times_vertexes.data +500 -0
- data/benchmark/mcm_bipartite/complete_bigraphs/plot.gnuplot +21 -0
- data/benchmark/mcm_bipartite/complete_bigraphs/plot.png +0 -0
- data/benchmark/mcm_bipartite/complete_bigraphs/time.data +499 -0
- data/benchmark/mcm_general/complete_graphs/benchmark.rb +30 -0
- data/benchmark/mcm_general/complete_graphs/plot.gnuplot +19 -0
- data/benchmark/mcm_general/complete_graphs/plot.png +0 -0
- data/benchmark/mcm_general/complete_graphs/time.data +499 -0
- data/benchmark/mcm_general/complete_graphs/v_cubed.data +500 -0
- data/benchmark/mwm_bipartite/complete_bigraphs/benchmark.rb +43 -0
- data/benchmark/mwm_bipartite/complete_bigraphs/nmN.data +499 -0
- data/benchmark/mwm_bipartite/complete_bigraphs/nmN.xlsx +0 -0
- data/benchmark/mwm_bipartite/complete_bigraphs/plot.gnuplot +22 -0
- data/benchmark/mwm_bipartite/complete_bigraphs/plot.png +0 -0
- data/benchmark/mwm_bipartite/complete_bigraphs/time.data +299 -0
- data/benchmark/mwm_bipartite/misc/calc_d2/benchmark.rb +29 -0
- data/benchmark/mwm_general/complete_graphs/benchmark.rb +32 -0
- data/benchmark/mwm_general/complete_graphs/compare.gnuplot +19 -0
- data/benchmark/mwm_general/complete_graphs/mn_log_n.data +299 -0
- data/benchmark/mwm_general/complete_graphs/mn_log_n.xlsx +0 -0
- data/benchmark/mwm_general/complete_graphs/plot.gnuplot +22 -0
- data/benchmark/mwm_general/complete_graphs/plot.png +0 -0
- data/benchmark/mwm_general/complete_graphs/time.data +299 -0
- data/benchmark/mwm_general/incomplete_graphs/benchmark.rb +39 -0
- data/benchmark/mwm_general/incomplete_graphs/plot.gnuplot +22 -0
- data/benchmark/mwm_general/incomplete_graphs/plot.png +0 -0
- data/benchmark/mwm_general/incomplete_graphs/time_10_pct.data +299 -0
- data/benchmark/mwm_general/incomplete_graphs/time_20_pct.data +299 -0
- data/benchmark/mwm_general/incomplete_graphs/time_30_pct.data +299 -0
- data/graph_matching.gemspec +35 -0
- data/lib/graph_matching.rb +15 -0
- data/lib/graph_matching/algorithm/matching_algorithm.rb +23 -0
- data/lib/graph_matching/algorithm/mcm_bipartite.rb +118 -0
- data/lib/graph_matching/algorithm/mcm_general.rb +289 -0
- data/lib/graph_matching/algorithm/mwm_bipartite.rb +147 -0
- data/lib/graph_matching/algorithm/mwm_general.rb +1086 -0
- data/lib/graph_matching/algorithm/mwmg_delta_assertions.rb +94 -0
- data/lib/graph_matching/assertion.rb +41 -0
- data/lib/graph_matching/core_ext/set.rb +36 -0
- data/lib/graph_matching/directed_edge_set.rb +31 -0
- data/lib/graph_matching/errors.rb +23 -0
- data/lib/graph_matching/graph/bigraph.rb +37 -0
- data/lib/graph_matching/graph/graph.rb +63 -0
- data/lib/graph_matching/graph/weighted.rb +112 -0
- data/lib/graph_matching/graph/weighted_bigraph.rb +17 -0
- data/lib/graph_matching/graph/weighted_graph.rb +17 -0
- data/lib/graph_matching/integer_vertexes.rb +29 -0
- data/lib/graph_matching/matching.rb +120 -0
- data/lib/graph_matching/ordered_set.rb +59 -0
- data/lib/graph_matching/version.rb +6 -0
- data/lib/graph_matching/visualize.rb +93 -0
- data/profile/mcm_bipartite/compare.sh +15 -0
- data/profile/mcm_bipartite/publish.sh +12 -0
- data/profile/mwm_general/compare.sh +15 -0
- data/profile/mwm_general/profile.rb +28 -0
- data/profile/mwm_general/publish.sh +12 -0
- data/research/1965_edmonds.pdf +0 -0
- data/research/1975_even_kariv.pdf +0 -0
- data/research/1976_gabow.pdf +0 -0
- data/research/1980_micali_vazirani.pdf +0 -0
- data/research/1985_gabow.pdf +0 -0
- data/research/2002_tarjan.pdf +0 -0
- data/research/2013_zwick.pdf +0 -0
- data/research/examples/unweighted_general/1.txt +86 -0
- data/research/goodwin.pdf +0 -0
- data/research/kavathekar-scribe.pdf +0 -0
- data/research/kusner.pdf +0 -0
- data/research/van_rantwijk/mwm_example.py +19 -0
- data/research/van_rantwijk/mwmatching.py +945 -0
- data/spec/graph_matching/algorithm/matching_algorithm_spec.rb +14 -0
- data/spec/graph_matching/algorithm/mcm_bipartite_spec.rb +98 -0
- data/spec/graph_matching/algorithm/mcm_general_spec.rb +159 -0
- data/spec/graph_matching/algorithm/mwm_bipartite_spec.rb +82 -0
- data/spec/graph_matching/algorithm/mwm_general_spec.rb +439 -0
- data/spec/graph_matching/graph/bigraph_spec.rb +73 -0
- data/spec/graph_matching/graph/graph_spec.rb +53 -0
- data/spec/graph_matching/graph/weighted_spec.rb +29 -0
- data/spec/graph_matching/integer_vertexes_spec.rb +21 -0
- data/spec/graph_matching/matching_spec.rb +89 -0
- data/spec/graph_matching/visualize_spec.rb +38 -0
- data/spec/graph_matching_spec.rb +9 -0
- data/spec/spec_helper.rb +26 -0
- metadata +263 -0
@@ -0,0 +1,500 @@
|
|
1
|
+
1 0
|
2
|
+
2 2
|
3
|
+
3 6
|
4
|
+
4 16
|
5
|
+
5 30
|
6
|
+
6 54
|
7
|
+
7 84
|
8
|
+
8 128
|
9
|
+
9 180
|
10
|
+
10 250
|
11
|
+
11 330
|
12
|
+
12 432
|
13
|
+
13 546
|
14
|
+
14 686
|
15
|
+
15 840
|
16
|
+
16 1024
|
17
|
+
17 1224
|
18
|
+
18 1458
|
19
|
+
19 1710
|
20
|
+
20 2000
|
21
|
+
21 2310
|
22
|
+
22 2662
|
23
|
+
23 3036
|
24
|
+
24 3456
|
25
|
+
25 3900
|
26
|
+
26 4394
|
27
|
+
27 4914
|
28
|
+
28 5488
|
29
|
+
29 6090
|
30
|
+
30 6750
|
31
|
+
31 7440
|
32
|
+
32 8192
|
33
|
+
33 8976
|
34
|
+
34 9826
|
35
|
+
35 10710
|
36
|
+
36 11664
|
37
|
+
37 12654
|
38
|
+
38 13718
|
39
|
+
39 14820
|
40
|
+
40 16000
|
41
|
+
41 17220
|
42
|
+
42 18522
|
43
|
+
43 19866
|
44
|
+
44 21296
|
45
|
+
45 22770
|
46
|
+
46 24334
|
47
|
+
47 25944
|
48
|
+
48 27648
|
49
|
+
49 29400
|
50
|
+
50 31250
|
51
|
+
51 33150
|
52
|
+
52 35152
|
53
|
+
53 37206
|
54
|
+
54 39366
|
55
|
+
55 41580
|
56
|
+
56 43904
|
57
|
+
57 46284
|
58
|
+
58 48778
|
59
|
+
59 51330
|
60
|
+
60 54000
|
61
|
+
61 56730
|
62
|
+
62 59582
|
63
|
+
63 62496
|
64
|
+
64 65536
|
65
|
+
65 68640
|
66
|
+
66 71874
|
67
|
+
67 75174
|
68
|
+
68 78608
|
69
|
+
69 82110
|
70
|
+
70 85750
|
71
|
+
71 89460
|
72
|
+
72 93312
|
73
|
+
73 97236
|
74
|
+
74 101306
|
75
|
+
75 105450
|
76
|
+
76 109744
|
77
|
+
77 114114
|
78
|
+
78 118638
|
79
|
+
79 123240
|
80
|
+
80 128000
|
81
|
+
81 132840
|
82
|
+
82 137842
|
83
|
+
83 142926
|
84
|
+
84 148176
|
85
|
+
85 153510
|
86
|
+
86 159014
|
87
|
+
87 164604
|
88
|
+
88 170368
|
89
|
+
89 176220
|
90
|
+
90 182250
|
91
|
+
91 188370
|
92
|
+
92 194672
|
93
|
+
93 201066
|
94
|
+
94 207646
|
95
|
+
95 214320
|
96
|
+
96 221184
|
97
|
+
97 228144
|
98
|
+
98 235298
|
99
|
+
99 242550
|
100
|
+
100 250000
|
101
|
+
101 257550
|
102
|
+
102 265302
|
103
|
+
103 273156
|
104
|
+
104 281216
|
105
|
+
105 289380
|
106
|
+
106 297754
|
107
|
+
107 306234
|
108
|
+
108 314928
|
109
|
+
109 323730
|
110
|
+
110 332750
|
111
|
+
111 341880
|
112
|
+
112 351232
|
113
|
+
113 360696
|
114
|
+
114 370386
|
115
|
+
115 380190
|
116
|
+
116 390224
|
117
|
+
117 400374
|
118
|
+
118 410758
|
119
|
+
119 421260
|
120
|
+
120 432000
|
121
|
+
121 442860
|
122
|
+
122 453962
|
123
|
+
123 465186
|
124
|
+
124 476656
|
125
|
+
125 488250
|
126
|
+
126 500094
|
127
|
+
127 512064
|
128
|
+
128 524288
|
129
|
+
129 536640
|
130
|
+
130 549250
|
131
|
+
131 561990
|
132
|
+
132 574992
|
133
|
+
133 588126
|
134
|
+
134 601526
|
135
|
+
135 615060
|
136
|
+
136 628864
|
137
|
+
137 642804
|
138
|
+
138 657018
|
139
|
+
139 671370
|
140
|
+
140 686000
|
141
|
+
141 700770
|
142
|
+
142 715822
|
143
|
+
143 731016
|
144
|
+
144 746496
|
145
|
+
145 762120
|
146
|
+
146 778034
|
147
|
+
147 794094
|
148
|
+
148 810448
|
149
|
+
149 826950
|
150
|
+
150 843750
|
151
|
+
151 860700
|
152
|
+
152 877952
|
153
|
+
153 895356
|
154
|
+
154 913066
|
155
|
+
155 930930
|
156
|
+
156 949104
|
157
|
+
157 967434
|
158
|
+
158 986078
|
159
|
+
159 1004880
|
160
|
+
160 1024000
|
161
|
+
161 1043280
|
162
|
+
162 1062882
|
163
|
+
163 1082646
|
164
|
+
164 1102736
|
165
|
+
165 1122990
|
166
|
+
166 1143574
|
167
|
+
167 1164324
|
168
|
+
168 1185408
|
169
|
+
169 1206660
|
170
|
+
170 1228250
|
171
|
+
171 1250010
|
172
|
+
172 1272112
|
173
|
+
173 1294386
|
174
|
+
174 1317006
|
175
|
+
175 1339800
|
176
|
+
176 1362944
|
177
|
+
177 1386264
|
178
|
+
178 1409938
|
179
|
+
179 1433790
|
180
|
+
180 1458000
|
181
|
+
181 1482390
|
182
|
+
182 1507142
|
183
|
+
183 1532076
|
184
|
+
184 1557376
|
185
|
+
185 1582860
|
186
|
+
186 1608714
|
187
|
+
187 1634754
|
188
|
+
188 1661168
|
189
|
+
189 1687770
|
190
|
+
190 1714750
|
191
|
+
191 1741920
|
192
|
+
192 1769472
|
193
|
+
193 1797216
|
194
|
+
194 1825346
|
195
|
+
195 1853670
|
196
|
+
196 1882384
|
197
|
+
197 1911294
|
198
|
+
198 1940598
|
199
|
+
199 1970100
|
200
|
+
200 2000000
|
201
|
+
201 2030100
|
202
|
+
202 2060602
|
203
|
+
203 2091306
|
204
|
+
204 2122416
|
205
|
+
205 2153730
|
206
|
+
206 2185454
|
207
|
+
207 2217384
|
208
|
+
208 2249728
|
209
|
+
209 2282280
|
210
|
+
210 2315250
|
211
|
+
211 2348430
|
212
|
+
212 2382032
|
213
|
+
213 2415846
|
214
|
+
214 2450086
|
215
|
+
215 2484540
|
216
|
+
216 2519424
|
217
|
+
217 2554524
|
218
|
+
218 2590058
|
219
|
+
219 2625810
|
220
|
+
220 2662000
|
221
|
+
221 2698410
|
222
|
+
222 2735262
|
223
|
+
223 2772336
|
224
|
+
224 2809856
|
225
|
+
225 2847600
|
226
|
+
226 2885794
|
227
|
+
227 2924214
|
228
|
+
228 2963088
|
229
|
+
229 3002190
|
230
|
+
230 3041750
|
231
|
+
231 3081540
|
232
|
+
232 3121792
|
233
|
+
233 3162276
|
234
|
+
234 3203226
|
235
|
+
235 3244410
|
236
|
+
236 3286064
|
237
|
+
237 3327954
|
238
|
+
238 3370318
|
239
|
+
239 3412920
|
240
|
+
240 3456000
|
241
|
+
241 3499320
|
242
|
+
242 3543122
|
243
|
+
243 3587166
|
244
|
+
244 3631696
|
245
|
+
245 3676470
|
246
|
+
246 3721734
|
247
|
+
247 3767244
|
248
|
+
248 3813248
|
249
|
+
249 3859500
|
250
|
+
250 3906250
|
251
|
+
251 3953250
|
252
|
+
252 4000752
|
253
|
+
253 4048506
|
254
|
+
254 4096766
|
255
|
+
255 4145280
|
256
|
+
256 4194304
|
257
|
+
257 4243584
|
258
|
+
258 4293378
|
259
|
+
259 4343430
|
260
|
+
260 4394000
|
261
|
+
261 4444830
|
262
|
+
262 4496182
|
263
|
+
263 4547796
|
264
|
+
264 4599936
|
265
|
+
265 4652340
|
266
|
+
266 4705274
|
267
|
+
267 4758474
|
268
|
+
268 4812208
|
269
|
+
269 4866210
|
270
|
+
270 4920750
|
271
|
+
271 4975560
|
272
|
+
272 5030912
|
273
|
+
273 5086536
|
274
|
+
274 5142706
|
275
|
+
275 5199150
|
276
|
+
276 5256144
|
277
|
+
277 5313414
|
278
|
+
278 5371238
|
279
|
+
279 5429340
|
280
|
+
280 5488000
|
281
|
+
281 5546940
|
282
|
+
282 5606442
|
283
|
+
283 5666226
|
284
|
+
284 5726576
|
285
|
+
285 5787210
|
286
|
+
286 5848414
|
287
|
+
287 5909904
|
288
|
+
288 5971968
|
289
|
+
289 6034320
|
290
|
+
290 6097250
|
291
|
+
291 6160470
|
292
|
+
292 6224272
|
293
|
+
293 6288366
|
294
|
+
294 6353046
|
295
|
+
295 6418020
|
296
|
+
296 6483584
|
297
|
+
297 6549444
|
298
|
+
298 6615898
|
299
|
+
299 6682650
|
300
|
+
300 6750000
|
301
|
+
301 6817650
|
302
|
+
302 6885902
|
303
|
+
303 6954456
|
304
|
+
304 7023616
|
305
|
+
305 7093080
|
306
|
+
306 7163154
|
307
|
+
307 7233534
|
308
|
+
308 7304528
|
309
|
+
309 7375830
|
310
|
+
310 7447750
|
311
|
+
311 7519980
|
312
|
+
312 7592832
|
313
|
+
313 7665996
|
314
|
+
314 7739786
|
315
|
+
315 7813890
|
316
|
+
316 7888624
|
317
|
+
317 7963674
|
318
|
+
318 8039358
|
319
|
+
319 8115360
|
320
|
+
320 8192000
|
321
|
+
321 8268960
|
322
|
+
322 8346562
|
323
|
+
323 8424486
|
324
|
+
324 8503056
|
325
|
+
325 8581950
|
326
|
+
326 8661494
|
327
|
+
327 8741364
|
328
|
+
328 8821888
|
329
|
+
329 8902740
|
330
|
+
330 8984250
|
331
|
+
331 9066090
|
332
|
+
332 9148592
|
333
|
+
333 9231426
|
334
|
+
334 9314926
|
335
|
+
335 9398760
|
336
|
+
336 9483264
|
337
|
+
337 9568104
|
338
|
+
338 9653618
|
339
|
+
339 9739470
|
340
|
+
340 9826000
|
341
|
+
341 9912870
|
342
|
+
342 10000422
|
343
|
+
343 10088316
|
344
|
+
344 10176896
|
345
|
+
345 10265820
|
346
|
+
346 10355434
|
347
|
+
347 10445394
|
348
|
+
348 10536048
|
349
|
+
349 10627050
|
350
|
+
350 10718750
|
351
|
+
351 10810800
|
352
|
+
352 10903552
|
353
|
+
353 10996656
|
354
|
+
354 11090466
|
355
|
+
355 11184630
|
356
|
+
356 11279504
|
357
|
+
357 11374734
|
358
|
+
358 11470678
|
359
|
+
359 11566980
|
360
|
+
360 11664000
|
361
|
+
361 11761380
|
362
|
+
362 11859482
|
363
|
+
363 11957946
|
364
|
+
364 12057136
|
365
|
+
365 12156690
|
366
|
+
366 12256974
|
367
|
+
367 12357624
|
368
|
+
368 12459008
|
369
|
+
369 12560760
|
370
|
+
370 12663250
|
371
|
+
371 12766110
|
372
|
+
372 12869712
|
373
|
+
373 12973686
|
374
|
+
374 13078406
|
375
|
+
375 13183500
|
376
|
+
376 13289344
|
377
|
+
377 13395564
|
378
|
+
378 13502538
|
379
|
+
379 13609890
|
380
|
+
380 13718000
|
381
|
+
381 13826490
|
382
|
+
382 13935742
|
383
|
+
383 14045376
|
384
|
+
384 14155776
|
385
|
+
385 14266560
|
386
|
+
386 14378114
|
387
|
+
387 14490054
|
388
|
+
388 14602768
|
389
|
+
389 14715870
|
390
|
+
390 14829750
|
391
|
+
391 14944020
|
392
|
+
392 15059072
|
393
|
+
393 15174516
|
394
|
+
394 15290746
|
395
|
+
395 15407370
|
396
|
+
396 15524784
|
397
|
+
397 15642594
|
398
|
+
398 15761198
|
399
|
+
399 15880200
|
400
|
+
400 16000000
|
401
|
+
401 16120200
|
402
|
+
402 16241202
|
403
|
+
403 16362606
|
404
|
+
404 16484816
|
405
|
+
405 16607430
|
406
|
+
406 16730854
|
407
|
+
407 16854684
|
408
|
+
408 16979328
|
409
|
+
409 17104380
|
410
|
+
410 17230250
|
411
|
+
411 17356530
|
412
|
+
412 17483632
|
413
|
+
413 17611146
|
414
|
+
414 17739486
|
415
|
+
415 17868240
|
416
|
+
416 17997824
|
417
|
+
417 18127824
|
418
|
+
418 18258658
|
419
|
+
419 18389910
|
420
|
+
420 18522000
|
421
|
+
421 18654510
|
422
|
+
422 18787862
|
423
|
+
423 18921636
|
424
|
+
424 19056256
|
425
|
+
425 19191300
|
426
|
+
426 19327194
|
427
|
+
427 19463514
|
428
|
+
428 19600688
|
429
|
+
429 19738290
|
430
|
+
430 19876750
|
431
|
+
431 20015640
|
432
|
+
432 20155392
|
433
|
+
433 20295576
|
434
|
+
434 20436626
|
435
|
+
435 20578110
|
436
|
+
436 20720464
|
437
|
+
437 20863254
|
438
|
+
438 21006918
|
439
|
+
439 21151020
|
440
|
+
440 21296000
|
441
|
+
441 21441420
|
442
|
+
442 21587722
|
443
|
+
443 21734466
|
444
|
+
444 21882096
|
445
|
+
445 22030170
|
446
|
+
446 22179134
|
447
|
+
447 22328544
|
448
|
+
448 22478848
|
449
|
+
449 22629600
|
450
|
+
450 22781250
|
451
|
+
451 22933350
|
452
|
+
452 23086352
|
453
|
+
453 23239806
|
454
|
+
454 23394166
|
455
|
+
455 23548980
|
456
|
+
456 23704704
|
457
|
+
457 23860884
|
458
|
+
458 24017978
|
459
|
+
459 24175530
|
460
|
+
460 24334000
|
461
|
+
461 24492930
|
462
|
+
462 24652782
|
463
|
+
463 24813096
|
464
|
+
464 24974336
|
465
|
+
465 25136040
|
466
|
+
466 25298674
|
467
|
+
467 25461774
|
468
|
+
468 25625808
|
469
|
+
469 25790310
|
470
|
+
470 25955750
|
471
|
+
471 26121660
|
472
|
+
472 26288512
|
473
|
+
473 26455836
|
474
|
+
474 26624106
|
475
|
+
475 26792850
|
476
|
+
476 26962544
|
477
|
+
477 27132714
|
478
|
+
478 27303838
|
479
|
+
479 27475440
|
480
|
+
480 27648000
|
481
|
+
481 27821040
|
482
|
+
482 27995042
|
483
|
+
483 28169526
|
484
|
+
484 28344976
|
485
|
+
485 28520910
|
486
|
+
486 28697814
|
487
|
+
487 28875204
|
488
|
+
488 29053568
|
489
|
+
489 29232420
|
490
|
+
490 29412250
|
491
|
+
491 29592570
|
492
|
+
492 29773872
|
493
|
+
493 29955666
|
494
|
+
494 30138446
|
495
|
+
495 30321720
|
496
|
+
496 30505984
|
497
|
+
497 30690744
|
498
|
+
498 30876498
|
499
|
+
499 31062750
|
500
|
+
500 31250000
|