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