rgl 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/{ChangeLog → CHANGELOG.md} +207 -181
- data/README.md +12 -7
- data/Rakefile +11 -35
- data/lib/rgl/base.rb +0 -3
- data/lib/rgl/traversal.rb +3 -1
- data/lib/rgl/version.rb +3 -0
- data/test/traversal_bfs_require.rb +29 -0
- metadata +25 -24
- data/examples/graph.dot +0 -55
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9d6f6346cda8a821fd876726e57a934fc623cd13215a193300bcddb294fd76a
|
|
4
|
+
data.tar.gz: 1399ad6bd527ae47cff2e217b26a6aa6917c292977a12e50533aa4121cd9cbdd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e189596f1584aad13cc2527bb49fb9005ebc094fe0580f8ce754b612850ee9a74e777528075738f1b31114591edbd3fc8292c96f077f98ab4bfe46b717b6a7ad
|
|
7
|
+
data.tar.gz: b150e61bcc1190a298f1f7f7eb8ca9eb58c5603fedf0c58605872d10eda979bc6418da7e5578e5aa506cc3f772a12499756d9b2da9ebef353fcafe6643b05ffe
|
data/{ChangeLog → CHANGELOG.md}
RENAMED
|
@@ -1,14 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
### [0.6.5](https://www.github.com/monora/rgl/compare/v0.6.4...v0.6.5) (2023-06-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* README links ([#114](https://www.github.com/monora/rgl/issues/114)) ([682e4e6](https://www.github.com/monora/rgl/commit/682e4e6f3786dc5419ce8d8bff92d4006e95be0d))
|
|
9
|
+
|
|
10
|
+
## [0.6.4](https://www.github.com/monora/rgl/compare/v0.6.3...v0.6.4) (2023-06-19)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* add test case for bfs_search_tree_from (fixes [#99](https://www.github.com/monora/rgl/issues/99)) ([54f92e4](https://www.github.com/monora/rgl/commit/54f92e497c0e628c5dcdab3334ef280f6f38bfd7))
|
|
15
|
+
* Remove require of the file if already required ([0ef2ce5](https://www.github.com/monora/rgl/commit/0ef2ce5c43c56503268303abac40fd841c4cea43))
|
|
16
|
+
|
|
17
|
+
## Changelog from 0.5.10 to 0.6.3
|
|
18
|
+
|
|
19
|
+
See [Releaselist in GitHub](https://github.com/monora/rgl/releases). From v0.6.4
|
|
20
|
+
on the Changelog is updated by
|
|
21
|
+
[release-please](https://github.com/googleapis/release-please#release-please)
|
|
22
|
+
GitHub Action (Issue #101)
|
|
23
|
+
|
|
24
|
+
## Changelog prior 0.5.9
|
|
25
|
+
|
|
26
|
+
### 2022-08 Release 0.5.9
|
|
2
27
|
|
|
3
28
|
Dan Čermák
|
|
4
29
|
* Drop lazy priority queue (#64) (3b1db1)
|
|
5
30
|
|
|
6
|
-
2022-06 Release 0.5.8
|
|
31
|
+
### 2022-06 Release 0.5.8
|
|
7
32
|
|
|
8
33
|
Horst Duchene
|
|
9
34
|
* switch to github actions (56030d)
|
|
10
35
|
|
|
11
|
-
2020-12 Release 0.5.7
|
|
36
|
+
### 2020-12 Release 0.5.7
|
|
12
37
|
|
|
13
38
|
Horst Duchene
|
|
14
39
|
* Fully automate dev setup with Gitpod (41dd00)
|
|
@@ -24,14 +49,14 @@ Harry Lascelles <hlascelles@users.noreply.github.com>
|
|
|
24
49
|
Harry Lascelles
|
|
25
50
|
* Add explicit license to gemspec (de3647)
|
|
26
51
|
|
|
27
|
-
2019-01 Release 0.5.6
|
|
52
|
+
### 2019-01 Release 0.5.6
|
|
28
53
|
|
|
29
54
|
Artemy Kirienko
|
|
30
55
|
* PR #42 Add method Graph#path?(u, v) to check if a path exists between two vertices
|
|
31
56
|
Horst Duchene
|
|
32
57
|
* Fix #47 set_to_begin for graph iterator (881aa8)
|
|
33
58
|
|
|
34
|
-
2019-01 Release 0.5.4
|
|
59
|
+
### 2019-01 Release 0.5.4
|
|
35
60
|
|
|
36
61
|
Lia Skalkos
|
|
37
62
|
* Enable options to be passed to #write_to_graphic_file (4ca972). For details see PR #41
|
|
@@ -42,7 +67,7 @@ Horst Duchene
|
|
|
42
67
|
* Fix lint warnings
|
|
43
68
|
* Use version stream 0.5.2
|
|
44
69
|
|
|
45
|
-
2017-04 Release 0.5.3
|
|
70
|
+
### 2017-04 Release 0.5.3
|
|
46
71
|
|
|
47
72
|
Horst Duchene
|
|
48
73
|
* Issue #38: Add error handling or dot functions. (719e38, 5a3423)
|
|
@@ -52,7 +77,7 @@ Thomas Orozco
|
|
|
52
77
|
Mario Daskalov
|
|
53
78
|
* Clarify that you need graphviz in the README (35a4b4)
|
|
54
79
|
|
|
55
|
-
2016-05 Release 0.5.2
|
|
80
|
+
### 2016-05 Release 0.5.2
|
|
56
81
|
|
|
57
82
|
Horst Duchene
|
|
58
83
|
* Issue #21: Use new method vertex_id instead of object_id to identify vertices in dot export. (fa7592)
|
|
@@ -65,7 +90,7 @@ Matías Battocchia
|
|
|
65
90
|
gorn
|
|
66
91
|
* Adding failing test for issue #24 (1f6204)
|
|
67
92
|
|
|
68
|
-
2015-12 Release 0.5.1
|
|
93
|
+
### 2015-12 Release 0.5.1
|
|
69
94
|
|
|
70
95
|
Horst Duchene
|
|
71
96
|
* Changed edge sequence to match example picture (daa88e)
|
|
@@ -77,7 +102,7 @@ Louis Rose
|
|
|
77
102
|
* Fix #15. Use object IDs rather than labels to identify vertexs in DOT graph
|
|
78
103
|
to ensure that distinct nodes that share a label are shown. (33206f, 4fc455)
|
|
79
104
|
|
|
80
|
-
2014-12 Release 0.5.0
|
|
105
|
+
### 2014-12 Release 0.5.0
|
|
81
106
|
|
|
82
107
|
Horst Duchene
|
|
83
108
|
* Changed edge sequence to match example picture (daa88e)
|
|
@@ -90,7 +115,8 @@ Louis Rose
|
|
|
90
115
|
* Fix #15. Use object IDs rather than labels to identify vertexs in DOT graph to ensure that distinct nodes that share a label are shown. (33206f)
|
|
91
116
|
* Issue #15. Fix tests. (4fc455)
|
|
92
117
|
|
|
93
|
-
2014-12 Release 0.5.0
|
|
118
|
+
### 2014-12 Release 0.5.0
|
|
119
|
+
|
|
94
120
|
Horst Duchene
|
|
95
121
|
* Changed edge sequence to match example picture (daa88e)
|
|
96
122
|
* Fixed comment (6a6c93)
|
|
@@ -103,7 +129,7 @@ Louis Rose
|
|
|
103
129
|
shown. (33206f)
|
|
104
130
|
* Issue #15. Fix tests. (4fc455)
|
|
105
131
|
|
|
106
|
-
2014-12 Release 0.5.0
|
|
132
|
+
### 2014-12 Release 0.5.0
|
|
107
133
|
|
|
108
134
|
This release mainly contains the contributions of Kirill, who added many algorithms to the library. Thank you Kirill!
|
|
109
135
|
|
|
@@ -122,27 +148,27 @@ This release mainly contains the contributions of Kirill, who added many algorit
|
|
|
122
148
|
* @KL-7: Code clean up and configuration updates (#2)
|
|
123
149
|
* @aschoerk: Renamed test-directory, (includes Rakefile), fixed TestComponents (#1)
|
|
124
150
|
|
|
125
|
-
2008-08-27 23:30 javanthropus
|
|
151
|
+
### 2008-08-27 23:30 javanthropus
|
|
126
152
|
|
|
127
|
-
|
|
153
|
+
* lib/rgl/base.rb: Preparing for 0.4.0 release
|
|
128
154
|
|
|
129
|
-
2008-08-26 20:07 javanthropus
|
|
155
|
+
### 2008-08-26 20:07 javanthropus
|
|
130
156
|
|
|
131
|
-
|
|
157
|
+
* lib/rgl/dot.rb, lib/rgl/rdot.rb, tests/TestRdot.rb: Move the DOT
|
|
132
158
|
module into the RGL module
|
|
133
159
|
|
|
134
160
|
* This eliminates a class conflict with the DOT module from rdoc
|
|
135
161
|
when building RGL's documentation * Also remove the superfluous
|
|
136
162
|
DOT prefixes from class names in the DOT module
|
|
137
163
|
|
|
138
|
-
2008-08-24 06:16 javanthropus
|
|
164
|
+
### 2008-08-24 06:16 javanthropus
|
|
139
165
|
|
|
140
|
-
|
|
166
|
+
* Rakefile: Remove some comments I accidentally left in while
|
|
141
167
|
testing rdoc functionality
|
|
142
168
|
|
|
143
|
-
2008-08-24 06:03 javanthropus
|
|
169
|
+
### 2008-08-24 06:03 javanthropus
|
|
144
170
|
|
|
145
|
-
|
|
171
|
+
* Rakefile, lib/rgl/transitiv_closure.rb, lib/rgl/transitivity.rb,
|
|
146
172
|
tests/TestTransitiveClosure.rb, tests/TestTransitivity.rb:
|
|
147
173
|
Feature 21641: Added transitive reduction functionality
|
|
148
174
|
|
|
@@ -153,9 +179,9 @@ This release mainly contains the contributions of Kirill, who added many algorit
|
|
|
153
179
|
load the transitivity.rb file for backward compatibility * Moved
|
|
154
180
|
all transitivity tests into TestTransitivity.rb
|
|
155
181
|
|
|
156
|
-
2008-08-23 15:45 javanthropus
|
|
182
|
+
### 2008-08-23 15:45 javanthropus
|
|
157
183
|
|
|
158
|
-
|
|
184
|
+
* lib/rgl/condensation.rb, lib/rgl/transitiv_closure.rb,
|
|
159
185
|
tests/TestTransitiveClosure.rb: Defect 21630: Fixed transitive
|
|
160
186
|
closure
|
|
161
187
|
|
|
@@ -166,74 +192,74 @@ This release mainly contains the contributions of Kirill, who added many algorit
|
|
|
166
192
|
was added as well * More tests were added to cover more corner
|
|
167
193
|
cases
|
|
168
194
|
|
|
169
|
-
2008-08-23 05:40 javanthropus
|
|
195
|
+
### 2008-08-23 05:40 javanthropus
|
|
170
196
|
|
|
171
|
-
|
|
197
|
+
* tests/TestGraph.rb: Update basic graph tests to account for
|
|
172
198
|
graphs with edgeless vertices Also clean up some minor formatting
|
|
173
199
|
and assertion issues
|
|
174
200
|
|
|
175
|
-
2008-08-23 05:37 javanthropus
|
|
201
|
+
### 2008-08-23 05:37 javanthropus
|
|
176
202
|
|
|
177
|
-
|
|
203
|
+
* lib/rgl/adjacency.rb: Defect 21609: Fix the to_adjacency method
|
|
178
204
|
to preserve edgeless vertices
|
|
179
205
|
|
|
180
|
-
2008-03-18 15:03 javanthropus
|
|
206
|
+
### 2008-03-18 15:03 javanthropus
|
|
181
207
|
|
|
182
|
-
|
|
208
|
+
* lib/rgl/rdot.rb, tests/TestRdot.rb: More reliably detect and
|
|
183
209
|
handle newlines embedded within IDs and labels
|
|
184
210
|
|
|
185
|
-
2008-03-08 10:48 monora
|
|
211
|
+
### 2008-03-08 10:48 monora
|
|
186
212
|
|
|
187
|
-
|
|
213
|
+
* ChangeLog, lib/rgl/base.rb (utags: REL_0_3_1): Prepare 0.3.1
|
|
188
214
|
release
|
|
189
215
|
|
|
190
|
-
2008-03-04 20:18 monora
|
|
216
|
+
### 2008-03-04 20:18 monora
|
|
191
217
|
|
|
192
|
-
|
|
218
|
+
* Rakefile (tags: REL_0_3_1, REL_0_3_0): pre-tag commit
|
|
193
219
|
|
|
194
|
-
2008-03-02 18:16 javanthropus
|
|
220
|
+
### 2008-03-02 18:16 javanthropus
|
|
195
221
|
|
|
196
|
-
|
|
222
|
+
* lib/rgl/rdot.rb (tags: REL_0_3_0): IDs and labels must be
|
|
197
223
|
converted to strings before processing
|
|
198
224
|
|
|
199
|
-
2008-03-02 17:45 javanthropus
|
|
225
|
+
### 2008-03-02 17:45 javanthropus
|
|
200
226
|
|
|
201
|
-
|
|
227
|
+
* lib/rgl/rdot.rb, tests/TestRdot.rb: Added documentation for
|
|
202
228
|
rdot.rb and full test coverage
|
|
203
229
|
|
|
204
|
-
2008-03-02 15:19 monora
|
|
230
|
+
### 2008-03-02 15:19 monora
|
|
205
231
|
|
|
206
|
-
|
|
232
|
+
* README: Removed dead link to rubygarden.com
|
|
207
233
|
|
|
208
|
-
2008-03-02 15:09 monora
|
|
234
|
+
### 2008-03-02 15:09 monora
|
|
209
235
|
|
|
210
|
-
|
|
236
|
+
* ChangeLog, README, Rakefile (utags: REL_0_3_0): Polishing before
|
|
211
237
|
0.3.0 release
|
|
212
238
|
|
|
213
|
-
2008-03-02 13:45 monora
|
|
239
|
+
### 2008-03-02 13:45 monora
|
|
214
240
|
|
|
215
|
-
|
|
241
|
+
* lib/rgl/: adjacency.rb, rdot.rb (utags: REL_0_3_0): Fixed
|
|
216
242
|
warnings generated by Ruby Dev Tools
|
|
217
243
|
|
|
218
|
-
2008-03-02 07:57 javanthropus
|
|
244
|
+
### 2008-03-02 07:57 javanthropus
|
|
219
245
|
|
|
220
|
-
|
|
246
|
+
* Rakefile, lib/rgl/graphxml.rb (tags: REL_0_3_0),
|
|
221
247
|
tests/TestGraphXML.rb (tags: REL_0_3_0): Change the way GraphML
|
|
222
248
|
support is added to the MutableGraph module such that the
|
|
223
249
|
interface is cleaner and documented
|
|
224
250
|
|
|
225
|
-
2008-03-01 20:12 javanthropus
|
|
251
|
+
### 2008-03-01 20:12 javanthropus
|
|
226
252
|
|
|
227
|
-
|
|
253
|
+
* lib/rgl/base.rb, tests/TestGraph.rb: Polish the documentation for
|
|
228
254
|
and expand the test coverage of RGL::Graph
|
|
229
255
|
|
|
230
|
-
2008-02-27 19:44 monora
|
|
256
|
+
### 2008-02-27 19:44 monora
|
|
231
257
|
|
|
232
|
-
|
|
258
|
+
* README: Added link to coverage page
|
|
233
259
|
|
|
234
|
-
2008-02-26 06:01 javanthropus
|
|
260
|
+
### 2008-02-26 06:01 javanthropus
|
|
235
261
|
|
|
236
|
-
|
|
262
|
+
* lib/rgl/dot.rb, lib/rgl/rdot.rb, tests/TestDot.rb,
|
|
237
263
|
tests/TestRdot.rb: All IDs for DOT objects, including names,
|
|
238
264
|
options, and values, are now automatically quoted as necessary
|
|
239
265
|
according to the rules documented at
|
|
@@ -248,141 +274,141 @@ This release mainly contains the contributions of Kirill, who added many algorit
|
|
|
248
274
|
Some changes were made in order to remove explicit quotes from
|
|
249
275
|
labels which are no longer necessary.
|
|
250
276
|
|
|
251
|
-
2008-02-17 20:15 monora
|
|
277
|
+
### 2008-02-17 20:15 monora
|
|
252
278
|
|
|
253
|
-
|
|
279
|
+
* lib/rgl/enumerable_ext.rb: Removed backwards compatability method
|
|
254
280
|
inject. Ruby > 1.8 supports it out of the box.
|
|
255
281
|
|
|
256
|
-
2008-02-17 20:07 monora
|
|
282
|
+
### 2008-02-17 20:07 monora
|
|
257
283
|
|
|
258
|
-
|
|
284
|
+
* tests/: TestEdge.rb, TestDirectedGraph.rb, TestGraph.rb: Improved
|
|
259
285
|
test coverage
|
|
260
286
|
|
|
261
|
-
2008-02-17 20:06 monora
|
|
287
|
+
### 2008-02-17 20:06 monora
|
|
262
288
|
|
|
263
|
-
|
|
289
|
+
* lib/rgl/adjacency.rb: fixed bug in edgelist_class
|
|
264
290
|
|
|
265
|
-
2008-02-17 17:59 monora
|
|
291
|
+
### 2008-02-17 17:59 monora
|
|
266
292
|
|
|
267
|
-
|
|
293
|
+
* Rakefile: - added coverage task - fixed BUG #2674 - added
|
|
268
294
|
changelog task - use jamis buck rdoc template
|
|
269
295
|
|
|
270
|
-
2008-02-17 17:45 monora
|
|
296
|
+
### 2008-02-17 17:45 monora
|
|
271
297
|
|
|
272
|
-
|
|
298
|
+
* lib/rgl/base.rb: Changed Version to 0.3.0
|
|
273
299
|
|
|
274
|
-
2008-02-17 09:09 javanthropus
|
|
300
|
+
### 2008-02-17 09:09 javanthropus
|
|
275
301
|
|
|
276
|
-
|
|
302
|
+
* lib/rgl/rdot.rb: DOTSimpleElement provides no useful function, so
|
|
277
303
|
remove it
|
|
278
304
|
|
|
279
|
-
2008-02-17 09:08 javanthropus
|
|
305
|
+
### 2008-02-17 09:08 javanthropus
|
|
280
306
|
|
|
281
|
-
|
|
307
|
+
* tests/TestRdot.rb: Test that setting only the name for a DOTNode
|
|
282
308
|
does NOT set the label
|
|
283
309
|
|
|
284
|
-
2008-02-17 08:58 javanthropus
|
|
310
|
+
### 2008-02-17 08:58 javanthropus
|
|
285
311
|
|
|
286
|
-
|
|
312
|
+
* lib/rgl/rdot.rb, tests/TestRdot.rb: Add support for the Mrecord
|
|
287
313
|
shape to DOTNode. Rewrite DOTNode#to_s to be easier to
|
|
288
314
|
understand. #Rewrite DOTPort to allow for nesting ports.
|
|
289
315
|
|
|
290
|
-
2008-02-17 03:20 javanthropus
|
|
316
|
+
### 2008-02-17 03:20 javanthropus
|
|
291
317
|
|
|
292
|
-
|
|
318
|
+
* lib/rgl/rdot.rb, tests/TestRdot.rb: BUG 17964: DOTElement no
|
|
293
319
|
longer sets the label unless the user explicitly sets one
|
|
294
320
|
|
|
295
|
-
2008-02-17 02:56 javanthropus
|
|
321
|
+
### 2008-02-17 02:56 javanthropus
|
|
296
322
|
|
|
297
|
-
|
|
323
|
+
* tests/TestRdot.rb: Fix a DOTEdge test which was actually
|
|
298
324
|
retesting DOTNode
|
|
299
325
|
|
|
300
|
-
2008-02-16 19:58 javanthropus
|
|
326
|
+
### 2008-02-16 19:58 javanthropus
|
|
301
327
|
|
|
302
|
-
|
|
328
|
+
* lib/rgl/rdot.rb, tests/TestRdot.rb: BUG #17962: Subgraphs must be
|
|
303
329
|
identified by a "subgraph" header rather than a "graph" header
|
|
304
330
|
|
|
305
|
-
2008-02-13 22:32 monora
|
|
331
|
+
### 2008-02-13 22:32 monora
|
|
306
332
|
|
|
307
|
-
|
|
333
|
+
* tests/TestRdot.rb: Fixed typo
|
|
308
334
|
|
|
309
|
-
2008-02-13 22:20 monora
|
|
335
|
+
### 2008-02-13 22:20 monora
|
|
310
336
|
|
|
311
|
-
|
|
337
|
+
* doc/jamis.rb: Added template from Jamis Buck for rdoc. Looks
|
|
312
338
|
better.
|
|
313
339
|
|
|
314
|
-
2008-02-12 23:37 monora
|
|
340
|
+
### 2008-02-12 23:37 monora
|
|
315
341
|
|
|
316
|
-
|
|
342
|
+
* lib/rgl/rdot.rb: BUG #17969: Applied patch from Jeremy Bopp.
|
|
317
343
|
Thanks.
|
|
318
344
|
|
|
319
|
-
2008-02-12 22:29 monora
|
|
345
|
+
### 2008-02-12 22:29 monora
|
|
320
346
|
|
|
321
|
-
|
|
347
|
+
* README: fixed require in topsort example added delicious links
|
|
322
348
|
|
|
323
|
-
2007-12-11 21:04 wsdng
|
|
349
|
+
### 2007-12-11 21:04 wsdng
|
|
324
350
|
|
|
325
|
-
|
|
351
|
+
* lib/rgl/rdot.rb, tests/TestRdot.rb: fixed [#16125] DOT::DOTNode
|
|
326
352
|
produces wrong DOT syntax
|
|
327
353
|
|
|
328
|
-
2007-12-11 00:21 wsdng
|
|
354
|
+
### 2007-12-11 00:21 wsdng
|
|
329
355
|
|
|
330
|
-
|
|
356
|
+
* tests/: TestDot.rb, TestRdot.rb: reproduced [#16125] DOT::DOTNode
|
|
331
357
|
produces wrong DOT syntax
|
|
332
358
|
|
|
333
|
-
2007-06-20 22:43 monora
|
|
359
|
+
### 2007-06-20 22:43 monora
|
|
334
360
|
|
|
335
|
-
|
|
361
|
+
* lib/rgl/base.rb, rakelib/dep_graph.rake: Fixed typo
|
|
336
362
|
|
|
337
|
-
2006-04-19 21:32 monora
|
|
363
|
+
### 2006-04-19 21:32 monora
|
|
338
364
|
|
|
339
|
-
|
|
365
|
+
* rakelib/dep_graph.rake: - Use write_to_graphic_file instead of
|
|
340
366
|
dotty (dotty crashes) - omit added task from vertices
|
|
341
367
|
|
|
342
|
-
2006-04-12 23:45 monora
|
|
368
|
+
### 2006-04-12 23:45 monora
|
|
343
369
|
|
|
344
|
-
|
|
370
|
+
* rakelib/dep_graph.rake: Initial checkin
|
|
345
371
|
|
|
346
|
-
2006-04-12 23:40 monora
|
|
372
|
+
### 2006-04-12 23:40 monora
|
|
347
373
|
|
|
348
|
-
|
|
374
|
+
* lib/rgl/bidirectional.rb: Moved to module RGL
|
|
349
375
|
|
|
350
|
-
2006-04-12 23:36 monora
|
|
376
|
+
### 2006-04-12 23:36 monora
|
|
351
377
|
|
|
352
|
-
|
|
378
|
+
* lib/rgl/base.rb: Moved BidirectionalGraph to own file.
|
|
353
379
|
|
|
354
|
-
2006-04-12 23:31 monora
|
|
380
|
+
### 2006-04-12 23:31 monora
|
|
355
381
|
|
|
356
|
-
|
|
382
|
+
* lib/rgl/: base.rb, edge.rb, graph.rb: - Merged changes from Shawn
|
|
357
383
|
- dont want to split base.rb
|
|
358
384
|
|
|
359
|
-
2006-04-12 23:27 monora
|
|
385
|
+
### 2006-04-12 23:27 monora
|
|
360
386
|
|
|
361
|
-
|
|
387
|
+
* tests/: TestCycles.rb, TestGraph.rb, test_helper.rb,
|
|
362
388
|
TestComponents.rb, TestTransitiveClosure.rb, TestTraversal.rb: -
|
|
363
389
|
Merged changes from Shawn - added test_helper
|
|
364
390
|
|
|
365
|
-
2006-04-12 23:23 monora
|
|
391
|
+
### 2006-04-12 23:23 monora
|
|
366
392
|
|
|
367
|
-
|
|
393
|
+
* lib/rgl/adjacency.rb: - Merged changes from Shawn - implemented
|
|
368
394
|
clone support (initialize_copy)
|
|
369
395
|
|
|
370
|
-
2006-04-12 23:20 monora
|
|
396
|
+
### 2006-04-12 23:20 monora
|
|
371
397
|
|
|
372
|
-
|
|
398
|
+
* lib/rgl/mutable.rb: Use clone instead of self.class.new(self)
|
|
373
399
|
|
|
374
|
-
2006-04-12 23:19 monora
|
|
400
|
+
### 2006-04-12 23:19 monora
|
|
375
401
|
|
|
376
|
-
|
|
402
|
+
* lib/rgl/enumerable_ext.rb: Do not extend system class Array. Only
|
|
377
403
|
used for testing.
|
|
378
404
|
|
|
379
|
-
2006-03-28 19:10 monora
|
|
405
|
+
### 2006-03-28 19:10 monora
|
|
380
406
|
|
|
381
|
-
|
|
407
|
+
* lib/rgl/dot.rb: Added links to graphviz.
|
|
382
408
|
|
|
383
|
-
2006-03-20 02:06 spgarbet
|
|
409
|
+
### 2006-03-20 02:06 spgarbet
|
|
384
410
|
|
|
385
|
-
|
|
411
|
+
* lib/rgl/adjacency.rb, lib/rgl/base.rb, lib/rgl/bidirectional.rb,
|
|
386
412
|
lib/rgl/edge.rb, lib/rgl/enumerable_ext.rb, lib/rgl/graph.rb,
|
|
387
413
|
lib/rgl/mutable.rb, tests/TestComponents.rb, tests/TestCycles.rb,
|
|
388
414
|
tests/TestGraph.rb, tests/TestTransitiveClosure.rb,
|
|
@@ -391,78 +417,78 @@ This release mainly contains the contributions of Kirill, who added many algorit
|
|
|
391
417
|
merging of graphs. Split base into various subfiles. Added test
|
|
392
418
|
cases for changes. Fixed problem with GraphXML.
|
|
393
419
|
|
|
394
|
-
2006-03-09 23:25 monora
|
|
420
|
+
### 2006-03-09 23:25 monora
|
|
395
421
|
|
|
396
|
-
|
|
422
|
+
* lib/rgl/base.rb: Fixed typo Bug #2875
|
|
397
423
|
|
|
398
|
-
2006-03-03 22:28 monora
|
|
424
|
+
### 2006-03-03 22:28 monora
|
|
399
425
|
|
|
400
|
-
|
|
426
|
+
* .cvsignore, .project: We now use Eclipse-RDT
|
|
401
427
|
|
|
402
|
-
2005-09-18 14:08 monora
|
|
428
|
+
### 2005-09-18 14:08 monora
|
|
403
429
|
|
|
404
|
-
|
|
430
|
+
* tests/TestComponents.rb (tags: PRE_CHECKIN_JC): Fixed required
|
|
405
431
|
files.
|
|
406
432
|
|
|
407
|
-
2005-09-17 18:27 monora
|
|
433
|
+
### 2005-09-17 18:27 monora
|
|
408
434
|
|
|
409
|
-
|
|
435
|
+
* lib/rgl/base.rb (tags: PRE_CHECKIN_JC): Documentation corrected.
|
|
410
436
|
|
|
411
|
-
2005-09-17 18:25 monora
|
|
437
|
+
### 2005-09-17 18:25 monora
|
|
412
438
|
|
|
413
|
-
|
|
439
|
+
* README (tags: PRE_CHECKIN_JC): Added link to delicious.
|
|
414
440
|
|
|
415
|
-
2005-04-12 20:59 monora
|
|
441
|
+
### 2005-04-12 20:59 monora
|
|
416
442
|
|
|
417
|
-
|
|
443
|
+
* Rakefile (tags: PRE_CHECKIN_JC): corrected homepage link in
|
|
418
444
|
gemspec
|
|
419
445
|
|
|
420
|
-
2005-04-12 20:50 monora
|
|
446
|
+
### 2005-04-12 20:50 monora
|
|
421
447
|
|
|
422
|
-
|
|
448
|
+
* Makefile: rake is better than make
|
|
423
449
|
|
|
424
|
-
2005-04-12 20:35 monora
|
|
450
|
+
### 2005-04-12 20:35 monora
|
|
425
451
|
|
|
426
|
-
|
|
452
|
+
* README (tags: REL_0_2_3): updated copyright notice
|
|
427
453
|
|
|
428
|
-
2005-04-12 20:32 monora
|
|
454
|
+
### 2005-04-12 20:32 monora
|
|
429
455
|
|
|
430
|
-
|
|
456
|
+
* examples/examples.rb (tags: PRE_CHECKIN_JC, REL_0_2_3): Added
|
|
431
457
|
doc.
|
|
432
458
|
|
|
433
|
-
2005-04-12 18:23 monora
|
|
459
|
+
### 2005-04-12 18:23 monora
|
|
434
460
|
|
|
435
|
-
|
|
461
|
+
* README: Fixed some outdated links.
|
|
436
462
|
|
|
437
|
-
2005-04-05 19:54 monora
|
|
463
|
+
### 2005-04-05 19:54 monora
|
|
438
464
|
|
|
439
|
-
|
|
465
|
+
* ChangeLog (tags: PRE_CHECKIN_JC, REL_0_2_3): New entries
|
|
440
466
|
generated
|
|
441
467
|
|
|
442
|
-
2005-03-30 21:27 monora
|
|
468
|
+
### 2005-03-30 21:27 monora
|
|
443
469
|
|
|
444
|
-
|
|
470
|
+
* tests/TestDirectedGraph.rb (tags: PRE_CHECKIN_JC, REL_0_2_3):
|
|
445
471
|
Added test for isolated vertices in DirectedGraph#reverse.
|
|
446
472
|
|
|
447
|
-
2005-03-30 21:25 monora
|
|
473
|
+
### 2005-03-30 21:25 monora
|
|
448
474
|
|
|
449
|
-
|
|
475
|
+
* lib/rgl/adjacency.rb (tags: PRE_CHECKIN_JC, REL_0_2_3): Fixed bug
|
|
450
476
|
in DirectedGraph#reverse reported by Kaspar Schiess. Isolated
|
|
451
477
|
vertices were not treated correctly.
|
|
452
478
|
|
|
453
|
-
2005-03-26 15:06 wsdng
|
|
479
|
+
### 2005-03-26 15:06 wsdng
|
|
454
480
|
|
|
455
|
-
|
|
481
|
+
* lib/rgl/rdot.rb (tags: PRE_CHECKIN_JC, REL_0_2_3): added node and
|
|
456
482
|
edge attributes
|
|
457
483
|
|
|
458
|
-
2005-03-22 22:31 monora
|
|
484
|
+
### 2005-03-22 22:31 monora
|
|
459
485
|
|
|
460
|
-
|
|
486
|
+
* Rakefile (tags: REL_0_2_3): Fixed autorequire to work with gem
|
|
461
487
|
version 0.8.8
|
|
462
488
|
|
|
463
|
-
2005-02-04 22:41 monora
|
|
489
|
+
### 2005-02-04 22:41 monora
|
|
464
490
|
|
|
465
|
-
|
|
491
|
+
* README, lib/rgl/adjacency.rb, lib/rgl/base.rb (tags: REL_0_2_3),
|
|
466
492
|
lib/rgl/connected_components.rb (tags: PRE_CHECKIN_JC,
|
|
467
493
|
REL_0_2_3), lib/rgl/dot.rb (tags: PRE_CHECKIN_JC, REL_0_2_3),
|
|
468
494
|
lib/rgl/graphxml.rb (tags: PRE_CHECKIN_JC, REL_0_2_3),
|
|
@@ -474,59 +500,59 @@ This release mainly contains the contributions of Kirill, who added many algorit
|
|
|
474
500
|
REL_0_2_3): Fixed some formatting issues and smoothed
|
|
475
501
|
documentation. Thanks to Rich Morin.
|
|
476
502
|
|
|
477
|
-
2004-12-13 23:33 monora
|
|
503
|
+
### 2004-12-13 23:33 monora
|
|
478
504
|
|
|
479
|
-
|
|
505
|
+
* Makefile, README, Rakefile, lib/rgl/base.rb, lib/rgl/graphxml.rb,
|
|
480
506
|
lib/rgl/implicit.rb, lib/rgl/traversal.rb: Polished documentation
|
|
481
507
|
|
|
482
|
-
2004-12-13 21:07 monora
|
|
508
|
+
### 2004-12-13 21:07 monora
|
|
483
509
|
|
|
484
|
-
|
|
510
|
+
* lib/rgl/adjacency.rb, tests/TestDirectedGraph.rb,
|
|
485
511
|
tests/TestUnDirectedGraph.rb (tags: PRE_CHECKIN_JC, REL_0_2_3):
|
|
486
512
|
Fixed bug in Graph#reverse reported by Sascha Ebach.
|
|
487
513
|
|
|
488
|
-
2004-12-12 19:09 cyent
|
|
514
|
+
### 2004-12-12 19:09 cyent
|
|
489
515
|
|
|
490
|
-
|
|
516
|
+
* tests/TestGraphXML.rb: Fixed bug in relative path
|
|
491
517
|
|
|
492
|
-
2004-12-12 19:08 cyent
|
|
518
|
+
### 2004-12-12 19:08 cyent
|
|
493
519
|
|
|
494
|
-
|
|
520
|
+
* tests/TestDirectedGraph.rb: Added test_random
|
|
495
521
|
|
|
496
|
-
2004-12-12 19:07 cyent
|
|
522
|
+
### 2004-12-12 19:07 cyent
|
|
497
523
|
|
|
498
|
-
|
|
524
|
+
* lib/rgl/: adjacency.rb, base.rb, connected_components.rb,
|
|
499
525
|
rdot.rb: Fixed comments, removed warnings in ruby1.9 -w by adding
|
|
500
526
|
attr_readers, told emacs to use tab-width 4 on these files
|
|
501
527
|
|
|
502
|
-
2004-12-11 23:46 monora
|
|
528
|
+
### 2004-12-11 23:46 monora
|
|
503
529
|
|
|
504
|
-
|
|
530
|
+
* README (tags: REL_0_2_2), Rakefile (tags: REL_0_2_2),
|
|
505
531
|
examples/examples.rb (tags: REL_0_2_2), lib/stream.rb,
|
|
506
532
|
lib/rgl/base.rb (tags: REL_0_2_2), lib/rgl/graphxml.rb (tags:
|
|
507
533
|
REL_0_2_2), lib/rgl/traversal.rb (tags: REL_0_2_2),
|
|
508
534
|
tests/TestGraphXML.rb (tags: PRE_CHECKIN_JC, REL_0_2_3,
|
|
509
535
|
REL_0_2_2), tests/_TestGraphXML.rb: Added gem packaging.
|
|
510
536
|
|
|
511
|
-
2004-10-08 15:15 monora
|
|
537
|
+
### 2004-10-08 15:15 monora
|
|
512
538
|
|
|
513
|
-
|
|
539
|
+
* tests/runtests.rb: In new testframework not needed.
|
|
514
540
|
|
|
515
|
-
2004-10-08 15:14 monora
|
|
541
|
+
### 2004-10-08 15:14 monora
|
|
516
542
|
|
|
517
|
-
|
|
543
|
+
* lib/utils.rb: Code move to base.rb
|
|
518
544
|
|
|
519
|
-
2004-10-06 22:11 monora
|
|
545
|
+
### 2004-10-06 22:11 monora
|
|
520
546
|
|
|
521
|
-
|
|
547
|
+
* lib/rgl/base.rb: Code from utils.rb included
|
|
522
548
|
|
|
523
|
-
2004-10-06 22:09 monora
|
|
549
|
+
### 2004-10-06 22:09 monora
|
|
524
550
|
|
|
525
|
-
|
|
551
|
+
* Rakefile: First start for gem preparation
|
|
526
552
|
|
|
527
|
-
2003-07-30 21:50 monora
|
|
553
|
+
### 2003-07-30 21:50 monora
|
|
528
554
|
|
|
529
|
-
|
|
555
|
+
* lib/utils.rb, lib/rgl/implicit.rb (tags: REL_0_2_2),
|
|
530
556
|
tests/TestComponents.rb (tags: REL_0_2_3, REL_0_2_2),
|
|
531
557
|
tests/TestDirectedGraph.rb (tags: REL_0_2_2),
|
|
532
558
|
tests/TestImplicit.rb (tags: PRE_CHECKIN_JC, REL_0_2_3,
|
|
@@ -538,47 +564,47 @@ This release mainly contains the contributions of Kirill, who added many algorit
|
|
|
538
564
|
- port to ruby 1.8 - compiler warnings removed - set_up -> setup
|
|
539
565
|
in testfiles
|
|
540
566
|
|
|
541
|
-
2002-11-13 21:53 monora
|
|
567
|
+
### 2002-11-13 21:53 monora
|
|
542
568
|
|
|
543
|
-
|
|
569
|
+
* lib/rgl/: rdot.rb, dot.rb (utags: REL_0_2_2, rforge-import):
|
|
544
570
|
Name-attribute of DOTNode has to be escaped by ".
|
|
545
571
|
|
|
546
|
-
2002-11-10 21:21 monora
|
|
572
|
+
### 2002-11-10 21:21 monora
|
|
547
573
|
|
|
548
|
-
|
|
574
|
+
* lib/: utils.rb, rgl/adjacency.rb (tags: REL_0_2_2,
|
|
549
575
|
rforge-import), set.rb: Use knus compatibility library for Ruby
|
|
550
576
|
1.8 esp. for set.rb and inject.
|
|
551
577
|
|
|
552
|
-
2002-09-22 15:58 monora
|
|
578
|
+
### 2002-09-22 15:58 monora
|
|
553
579
|
|
|
554
|
-
|
|
580
|
+
* lib/rgl/dot.rb: to_dot_graph now also outputs vertices.
|
|
555
581
|
|
|
556
|
-
2002-09-22 15:57 monora
|
|
582
|
+
### 2002-09-22 15:57 monora
|
|
557
583
|
|
|
558
|
-
|
|
584
|
+
* lib/rgl/adjacency.rb: cosmetic.
|
|
559
585
|
|
|
560
|
-
2002-09-17 22:58 monora
|
|
586
|
+
### 2002-09-17 22:58 monora
|
|
561
587
|
|
|
562
|
-
|
|
588
|
+
* Makefile (tags: REL_0_2_2, rforge-import): Added releasedoc
|
|
563
589
|
target.
|
|
564
590
|
|
|
565
|
-
2002-09-17 22:57 monora
|
|
591
|
+
### 2002-09-17 22:57 monora
|
|
566
592
|
|
|
567
|
-
|
|
593
|
+
* lib/rgl/: base.rb (tags: rforge-import), implicit.rb: Fixed typo.
|
|
568
594
|
|
|
569
|
-
2002-08-29 21:20 monora
|
|
595
|
+
### 2002-08-29 21:20 monora
|
|
570
596
|
|
|
571
|
-
|
|
597
|
+
* ChangeLog: Changed NameError to NoVertexError.
|
|
572
598
|
|
|
573
|
-
2002-08-29 21:17 monora
|
|
599
|
+
### 2002-08-29 21:17 monora
|
|
574
600
|
|
|
575
|
-
|
|
601
|
+
* tests/TestDirectedGraph.rb, tests/TestUnDirectedGraph.rb,
|
|
576
602
|
lib/rgl/adjacency.rb, lib/rgl/base.rb, ChangeLog: Changed
|
|
577
603
|
NameError to NoVertexError.
|
|
578
604
|
|
|
579
|
-
2002-08-23 22:07 monora
|
|
605
|
+
### 2002-08-23 22:07 monora
|
|
580
606
|
|
|
581
|
-
|
|
607
|
+
* Makefile (tags: V0_2_1), README (tags: rforge-import, V0_2_1),
|
|
582
608
|
examples/canvas.rb (tags: PRE_CHECKIN_JC, REL_0_2_3, REL_0_2_2,
|
|
583
609
|
rforge-import, V0_2_1), examples/north/g.12.8.graphml (tags:
|
|
584
610
|
PRE_CHECKIN_JC, REL_0_2_3, REL_0_2_2, rforge-import, V0_2_1),
|
|
@@ -588,6 +614,6 @@ This release mainly contains the contributions of Kirill, who added many algorit
|
|
|
588
614
|
lib/rgl/rdot.rb (tags: V0_2_1): canvas.rb added. Collision with
|
|
589
615
|
rdoc/dot.rb removed.
|
|
590
616
|
|
|
591
|
-
2002-08-19 21:58 monora
|
|
617
|
+
### 2002-08-19 21:58 monora
|
|
592
618
|
|
|
593
|
-
|
|
619
|
+
* README (tags: V0_2): Added link to SF.
|
data/README.md
CHANGED
|
@@ -283,15 +283,20 @@ read and matz for Ruby. Dave included in the latest version of RDoc (alpha9)
|
|
|
283
283
|
the module {RGL::DOT} which is used instead of Roberts module to visualize
|
|
284
284
|
graphs.
|
|
285
285
|
|
|
286
|
-
Jeremy Bopp, John Carter, Sascha Doerdelmann, Shawn Garbett, Andreas
|
|
287
|
-
|
|
288
|
-
|
|
286
|
+
Jeremy Bopp, John Carter, Sascha Doerdelmann, Shawn Garbett, Andreas Schörk, Dan
|
|
287
|
+
Čermák, Kirill Lashuk and Markus Napp for contributing additions, test cases and
|
|
288
|
+
bugfixes. The complete list of contributers is
|
|
289
|
+
[here](https://github.com/monora/rgl/contributors).
|
|
289
290
|
|
|
290
|
-
|
|
291
|
+
## Links
|
|
292
|
+
|
|
293
|
+
- See {file:CHANGELOG.md} for major/breaking updates.
|
|
294
|
+
- To **contribute**, please read {file:.github/CONTRIBUTING.md} first.
|
|
295
|
+
- Please [open an issue](https://github.com/monora/rgl/issues/new) if anything
|
|
296
|
+
is missing or unclear in this documentation.
|
|
291
297
|
|
|
292
298
|
## Copying
|
|
293
299
|
|
|
294
300
|
RGL is Copyright (c) 2002,2004,2005,2008,2013,2015,2019,2020,2022,2023 by Horst
|
|
295
|
-
Duchene. It is free software, and may be redistributed under the
|
|
296
|
-
|
|
297
|
-
the LICENSE file.
|
|
301
|
+
Duchene. It is free software, and may be redistributed under the {file:LICENSE}
|
|
302
|
+
and terms specified in the LICENSE file.
|
data/Rakefile
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# -*- ruby -*-
|
|
2
2
|
|
|
3
|
-
require 'rubygems'
|
|
4
3
|
require 'bundler/setup'
|
|
5
|
-
|
|
6
|
-
require 'rubygems/package_task'
|
|
7
|
-
|
|
8
4
|
require 'rake/testtask'
|
|
9
5
|
require 'rake/clean'
|
|
10
6
|
require 'yard'
|
|
11
7
|
|
|
12
8
|
$:.unshift File.join(File.dirname(__FILE__), 'lib')
|
|
13
|
-
require 'rgl/
|
|
9
|
+
require 'rgl/version' # defines RGL::VERSION
|
|
14
10
|
|
|
15
11
|
SOURCES = FileList['lib/**/*.rb']
|
|
16
12
|
|
|
@@ -26,13 +22,20 @@ Rake::TestTask.new do |t|
|
|
|
26
22
|
t.verbose = true
|
|
27
23
|
end
|
|
28
24
|
|
|
25
|
+
# Test bfs_search_tree_from in isolation, to ensure that adjacency is not loaded by other tests.
|
|
26
|
+
Rake::TestTask.new do |t|
|
|
27
|
+
t.libs << 'test'
|
|
28
|
+
t.pattern = 'test/traversal_bfs_require.rb'
|
|
29
|
+
t.verbose = true
|
|
30
|
+
end
|
|
31
|
+
|
|
29
32
|
# Git tagging
|
|
30
33
|
|
|
31
34
|
desc 'Commit all changes as a new version commit. Tag the commit with v<version> tag'
|
|
32
35
|
task :tag do
|
|
33
|
-
puts "Committing and tagging version #{
|
|
34
|
-
`git commit -am 'Version #{
|
|
35
|
-
`git tag 'v#{
|
|
36
|
+
puts "Committing and tagging version #{RGL::VERSION}"
|
|
37
|
+
`git commit -am 'Version #{RGL::VERSION}'`
|
|
38
|
+
`git tag 'v#{RGL::VERSION}'`
|
|
36
39
|
end
|
|
37
40
|
|
|
38
41
|
YARD::Rake::YardocTask.new
|
|
@@ -86,30 +89,3 @@ task :lines do
|
|
|
86
89
|
end
|
|
87
90
|
show_line('TOTAL', total_lines, total_code)
|
|
88
91
|
end
|
|
89
|
-
|
|
90
|
-
# simple rake task to output a changelog between two commits, tags ...
|
|
91
|
-
# output is formatted simply, commits are grouped under each author name
|
|
92
|
-
#
|
|
93
|
-
desc 'generate changelog with nice clean output'
|
|
94
|
-
task :changelog, :since_c, :until_c do |t, args|
|
|
95
|
-
since_c = args[:since_c] || `git tag | tail -1`.chomp
|
|
96
|
-
until_c = args[:until_c]
|
|
97
|
-
cmd = `git log --pretty='format:%ci::%an <%ae>::%s::%H' #{since_c}..#{until_c}`
|
|
98
|
-
|
|
99
|
-
entries = Hash.new
|
|
100
|
-
changelog_content = String.new
|
|
101
|
-
|
|
102
|
-
cmd.split("\n").each do |entry|
|
|
103
|
-
_, author, subject, hash = entry.chomp.split('::')
|
|
104
|
-
entries[author] = Array.new unless entries[author]
|
|
105
|
-
entries[author] << "#{subject} (#{hash[0..5]})" unless subject =~ /Merge/
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
# generate clean output
|
|
109
|
-
entries.keys.each do |author|
|
|
110
|
-
changelog_content += author + "\n"
|
|
111
|
-
entries[author].reverse.each { |entry| changelog_content += " * #{entry}\n" }
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
puts changelog_content
|
|
115
|
-
end
|
data/lib/rgl/base.rb
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
# base.rb
|
|
2
2
|
|
|
3
|
-
# version information
|
|
4
|
-
RGL_VERSION = "0.6.3"
|
|
5
|
-
|
|
6
3
|
# Module {RGL} defines the namespace for all modules and classes of the graph
|
|
7
4
|
# library. The main module is {Graph} which defines the abstract behavior of
|
|
8
5
|
# all graphs in the library. Other important modules or classes are:
|
data/lib/rgl/traversal.rb
CHANGED
|
@@ -117,7 +117,9 @@ module RGL
|
|
|
117
117
|
#
|
|
118
118
|
# @return [DirectedAdjacencyGraph] which represents a BFS search tree starting at _v_.
|
|
119
119
|
def bfs_search_tree_from(v)
|
|
120
|
-
|
|
120
|
+
unless defined?(DirectedAdjacencyGraph)
|
|
121
|
+
require 'rgl/adjacency'
|
|
122
|
+
end
|
|
121
123
|
bfs = bfs_iterator(v)
|
|
122
124
|
tree = DirectedAdjacencyGraph.new
|
|
123
125
|
|
data/lib/rgl/version.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require 'test/unit'
|
|
2
|
+
|
|
3
|
+
# Do not require rgl/adjacency !
|
|
4
|
+
require 'rgl/traversal'
|
|
5
|
+
require 'rgl/implicit'
|
|
6
|
+
|
|
7
|
+
include RGL
|
|
8
|
+
|
|
9
|
+
# Cyclic graph with _n_ vertices. Need a concrete graph, that is not an AdjacencyGraph
|
|
10
|
+
def cycle(n)
|
|
11
|
+
RGL::ImplicitGraph.new { |g|
|
|
12
|
+
g.vertex_iterator { |b| 0.upto(n - 1, &b) }
|
|
13
|
+
g.adjacent_iterator { |x, b| b.call((x + 1) % n) }
|
|
14
|
+
g.directed = true
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class TestAdjacencyNotRequired < Test::Unit::TestCase
|
|
19
|
+
|
|
20
|
+
def setup
|
|
21
|
+
@dg = cycle(4)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_bfs_search_tree
|
|
25
|
+
# bfs_search_tree_from requires rgl/adjacency if not yet loaded.
|
|
26
|
+
assert_equal("(1-2)(2-3)(3-0)", @dg.bfs_search_tree_from(1).edges.sort.join)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rgl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Horst Duchene
|
|
8
8
|
- Kirill Lashuk
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2023-
|
|
12
|
+
date: 2023-06-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: stream
|
|
@@ -29,16 +29,16 @@ dependencies:
|
|
|
29
29
|
name: pairing_heap
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
|
-
- - "
|
|
32
|
+
- - "~>"
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 0.3
|
|
34
|
+
version: '0.3'
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
|
-
- - "
|
|
39
|
+
- - "~>"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 0.3
|
|
41
|
+
version: '0.3'
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: rexml
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -63,44 +63,44 @@ dependencies:
|
|
|
63
63
|
name: rake
|
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - "
|
|
66
|
+
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
68
|
+
version: '13.0'
|
|
69
69
|
type: :development
|
|
70
70
|
prerelease: false
|
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
75
|
+
version: '13.0'
|
|
76
76
|
- !ruby/object:Gem::Dependency
|
|
77
77
|
name: yard
|
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- - "
|
|
80
|
+
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
82
|
+
version: '0.9'
|
|
83
83
|
type: :development
|
|
84
84
|
prerelease: false
|
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- - "
|
|
87
|
+
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0'
|
|
89
|
+
version: '0.9'
|
|
90
90
|
- !ruby/object:Gem::Dependency
|
|
91
91
|
name: test-unit
|
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- - "
|
|
94
|
+
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '3.5'
|
|
97
97
|
type: :development
|
|
98
98
|
prerelease: false
|
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
|
-
- - "
|
|
101
|
+
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
103
|
+
version: '3.5'
|
|
104
104
|
description: RGL is a framework for graph data structures and algorithms
|
|
105
105
|
email: monora@gmail.com
|
|
106
106
|
executables: []
|
|
@@ -108,13 +108,12 @@ extensions: []
|
|
|
108
108
|
extra_rdoc_files:
|
|
109
109
|
- README.md
|
|
110
110
|
files:
|
|
111
|
-
-
|
|
111
|
+
- CHANGELOG.md
|
|
112
112
|
- Gemfile
|
|
113
113
|
- README.md
|
|
114
114
|
- Rakefile
|
|
115
115
|
- examples/canvas.rb
|
|
116
116
|
- examples/examples.rb
|
|
117
|
-
- examples/graph.dot
|
|
118
117
|
- examples/insel_der_tausend_gefahren.rb
|
|
119
118
|
- examples/north.rb
|
|
120
119
|
- examples/north/Graph.log
|
|
@@ -214,6 +213,7 @@ files:
|
|
|
214
213
|
- lib/rgl/transitiv_closure.rb
|
|
215
214
|
- lib/rgl/transitivity.rb
|
|
216
215
|
- lib/rgl/traversal.rb
|
|
216
|
+
- lib/rgl/version.rb
|
|
217
217
|
- rakelib/dep_graph.rake
|
|
218
218
|
- test/bellman_ford_test.rb
|
|
219
219
|
- test/bidirectional_graph_test.rb
|
|
@@ -235,13 +235,14 @@ files:
|
|
|
235
235
|
- test/rdot_test.rb
|
|
236
236
|
- test/test_helper.rb
|
|
237
237
|
- test/transitivity_test.rb
|
|
238
|
+
- test/traversal_bfs_require.rb
|
|
238
239
|
- test/traversal_test.rb
|
|
239
240
|
- test/undirected_graph_test.rb
|
|
240
241
|
homepage: https://github.com/monora/rgl
|
|
241
242
|
licenses:
|
|
242
|
-
-
|
|
243
|
+
- Ruby
|
|
243
244
|
metadata: {}
|
|
244
|
-
post_install_message:
|
|
245
|
+
post_install_message:
|
|
245
246
|
rdoc_options:
|
|
246
247
|
- "--title"
|
|
247
248
|
- RGL - Ruby Graph Library
|
|
@@ -262,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
262
263
|
version: '0'
|
|
263
264
|
requirements: []
|
|
264
265
|
rubygems_version: 3.4.1
|
|
265
|
-
signing_key:
|
|
266
|
+
signing_key:
|
|
266
267
|
specification_version: 4
|
|
267
268
|
summary: Ruby Graph Library
|
|
268
269
|
test_files: []
|
data/examples/graph.dot
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
digraph RGL__DirectedAdjacencyGraph {
|
|
2
|
-
1 [
|
|
3
|
-
fontsize = 8,
|
|
4
|
-
label = 1
|
|
5
|
-
]
|
|
6
|
-
|
|
7
|
-
2 [
|
|
8
|
-
fontsize = 8,
|
|
9
|
-
label = 2
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
3 [
|
|
13
|
-
fontsize = 8,
|
|
14
|
-
label = 3
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
4 [
|
|
18
|
-
fontsize = 8,
|
|
19
|
-
label = 4
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
5 [
|
|
23
|
-
fontsize = 8,
|
|
24
|
-
label = 5
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
6 [
|
|
28
|
-
fontsize = 8,
|
|
29
|
-
label = 6
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
1 -> 2 [
|
|
33
|
-
fontsize = 8
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
1 -> 6 [
|
|
37
|
-
fontsize = 8
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
2 -> 3 [
|
|
41
|
-
fontsize = 8
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
2 -> 4 [
|
|
45
|
-
fontsize = 8
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
4 -> 5 [
|
|
49
|
-
fontsize = 8
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
6 -> 4 [
|
|
53
|
-
fontsize = 8
|
|
54
|
-
]
|
|
55
|
-
}
|