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
Binary file
|
@@ -0,0 +1,22 @@
|
|
1
|
+
data_dir = "~/git/jaredbeck/graph_matching/benchmark/mwm_bipartite/complete_bigraphs"
|
2
|
+
|
3
|
+
set title "MWM Should Be O(v ** (3/4) e log N) In Bigraphs\n".\
|
4
|
+
"(Gabow, 1983, p. 248)"
|
5
|
+
set key left box
|
6
|
+
set term png size 800, 500
|
7
|
+
set output data_dir."/plot.png"
|
8
|
+
|
9
|
+
set linetype 1 pointtype 7 linecolor rgb "#FF0000"
|
10
|
+
set linetype 2 linewidth 3 linecolor rgb "#00B800"
|
11
|
+
|
12
|
+
set xlabel 'Number of Vertexes, v' textcolor rgb "black"
|
13
|
+
set ytics autofreq textcolor rgb "black"
|
14
|
+
set ylabel 'Time (s)' textcolor rgb "black"
|
15
|
+
set y2tics autofreq textcolor rgb "black"
|
16
|
+
set y2label 'v ** (3/4) e log N' textcolor rgb "black"
|
17
|
+
|
18
|
+
plot \
|
19
|
+
data_dir."/time.data" every 1:1:1::299 \
|
20
|
+
using 1:2 title "Time (s)" lt 1 axes x1y1, \
|
21
|
+
data_dir."/nmN.data" every 1:1:1::299 \
|
22
|
+
using 1:8 title "v ** (3/4) e log N" with lines lt 2 axes x1y2
|
Binary file
|
@@ -0,0 +1,299 @@
|
|
1
|
+
2 0.00023967400193214417
|
2
|
+
3 0.0001403269707225263
|
3
|
+
4 0.00019632704788818955
|
4
|
+
5 0.0002680470352061093
|
5
|
+
6 0.0003501690225675702
|
6
|
+
7 0.0004584150156006217
|
7
|
+
8 0.0005675560096278787
|
8
|
+
9 0.0007040390046313405
|
9
|
+
10 0.0008225120254792273
|
10
|
+
11 0.0010125570115633309
|
11
|
+
12 0.001215117983520031
|
12
|
+
13 0.0015671820146963
|
13
|
+
14 0.0017543220310471952
|
14
|
+
15 0.002078156976494938
|
15
|
+
16 0.0023914549965411425
|
16
|
+
17 0.0027363219996914268
|
17
|
+
18 0.002975167997647077
|
18
|
+
19 0.0034758569672703743
|
19
|
+
20 0.003723026951774955
|
20
|
+
21 0.004134275019168854
|
21
|
+
22 0.004585004993714392
|
22
|
+
23 0.004927914997097105
|
23
|
+
24 0.005254260031506419
|
24
|
+
25 0.006114421994425356
|
25
|
+
26 0.00657751300605014
|
26
|
+
27 0.007049814972560853
|
27
|
+
28 0.007803787011653185
|
28
|
+
29 0.008683277992531657
|
29
|
+
30 0.008935446967370808
|
30
|
+
31 0.009691580024082214
|
31
|
+
32 0.010449744004290551
|
32
|
+
33 0.01159877999452874
|
33
|
+
34 0.011967019003350288
|
34
|
+
35 0.01300675398670137
|
35
|
+
36 0.013920824974775314
|
36
|
+
37 0.015505092975217849
|
37
|
+
38 0.015970217005815357
|
38
|
+
39 0.017246256989892572
|
39
|
+
40 0.018173454969655722
|
40
|
+
41 0.019360138976480812
|
41
|
+
42 0.020493644988164306
|
42
|
+
43 0.022018835006747395
|
43
|
+
44 0.022942058043554425
|
44
|
+
45 0.025569434044882655
|
45
|
+
46 0.02569080499233678
|
46
|
+
47 0.027696880977600813
|
47
|
+
48 0.028332457004580647
|
48
|
+
49 0.030314520990941674
|
49
|
+
50 0.033092155994381756
|
50
|
+
51 0.03493157203774899
|
51
|
+
52 0.035486662993207574
|
52
|
+
53 0.03838282299693674
|
53
|
+
54 0.03890698897885159
|
54
|
+
55 0.04357437998987734
|
55
|
+
56 0.04542282299371436
|
56
|
+
57 0.04677662905305624
|
57
|
+
58 0.04731682798592374
|
58
|
+
59 0.049437711015343666
|
59
|
+
60 0.05287801299709827
|
60
|
+
61 0.0542156039737165
|
61
|
+
62 0.055693217960651964
|
62
|
+
63 0.05875199899310246
|
63
|
+
64 0.06693247798830271
|
64
|
+
65 0.06782035098876804
|
65
|
+
66 0.0682202490279451
|
66
|
+
67 0.06917066097958013
|
67
|
+
68 0.07251351402373984
|
68
|
+
69 0.07874585903482512
|
69
|
+
70 0.07849096396239474
|
70
|
+
71 0.08927132096141577
|
71
|
+
72 0.08811201702337712
|
72
|
+
73 0.08708892104914412
|
73
|
+
74 0.09373596601653844
|
74
|
+
75 0.09954582300269976
|
75
|
+
76 0.1048935359576717
|
76
|
+
77 0.100833970005624
|
77
|
+
78 0.10941980598727241
|
78
|
+
79 0.11045056098373607
|
79
|
+
80 0.11608497198903933
|
80
|
+
81 0.11747833795379847
|
81
|
+
82 0.12537784298183396
|
82
|
+
83 0.12602637300733477
|
83
|
+
84 0.1399246270302683
|
84
|
+
85 0.14616843999829143
|
85
|
+
86 0.15939465799601749
|
86
|
+
87 0.1482069289777428
|
87
|
+
88 0.14507563697407022
|
88
|
+
89 0.15281181799946353
|
89
|
+
90 0.16483494301792234
|
90
|
+
91 0.1600273490184918
|
91
|
+
92 0.16561657696729526
|
92
|
+
93 0.1740372059866786
|
93
|
+
94 0.18691660300828516
|
94
|
+
95 0.24184273800347
|
95
|
+
96 0.2408872859668918
|
96
|
+
97 0.26179542299360037
|
97
|
+
98 0.2895236050244421
|
98
|
+
99 0.2099117049947381
|
99
|
+
100 0.23402196099050343
|
100
|
+
101 0.22038053895812482
|
101
|
+
102 0.22539205296197906
|
102
|
+
103 0.22433747502509505
|
103
|
+
104 0.2521514130057767
|
104
|
+
105 0.2405988749815151
|
105
|
+
106 0.25156471197260544
|
106
|
+
107 0.2515172209823504
|
107
|
+
108 0.2754201029893011
|
108
|
+
109 0.28343104501254857
|
109
|
+
110 0.2890380109893158
|
110
|
+
111 0.31504112598486245
|
111
|
+
112 0.28314598597353324
|
112
|
+
113 0.2923567949910648
|
113
|
+
114 0.30476271599764004
|
114
|
+
115 0.31154071097262204
|
115
|
+
116 0.31781471596332267
|
116
|
+
117 0.3253511959919706
|
117
|
+
118 0.3346165619441308
|
118
|
+
119 0.34452325699385256
|
119
|
+
120 0.3936674779979512
|
120
|
+
121 0.38519530004123226
|
121
|
+
122 0.3638024860410951
|
122
|
+
123 0.3709050549659878
|
123
|
+
124 0.3825189300114289
|
124
|
+
125 0.3891144610242918
|
125
|
+
126 0.4031468839966692
|
126
|
+
127 0.40481411101063713
|
127
|
+
128 0.4184175500413403
|
128
|
+
129 0.4254106070147827
|
129
|
+
130 0.4790075710043311
|
130
|
+
131 0.44127349799964577
|
131
|
+
132 0.4797915869858116
|
132
|
+
133 0.4718354829819873
|
133
|
+
134 0.47340888099279255
|
134
|
+
135 0.4834145740023814
|
135
|
+
136 0.49697239900706336
|
136
|
+
137 0.5008131979848258
|
137
|
+
138 0.6401755830156617
|
138
|
+
139 0.7086823939462192
|
139
|
+
140 0.5457850840175524
|
140
|
+
141 0.5491667640162632
|
141
|
+
142 0.5581858060322702
|
142
|
+
143 0.5612440740223974
|
143
|
+
144 0.5820497960085049
|
144
|
+
145 0.5895098199835047
|
145
|
+
146 0.6078685420216061
|
146
|
+
147 0.6147818850004114
|
147
|
+
148 0.6324909329996444
|
148
|
+
149 0.6331395769957453
|
149
|
+
150 0.6584633020102046
|
150
|
+
151 0.6678491570055485
|
151
|
+
152 0.6848673910135403
|
152
|
+
153 0.6862722559599206
|
153
|
+
154 0.705358071019873
|
154
|
+
155 0.7168047350132838
|
155
|
+
156 0.761356959992554
|
156
|
+
157 0.7393942420021631
|
157
|
+
158 0.7613392000203021
|
158
|
+
159 0.9174661900033243
|
159
|
+
160 0.7899645519792102
|
160
|
+
161 0.7974648659583181
|
161
|
+
162 0.8178189200116321
|
162
|
+
163 0.8169163040001877
|
163
|
+
164 0.8252142080455087
|
164
|
+
165 0.8338994180085137
|
165
|
+
166 0.8719940439914353
|
166
|
+
167 0.8850991209619679
|
167
|
+
168 0.8949258999782614
|
168
|
+
169 0.8967322669923306
|
169
|
+
170 0.9214309129747562
|
170
|
+
171 0.9703512830310501
|
171
|
+
172 0.9664835560251959
|
172
|
+
173 0.9649946009740233
|
173
|
+
174 1.0127936539938673
|
174
|
+
175 1.0110479450086132
|
175
|
+
176 1.0231397380121052
|
176
|
+
177 1.0305551210185513
|
177
|
+
178 1.0553052310133353
|
178
|
+
179 1.0675680150161497
|
179
|
+
180 1.0882305690320209
|
180
|
+
181 1.0934439220000058
|
181
|
+
182 1.1260176280047745
|
182
|
+
183 1.1279203029698692
|
183
|
+
184 1.1634931529988535
|
184
|
+
185 1.1707292440114543
|
185
|
+
186 1.2209559860057198
|
186
|
+
187 1.208800739957951
|
187
|
+
188 1.3417055099853314
|
188
|
+
189 1.257006778032519
|
189
|
+
190 1.2696862319717184
|
190
|
+
191 1.2763619659817778
|
191
|
+
192 1.3176587359630503
|
192
|
+
193 1.3165182869997807
|
193
|
+
194 1.3594427069765516
|
194
|
+
195 1.3597122670034878
|
195
|
+
196 1.4480376570136286
|
196
|
+
197 1.4046553840162233
|
197
|
+
198 1.4414780869847164
|
198
|
+
199 1.449926580011379
|
199
|
+
200 1.485169476014562
|
200
|
+
201 1.4933837989810854
|
201
|
+
202 1.5280802870402113
|
202
|
+
203 1.537344433949329
|
203
|
+
204 1.5730777129647322
|
204
|
+
205 1.5718173590139486
|
205
|
+
206 1.681756652018521
|
206
|
+
207 1.627769766957499
|
207
|
+
208 1.793498245999217
|
208
|
+
209 1.6636949079693295
|
209
|
+
210 1.7318037070217542
|
210
|
+
211 1.9433949409867637
|
211
|
+
212 1.775593041034881
|
212
|
+
213 2.026396537956316
|
213
|
+
214 1.885982726002112
|
214
|
+
215 1.8402501540258527
|
215
|
+
216 1.861184115987271
|
216
|
+
217 1.8619301469880156
|
217
|
+
218 2.0181173629825935
|
218
|
+
219 2.3015328550245613
|
219
|
+
220 1.982247773965355
|
220
|
+
221 2.0870054960250854
|
221
|
+
222 2.060340363008436
|
222
|
+
223 2.0117834950215183
|
223
|
+
224 2.184764054021798
|
224
|
+
225 2.0839406439918093
|
225
|
+
226 2.3136803039815277
|
226
|
+
227 2.1554981989902444
|
227
|
+
228 2.2855095820268616
|
228
|
+
229 2.2080725669511594
|
229
|
+
230 2.468229429970961
|
230
|
+
231 2.295452408026904
|
231
|
+
232 2.361123450973537
|
232
|
+
233 2.315785392012913
|
233
|
+
234 2.4352072789915837
|
234
|
+
235 2.350898342032451
|
235
|
+
236 2.4782668040134013
|
236
|
+
237 2.4486251170164905
|
237
|
+
238 2.5263961000018753
|
238
|
+
239 2.4765083779930137
|
239
|
+
240 2.6081966789788567
|
240
|
+
241 2.5457052070414647
|
241
|
+
242 2.6436967439949512
|
242
|
+
243 2.618215925991535
|
243
|
+
244 2.800359062035568
|
244
|
+
245 2.664180790015962
|
245
|
+
246 2.8964704159880057
|
246
|
+
247 2.7340194300049916
|
247
|
+
248 2.812702764000278
|
248
|
+
249 2.794291822006926
|
249
|
+
250 2.948587363003753
|
250
|
+
251 2.892169341968838
|
251
|
+
252 3.2016537680174224
|
252
|
+
253 3.0749705560156144
|
253
|
+
254 3.076560042973142
|
254
|
+
255 3.0089014339610003
|
255
|
+
256 3.082694925018586
|
256
|
+
257 3.074037063983269
|
257
|
+
258 3.2590175429941155
|
258
|
+
259 3.199096356984228
|
259
|
+
260 3.294998114986811
|
260
|
+
261 3.3285287029575557
|
261
|
+
262 3.5139484719838947
|
262
|
+
263 3.429572967987042
|
263
|
+
264 3.4432446340215392
|
264
|
+
265 3.445152650005184
|
265
|
+
266 3.6697611060226336
|
266
|
+
267 3.5070862540160306
|
267
|
+
268 3.790859567001462
|
268
|
+
269 3.9844360410352238
|
269
|
+
270 3.95174715295434
|
270
|
+
271 3.7563526470330544
|
271
|
+
272 3.9206832019845024
|
272
|
+
273 3.7394514650222845
|
273
|
+
274 3.823003059020266
|
274
|
+
275 3.7625061359722167
|
275
|
+
276 4.188105191977229
|
276
|
+
277 3.920031775953248
|
277
|
+
278 4.171390681003686
|
278
|
+
279 4.147671983984765
|
279
|
+
280 4.416942588053644
|
280
|
+
281 4.050132180971559
|
281
|
+
282 4.282814499980304
|
282
|
+
283 4.205497535993345
|
283
|
+
284 4.396210836013779
|
284
|
+
285 4.606779769004788
|
285
|
+
286 4.612063135020435
|
286
|
+
287 4.391820906021167
|
287
|
+
288 4.608880162995774
|
288
|
+
289 4.449733369983733
|
289
|
+
290 5.202066054975148
|
290
|
+
291 4.764852249005344
|
291
|
+
292 5.4191654800088145
|
292
|
+
293 5.205726365034934
|
293
|
+
294 5.129044339992106
|
294
|
+
295 4.9024773729615845
|
295
|
+
296 5.205555201973766
|
296
|
+
297 5.309930688003078
|
297
|
+
298 5.35499645100208
|
298
|
+
299 4.959939300024416
|
299
|
+
300 5.237014798971359
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# No shebang here. Usage:
|
4
|
+
# ruby -I lib benchmark/mwm_bipartite/misc/calc_d2/benchmark.rb
|
5
|
+
|
6
|
+
require 'benchmark'
|
7
|
+
require 'graph_matching'
|
8
|
+
|
9
|
+
$stdout.sync = true
|
10
|
+
|
11
|
+
# complete bigraph with three vertexes
|
12
|
+
g = GraphMatching::Graph::WeightedBigraph[
|
13
|
+
[1, 2, 1],
|
14
|
+
[1, 3, 2]
|
15
|
+
]
|
16
|
+
dogs, cats = g.partition
|
17
|
+
|
18
|
+
a = GraphMatching::Algorithm::MWMBipartite.new(g)
|
19
|
+
u = a.send(:init_duals, cats, dogs)
|
20
|
+
t = Set.new
|
21
|
+
s = Set.new(dogs)
|
22
|
+
|
23
|
+
GC.disable
|
24
|
+
puts Benchmark.realtime {
|
25
|
+
100_000.times do
|
26
|
+
a.send(:calc_d2, s, t, u)
|
27
|
+
end
|
28
|
+
}
|
29
|
+
GC.enable
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# No shebang here. Usage:
|
4
|
+
# ruby -I lib benchmark/mwm_general/complete_graphs/benchmark.rb
|
5
|
+
|
6
|
+
require 'benchmark'
|
7
|
+
require 'graph_matching'
|
8
|
+
|
9
|
+
MIN_SIZE = 2
|
10
|
+
MAX_SIZE = 300
|
11
|
+
|
12
|
+
$stdout.sync = true
|
13
|
+
|
14
|
+
def complete_graph(n)
|
15
|
+
g = GraphMatching::Graph::WeightedGraph.new
|
16
|
+
n_edges = (1 .. n - 1).reduce(:+)
|
17
|
+
0.upto(n - 2) do |i|
|
18
|
+
(i + 1).upto(n - 1) do |j|
|
19
|
+
g.add_edge(i, j)
|
20
|
+
g.set_w([i, j], rand(n_edges))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
g
|
24
|
+
end
|
25
|
+
|
26
|
+
MIN_SIZE.upto(MAX_SIZE) do |v|
|
27
|
+
print "%5d\t" % [v]
|
28
|
+
g = complete_graph(v)
|
29
|
+
GC.disable
|
30
|
+
puts Benchmark.realtime { g.maximum_weighted_matching(true) }
|
31
|
+
GC.enable
|
32
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
data_dir = "~/git/jaredbeck/graph_matching/benchmark/mwm_general/complete_graphs"
|
2
|
+
|
3
|
+
set title "MWM in Complete Graph"
|
4
|
+
set key left box
|
5
|
+
set term png size 800, 500
|
6
|
+
set output data_dir."/plot_compare.png"
|
7
|
+
|
8
|
+
set linetype 1 pointtype 7 linecolor rgb "#FF0000"
|
9
|
+
set linetype 2 pointtype 7 linecolor rgb "#00B800"
|
10
|
+
|
11
|
+
set xlabel 'Number of Vertexes (n)' textcolor rgb "black"
|
12
|
+
set ytics autofreq textcolor rgb "black"
|
13
|
+
set ylabel 'Time (s)' textcolor rgb "black"
|
14
|
+
|
15
|
+
plot \
|
16
|
+
data_dir."/time.data" every 1:1:1::299 \
|
17
|
+
using 1:2 title "Before" lt 1 axes x1y1, \
|
18
|
+
data_dir."/time2.data" every 1:1:1::299 \
|
19
|
+
using 1:2 title "After" lt 2 axes x1y1
|
@@ -0,0 +1,299 @@
|
|
1
|
+
2 3 0.693147181 4.158883083
|
2
|
+
3 6 1.098612289 19.7750212
|
3
|
+
4 10 1.386294361 55.45177444
|
4
|
+
5 15 1.609437912 120.7078434
|
5
|
+
6 21 1.791759469 225.7616931
|
6
|
+
7 28 1.945910149 381.3983892
|
7
|
+
8 36 2.079441542 598.879164
|
8
|
+
9 45 2.197224577 889.8759538
|
9
|
+
10 55 2.302585093 1266.421801
|
10
|
+
11 66 2.397895273 1740.871968
|
11
|
+
12 78 2.48490665 2325.872624
|
12
|
+
13 91 2.564949357 3034.33509
|
13
|
+
14 105 2.63905733 3879.414275
|
14
|
+
15 120 2.708050201 4874.490362
|
15
|
+
16 136 2.772588722 6033.15306
|
16
|
+
17 153 2.833213344 7369.187908
|
17
|
+
18 171 2.890371758 8896.564271
|
18
|
+
19 190 2.944438979 10629.42471
|
19
|
+
20 210 2.995732274 12582.07555
|
20
|
+
21 231 3.044522438 14768.97835
|
21
|
+
22 253 3.091042453 17204.7423
|
22
|
+
23 276 3.135494216 19904.11728
|
23
|
+
24 300 3.17805383 22881.98758
|
24
|
+
25 325 3.218875825 26153.36608
|
25
|
+
26 351 3.258096538 29733.38901
|
26
|
+
27 378 3.295836866 33637.31105
|
27
|
+
28 406 3.33220451 37880.50087
|
28
|
+
29 435 3.36729583 42478.4369
|
29
|
+
30 465 3.401197382 47446.70347
|
30
|
+
31 496 3.433987204 52800.98726
|
31
|
+
32 528 3.465735903 58557.07381
|
32
|
+
33 561 3.496507561 64730.84449
|
33
|
+
34 595 3.526360525 71338.27341
|
34
|
+
35 630 3.555348061 78395.42476
|
35
|
+
36 666 3.583518938 85918.45007
|
36
|
+
37 703 3.610917913 93923.58583
|
37
|
+
38 741 3.63758616 102427.1511
|
38
|
+
39 780 3.663561646 111445.5453
|
39
|
+
40 820 3.688879454 120995.2461
|
40
|
+
41 861 3.713572067 131092.8075
|
41
|
+
42 903 3.737669618 141754.8579
|
42
|
+
43 946 3.761200116 152998.0983
|
43
|
+
44 990 3.784189634 164839.3005
|
44
|
+
45 1035 3.80666249 177295.3055
|
45
|
+
46 1081 3.828641396 190383.0221
|
46
|
+
47 1128 3.850147602 204119.4253
|
47
|
+
48 1176 3.871201011 218521.5547
|
48
|
+
49 1225 3.891820298 233606.5134
|
49
|
+
50 1275 3.912023005 249391.4666
|
50
|
+
51 1326 3.931825633 265893.6402
|
51
|
+
52 1378 3.951243719 283130.3199
|
52
|
+
53 1431 3.970291914 301118.8496
|
53
|
+
54 1485 3.988984047 319876.6307
|
54
|
+
55 1540 4.007333185 339421.1208
|
55
|
+
56 1596 4.025351691 359769.8327
|
56
|
+
57 1653 4.043051268 380940.3335
|
57
|
+
58 1711 4.060443011 402950.2435
|
58
|
+
59 1770 4.077537444 425817.2353
|
59
|
+
60 1830 4.094344562 449559.0329
|
60
|
+
61 1891 4.110873864 474193.4111
|
61
|
+
62 1953 4.127134385 499738.1941
|
62
|
+
63 2016 4.143134726 526211.2553
|
63
|
+
64 2080 4.158883083 553630.5161
|
64
|
+
65 2145 4.17438727 582013.9451
|
65
|
+
66 2211 4.189654742 611379.5579
|
66
|
+
67 2278 4.204692619 641745.4157
|
67
|
+
68 2346 4.219507705 673129.6252
|
68
|
+
69 2415 4.234106505 705550.3374
|
69
|
+
70 2485 4.248495242 739025.7474
|
70
|
+
71 2556 4.262679877 773574.0934
|
71
|
+
72 2628 4.276666119 809213.6564
|
72
|
+
73 2701 4.290459441 845962.7594
|
73
|
+
74 2775 4.304065093 883839.7669
|
74
|
+
75 2850 4.317488114 922863.0843
|
75
|
+
76 2926 4.33073334 963051.1573
|
76
|
+
77 3003 4.343805422 1004422.472
|
77
|
+
78 3081 4.356708827 1046995.552
|
78
|
+
79 3160 4.369447852 1090788.962
|
79
|
+
80 3240 4.382026635 1135821.304
|
80
|
+
81 3321 4.394449155 1182111.217
|
81
|
+
82 3403 4.406719247 1229677.379
|
82
|
+
83 3486 4.418840608 1278538.504
|
83
|
+
84 3570 4.430816799 1328713.342
|
84
|
+
85 3655 4.442651256 1380220.679
|
85
|
+
86 3741 4.454347296 1433079.338
|
86
|
+
87 3828 4.465908119 1487308.176
|
87
|
+
88 3916 4.477336814 1542926.085
|
88
|
+
89 4005 4.48863637 1599951.991
|
89
|
+
90 4095 4.49980967 1658404.854
|
90
|
+
91 4186 4.510859507 1718303.668
|
91
|
+
92 4278 4.521788577 1779667.461
|
92
|
+
93 4371 4.532599493 1842515.292
|
93
|
+
94 4465 4.543294782 1906866.253
|
94
|
+
95 4560 4.553876892 1972739.469
|
95
|
+
96 4656 4.564348191 2040154.097
|
96
|
+
97 4753 4.574710979 2109129.324
|
97
|
+
98 4851 4.584967479 2179684.369
|
98
|
+
99 4950 4.59511985 2251838.483
|
99
|
+
100 5050 4.605170186 2325610.944
|
100
|
+
101 5151 4.615120517 2401021.064
|
101
|
+
102 5253 4.624972813 2478088.183
|
102
|
+
103 5356 4.634728988 2556831.671
|
103
|
+
104 5460 4.644390899 2637270.928
|
104
|
+
105 5565 4.65396035 2719425.382
|
105
|
+
106 5671 4.663439094 2803314.489
|
106
|
+
107 5778 4.672828834 2888957.736
|
107
|
+
108 5886 4.682131227 2976374.636
|
108
|
+
109 5995 4.691347882 3065584.73
|
109
|
+
110 6105 4.700480366 3156607.59
|
110
|
+
111 6216 4.709530201 3249462.81
|
111
|
+
112 6328 4.718498871 3344170.016
|
112
|
+
113 6441 4.727387819 3440748.858
|
113
|
+
114 6555 4.736198448 3539219.015
|
114
|
+
115 6670 4.744932128 3639600.189
|
115
|
+
116 6786 4.753590191 3741912.112
|
116
|
+
117 6903 4.762173935 3846174.541
|
117
|
+
118 7021 4.770684624 3952407.256
|
118
|
+
119 7140 4.779123493 4060630.067
|
119
|
+
120 7260 4.787491743 4170862.806
|
120
|
+
121 7381 4.795790546 4283125.332
|
121
|
+
122 7503 4.804021045 4397437.528
|
122
|
+
123 7626 4.812184355 4513819.301
|
123
|
+
124 7750 4.820281566 4632290.585
|
124
|
+
125 7875 4.828313737 4752871.335
|
125
|
+
126 8001 4.836281907 4875581.534
|
126
|
+
127 8128 4.844187086 5000441.185
|
127
|
+
128 8256 4.852030264 5127470.318
|
128
|
+
129 8385 4.859812404 5256688.984
|
129
|
+
130 8515 4.86753445 5388117.26
|
130
|
+
131 8646 4.875197323 5521775.243
|
131
|
+
132 8778 4.882801923 5657683.056
|
132
|
+
133 8911 4.890349128 5795860.844
|
133
|
+
134 9045 4.8978398 5936328.773
|
134
|
+
135 9180 4.905274778 6079107.033
|
135
|
+
136 9316 4.912654886 6224215.837
|
136
|
+
137 9453 4.919980926 6371675.418
|
137
|
+
138 9591 4.927253685 6521506.033
|
138
|
+
139 9730 4.934473933 6673727.96
|
139
|
+
140 9870 4.941642423 6828361.5
|
140
|
+
141 10011 4.94875989 6985426.972
|
141
|
+
142 10153 4.955827058 7144944.72
|
142
|
+
143 10296 4.96284463 7306935.109
|
143
|
+
144 10440 4.9698133 7471418.522
|
144
|
+
145 10585 4.976733742 7638415.366
|
145
|
+
146 10731 4.983606622 7807946.068
|
146
|
+
147 10878 4.990432587 7980031.075
|
147
|
+
148 11026 4.997212274 8154690.855
|
148
|
+
149 11175 5.003946306 8331945.895
|
149
|
+
150 11325 5.010635294 8511816.706
|
150
|
+
151 11476 5.017279837 8694323.815
|
151
|
+
152 11628 5.023880521 8879487.77
|
152
|
+
153 11781 5.030437921 9067329.14
|
153
|
+
154 11935 5.036952602 9257868.514
|
154
|
+
155 12090 5.043425117 9451126.498
|
155
|
+
156 12246 5.049856007 9647123.72
|
156
|
+
157 12403 5.056245805 9845880.826
|
157
|
+
158 12561 5.062595033 10047418.48
|
158
|
+
159 12720 5.068904202 10251757.37
|
159
|
+
160 12880 5.075173815 10458918.2
|
160
|
+
161 13041 5.081404365 10668921.69
|
161
|
+
162 13203 5.087596335 10881788.58
|
162
|
+
163 13366 5.093750201 11097539.62
|
163
|
+
164 13530 5.099866428 11316195.61
|
164
|
+
165 13695 5.105945474 11537777.34
|
165
|
+
166 13861 5.111987788 11762305.61
|
166
|
+
167 14028 5.117993812 11989801.27
|
167
|
+
168 14196 5.123963979 12220285.17
|
168
|
+
169 14365 5.129898715 12453778.16
|
169
|
+
170 14535 5.135798437 12690301.15
|
170
|
+
171 14706 5.141663557 12929875.03
|
171
|
+
172 14878 5.147494477 13172520.73
|
172
|
+
173 15051 5.153291594 13418259.18
|
173
|
+
174 15225 5.159055299 13667111.35
|
174
|
+
175 15400 5.164785974 13919098.2
|
175
|
+
176 15576 5.170483995 14174240.73
|
176
|
+
177 15753 5.176149733 14432559.95
|
177
|
+
178 15931 5.18178355 14694076.89
|
178
|
+
179 16110 5.187385806 14958812.57
|
179
|
+
180 16290 5.192956851 15226788.08
|
180
|
+
181 16471 5.198497031 15498024.47
|
181
|
+
182 16653 5.204006687 15772542.85
|
182
|
+
183 16836 5.209486153 16050364.32
|
183
|
+
184 17020 5.214935758 16331510.01
|
184
|
+
185 17205 5.220355825 16616001.06
|
185
|
+
186 17391 5.225746674 16903858.63
|
186
|
+
187 17578 5.231108617 17195103.9
|
187
|
+
188 17766 5.236441963 17489758.05
|
188
|
+
189 17955 5.241747015 17787842.29
|
189
|
+
190 18145 5.247024072 18089377.84
|
190
|
+
191 18336 5.252273428 18394385.95
|
191
|
+
192 18528 5.257495372 18702887.86
|
192
|
+
193 18721 5.262690189 19014904.84
|
193
|
+
194 18915 5.267858159 19330458.19
|
194
|
+
195 19110 5.272999559 19649569.21
|
195
|
+
196 19306 5.278114659 19972259.2
|
196
|
+
197 19503 5.283203729 20298549.5
|
197
|
+
198 19701 5.288267031 20628461.46
|
198
|
+
199 19900 5.293304825 20962016.44
|
199
|
+
200 20100 5.298317367 21299235.81
|
200
|
+
201 20301 5.303304908 21640140.98
|
201
|
+
202 20503 5.308267697 21984753.35
|
202
|
+
203 20706 5.313205979 22333094.33
|
203
|
+
204 20910 5.318119994 22685185.37
|
204
|
+
205 21115 5.323009979 23041047.92
|
205
|
+
206 21321 5.327876169 23400703.45
|
206
|
+
207 21528 5.332718793 23764173.43
|
207
|
+
208 21736 5.33753808 24131479.36
|
208
|
+
209 21945 5.342334252 24502642.76
|
209
|
+
210 22155 5.347107531 24877685.14
|
210
|
+
211 22366 5.351858133 25256628.05
|
211
|
+
212 22578 5.356586275 25639493.04
|
212
|
+
213 22791 5.361292166 26026301.68
|
213
|
+
214 23005 5.365976015 26417075.54
|
214
|
+
215 23220 5.370638028 26811836.23
|
215
|
+
216 23436 5.375278408 27210605.35
|
216
|
+
217 23653 5.379897354 27613404.53
|
217
|
+
218 23871 5.384495063 28020255.4
|
218
|
+
219 24090 5.38907173 28431179.62
|
219
|
+
220 24310 5.393627546 28846198.84
|
220
|
+
221 24531 5.398162702 29265334.76
|
221
|
+
222 24753 5.402677382 29688609.06
|
222
|
+
223 24976 5.407171771 30116043.44
|
223
|
+
224 25200 5.411646052 30547659.63
|
224
|
+
225 25425 5.416100402 30983479.36
|
225
|
+
226 25651 5.420534999 31423524.38
|
226
|
+
227 25878 5.424950017 31867816.44
|
227
|
+
228 26106 5.429345629 32316377.31
|
228
|
+
229 26335 5.433722004 32769228.79
|
229
|
+
230 26565 5.438079309 33226392.67
|
230
|
+
231 26796 5.442417711 33687890.77
|
231
|
+
232 27028 5.446737372 34153744.9
|
232
|
+
233 27261 5.451038454 34623976.91
|
233
|
+
234 27495 5.455321115 35098608.65
|
234
|
+
235 27730 5.459585514 35577661.98
|
235
|
+
236 27966 5.463831805 36061158.78
|
236
|
+
237 28203 5.468060141 36549120.94
|
237
|
+
238 28441 5.472270674 37041570.35
|
238
|
+
239 28680 5.476463552 37538528.95
|
239
|
+
240 28920 5.480638923 38040018.64
|
240
|
+
241 29161 5.484796933 38546061.37
|
241
|
+
242 29403 5.488937726 39056679.1
|
242
|
+
243 29646 5.493061443 39571893.79
|
243
|
+
244 29890 5.497168225 40091727.41
|
244
|
+
245 30135 5.501258211 40616201.96
|
245
|
+
246 30381 5.505331536 41145339.44
|
246
|
+
247 30628 5.509388337 41679161.86
|
247
|
+
248 30876 5.513428746 42217691.24
|
248
|
+
249 31125 5.517452896 42760949.63
|
249
|
+
250 31375 5.521460918 43308959.07
|
250
|
+
251 31626 5.525452939 43861741.64
|
251
|
+
252 31878 5.529429088 44419319.39
|
252
|
+
253 32131 5.533389489 44981714.43
|
253
|
+
254 32385 5.537334267 45548948.84
|
254
|
+
255 32640 5.541263545 46121044.74
|
255
|
+
256 32896 5.545177444 46698024.25
|
256
|
+
257 33153 5.549076085 47279909.5
|
257
|
+
258 33411 5.552959585 47866722.63
|
258
|
+
259 33670 5.556828062 48458485.82
|
259
|
+
260 33930 5.560681631 49055221.21
|
260
|
+
261 34191 5.564520407 49656951
|
261
|
+
262 34453 5.568344504 50263697.38
|
262
|
+
263 34716 5.572154032 50875482.54
|
263
|
+
264 34980 5.575949103 51492328.7
|
264
|
+
265 35245 5.579729826 52114258.09
|
265
|
+
266 35511 5.583496309 52741292.95
|
266
|
+
267 35778 5.587248658 53373455.53
|
267
|
+
268 36046 5.590986981 54010768.08
|
268
|
+
269 36315 5.59471138 54653252.87
|
269
|
+
270 36585 5.598421959 55300932.19
|
270
|
+
271 36856 5.602118821 55953828.33
|
271
|
+
272 37128 5.605802066 56611963.6
|
272
|
+
273 37401 5.609471795 57275360.31
|
273
|
+
274 37675 5.613128106 57944040.79
|
274
|
+
275 37950 5.616771098 58618027.37
|
275
|
+
276 38226 5.620400866 59297342.4
|
276
|
+
277 38503 5.624017506 59982008.25
|
277
|
+
278 38781 5.627621114 60672047.29
|
278
|
+
279 39060 5.631211782 61367481.88
|
279
|
+
280 39340 5.634789603 62068334.44
|
280
|
+
281 39621 5.638354669 62774627.35
|
281
|
+
282 39903 5.641907071 63486383.03
|
282
|
+
283 40186 5.645446898 64203623.92
|
283
|
+
284 40470 5.648974238 64926372.43
|
284
|
+
285 40755 5.65248918 65654651.01
|
285
|
+
286 41041 5.655991811 66388482.13
|
286
|
+
287 41328 5.659482216 67127888.25
|
287
|
+
288 41616 5.66296048 67872891.84
|
288
|
+
289 41905 5.666426688 68623515.4
|
289
|
+
290 42195 5.669880923 69379781.41
|
290
|
+
291 42486 5.673323267 70141712.39
|
291
|
+
292 42778 5.676753802 70909330.85
|
292
|
+
293 43071 5.680172609 71682659.33
|
293
|
+
294 43365 5.683579767 72461720.36
|
294
|
+
295 43660 5.686975356 73246536.5
|
295
|
+
296 43956 5.690359454 74037130.29
|
296
|
+
297 44253 5.693732139 74833524.32
|
297
|
+
298 44551 5.697093487 75635741.15
|
298
|
+
299 44850 5.700443573 76443803.39
|
299
|
+
300 45150 5.703782475 77257733.62
|