rgl 0.6.6 → 0.6.7
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.md +41 -591
- data/Gemfile +6 -1
- data/README.md +3 -6
- data/Rakefile +1 -1
- data/lib/rgl/adjacency.rb +3 -1
- data/lib/rgl/base.rb +3 -1
- data/lib/rgl/bellman_ford.rb +3 -1
- data/lib/rgl/bidirectional.rb +2 -1
- data/lib/rgl/bidirectional_adjacency.rb +2 -0
- data/lib/rgl/bipartite.rb +2 -0
- data/lib/rgl/condensation.rb +2 -0
- data/lib/rgl/connected_components.rb +2 -0
- data/lib/rgl/dijkstra.rb +2 -0
- data/lib/rgl/dijkstra_visitor.rb +2 -0
- data/lib/rgl/dot.rb +3 -1
- data/lib/rgl/edge_properties_map.rb +2 -0
- data/lib/rgl/edmonds_karp.rb +2 -0
- data/lib/rgl/graph_iterator.rb +2 -0
- data/lib/rgl/graph_visitor.rb +2 -0
- data/lib/rgl/graph_wrapper.rb +2 -0
- data/lib/rgl/graphxml.rb +2 -0
- data/lib/rgl/implicit.rb +2 -0
- data/lib/rgl/mutable.rb +2 -0
- data/lib/rgl/path_builder.rb +3 -1
- data/lib/rgl/prim.rb +2 -0
- data/lib/rgl/rdot.rb +5 -0
- data/lib/rgl/topsort.rb +8 -6
- data/lib/rgl/transitiv_closure.rb +2 -0
- data/lib/rgl/transitivity.rb +2 -0
- data/lib/rgl/traversal.rb +2 -0
- data/lib/rgl/version.rb +3 -1
- metadata +14 -58
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab68217bce9e81fd6fb24e82afec5fd8c17da969b41f4a0de1e726154a48273d
|
|
4
|
+
data.tar.gz: 4023182c69bb8ba4047cdc648f214731e7a40214c0708efdb6b19a857b1848d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57b13a123811a27b3cf34ef6a1a4d08878598fe016edc05904f1e206b799163218b6fd420260e786ce62f3f8cba99d026386f1da98a1cb719085be46faec1e13
|
|
7
|
+
data.tar.gz: 02ddf214c5628170e39408a71462ef407e01f4a7bc9df7d77e67f2403038b4b169a5c63d03f176f293386dff81232171d7e4d5c639fc28f93ac12b8c2833e284
|
data/CHANGELOG.md
CHANGED
|
@@ -1,626 +1,76 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.6.
|
|
3
|
+
## [0.6.7](https://github.com/monora/rgl/compare/v0.6.6...v0.6.7) (2026-05-10)
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
### Bug Fixes
|
|
7
7
|
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
### [0.6.5](https://www.github.com/monora/rgl/compare/v0.6.4...v0.6.5) (2023-06-19)
|
|
8
|
+
* command injection in write_to_graphic_file ([#154](https://github.com/monora/rgl/issues/154)) ([3ebdd43](https://github.com/monora/rgl/commit/3ebdd434ba9c6fd1ab72925fcaee8052a1086c30))
|
|
11
9
|
|
|
10
|
+
## [0.6.7](https://github.com/monora/rgl/compare/v0.6.6...v0.6.7) (2026-05-10)
|
|
12
11
|
|
|
13
12
|
### Bug Fixes
|
|
14
13
|
|
|
15
|
-
*
|
|
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
|
|
34
|
-
|
|
35
|
-
Dan Čermák
|
|
36
|
-
* Drop lazy priority queue (#64) (3b1db1)
|
|
37
|
-
|
|
38
|
-
### 2022-06 Release 0.5.8
|
|
39
|
-
|
|
40
|
-
Horst Duchene
|
|
41
|
-
* switch to github actions (56030d)
|
|
42
|
-
|
|
43
|
-
### 2020-12 Release 0.5.7
|
|
44
|
-
|
|
45
|
-
Horst Duchene
|
|
46
|
-
* Fully automate dev setup with Gitpod (41dd00)
|
|
47
|
-
* Add Dockerfile to install graphviz (2bd738)
|
|
48
|
-
* Examples do not call dotty (6bba96)
|
|
49
|
-
* Add ruby license file (a21aa5)
|
|
50
|
-
ujihisa <ujihisa@users.noreply.github.com>
|
|
51
|
-
* Test against Ruby 2.6 and 2.7 as well (50ac7c)
|
|
52
|
-
* Fix dead links (9184f3)
|
|
53
|
-
Harry Lascelles <hlascelles@users.noreply.github.com>
|
|
54
|
-
* Update .travis.yml (45b9a2)
|
|
55
|
-
* Make the links more explicit (95dc3b)
|
|
56
|
-
Harry Lascelles
|
|
57
|
-
* Add explicit license to gemspec (de3647)
|
|
58
|
-
|
|
59
|
-
### 2019-01 Release 0.5.6
|
|
60
|
-
|
|
61
|
-
Artemy Kirienko
|
|
62
|
-
* PR #42 Add method Graph#path?(u, v) to check if a path exists between two vertices
|
|
63
|
-
Horst Duchene
|
|
64
|
-
* Fix #47 set_to_begin for graph iterator (881aa8)
|
|
65
|
-
|
|
66
|
-
### 2019-01 Release 0.5.4
|
|
67
|
-
|
|
68
|
-
Lia Skalkos
|
|
69
|
-
* Enable options to be passed to #write_to_graphic_file (4ca972). For details see PR #41
|
|
70
|
-
Horst Duchene
|
|
71
|
-
* Fix travis-ci errors
|
|
72
|
-
* Add new ruby versions
|
|
73
|
-
* Fix gemspec errors
|
|
74
|
-
* Fix lint warnings
|
|
75
|
-
* Use version stream 0.5.2
|
|
76
|
-
|
|
77
|
-
### 2017-04 Release 0.5.3
|
|
78
|
-
|
|
79
|
-
Horst Duchene
|
|
80
|
-
* Issue #38: Add error handling or dot functions. (719e38, 5a3423)
|
|
81
|
-
Thomas Orozco
|
|
82
|
-
* Remove Enumerable Extension (fde8a5)
|
|
83
|
-
* Update to codeclimate-test-reporter 1.x (25fdb5)
|
|
84
|
-
Mario Daskalov
|
|
85
|
-
* Clarify that you need graphviz in the README (35a4b4)
|
|
86
|
-
|
|
87
|
-
### 2016-05 Release 0.5.2
|
|
88
|
-
|
|
89
|
-
Horst Duchene
|
|
90
|
-
* Issue #21: Use new method vertex_id instead of object_id to identify vertices in dot export. (fa7592)
|
|
91
|
-
* Integrate Code Climate's test coverage reporting (0ab722)
|
|
92
|
-
* Clarify traversal order of DFS search (see #20). (afa788)
|
|
93
|
-
Chase Gilliam
|
|
94
|
-
* drop 1.9.3 add newer jruby and rubinius (fad333)
|
|
95
|
-
Matías Battocchia
|
|
96
|
-
* Switched to a different heap implementation. (bd7c13)
|
|
97
|
-
gorn
|
|
98
|
-
* Adding failing test for issue #24 (1f6204)
|
|
99
|
-
|
|
100
|
-
### 2015-12 Release 0.5.1
|
|
101
|
-
|
|
102
|
-
Horst Duchene
|
|
103
|
-
* Changed edge sequence to match example picture (daa88e)
|
|
104
|
-
|
|
105
|
-
Chase
|
|
106
|
-
* updated algorithms to 6.1 and added test unit to support newer rubies (fbd874)
|
|
107
|
-
|
|
108
|
-
Louis Rose
|
|
109
|
-
* Fix #15. Use object IDs rather than labels to identify vertexs in DOT graph
|
|
110
|
-
to ensure that distinct nodes that share a label are shown. (33206f, 4fc455)
|
|
111
|
-
|
|
112
|
-
### 2014-12 Release 0.5.0
|
|
113
|
-
|
|
114
|
-
Horst Duchene
|
|
115
|
-
* Changed edge sequence to match example picture (daa88e)
|
|
116
|
-
* Fixed comment (6a6c93)
|
|
117
|
-
* Fixed spelling (7ca281)
|
|
118
|
-
Horst Duchêne
|
|
119
|
-
Chase
|
|
120
|
-
* updated algorithms to 6.1 and added test unit to support newer rubies (fbd874)
|
|
121
|
-
Louis Rose
|
|
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)
|
|
123
|
-
* Issue #15. Fix tests. (4fc455)
|
|
124
|
-
|
|
125
|
-
### 2014-12 Release 0.5.0
|
|
126
|
-
|
|
127
|
-
Horst Duchene
|
|
128
|
-
* Changed edge sequence to match example picture (daa88e)
|
|
129
|
-
* Fixed comment (6a6c93)
|
|
130
|
-
* Fixed spelling (7ca281)
|
|
131
|
-
Chase
|
|
132
|
-
* updated algorithms to 6.1 and added test unit to support newer rubies (fbd874)
|
|
133
|
-
Louis Rose
|
|
134
|
-
* Fix #15. Use object IDs rather than labels to identify vertexs
|
|
135
|
-
in DOT graph to ensure that distinct nodes that share a label are
|
|
136
|
-
shown. (33206f)
|
|
137
|
-
* Issue #15. Fix tests. (4fc455)
|
|
138
|
-
|
|
139
|
-
### 2014-12 Release 0.5.0
|
|
140
|
-
|
|
141
|
-
This release mainly contains the contributions of Kirill, who added many algorithms to the library. Thank you Kirill!
|
|
142
|
-
|
|
143
|
-
* @matiaskorhonen: Fixes the image paths in the README (#14)
|
|
144
|
-
* @monora: Implicit graph example fails (#13)
|
|
145
|
-
* @KL-7: Implement Graph#bipartite_sets. (#12)
|
|
146
|
-
* @monora: syntax error in dot file for undirected graph (#11)
|
|
147
|
-
* @KL-7: Edmonds-Karp algorithm for maximum flow (#10)
|
|
148
|
-
* @KL-7: Prim's algorithm for minimum spanning tree (#9)
|
|
149
|
-
* @carlosantoniodasilva: Run tests on Ruby 2.0 and remove deprecation warning (#8)
|
|
150
|
-
* @KL-7: Bellman-Ford shortest paths algorithm (#7)
|
|
151
|
-
* @KL-7: Minor improvements (asserts) for Dijkstra algorithm (#6)
|
|
152
|
-
* @KL-7: Add Dijkstra shortest path algorithm. (#5)
|
|
153
|
-
* @KL-7: Indentation and whitespaces clean up of examples (#4)
|
|
154
|
-
* @KL-7: Travis configuration and README updates (#3)
|
|
155
|
-
* @KL-7: Code clean up and configuration updates (#2)
|
|
156
|
-
* @aschoerk: Renamed test-directory, (includes Rakefile), fixed TestComponents (#1)
|
|
157
|
-
|
|
158
|
-
### 2008-08-27 23:30 javanthropus
|
|
159
|
-
|
|
160
|
-
* lib/rgl/base.rb: Preparing for 0.4.0 release
|
|
161
|
-
|
|
162
|
-
### 2008-08-26 20:07 javanthropus
|
|
163
|
-
|
|
164
|
-
* lib/rgl/dot.rb, lib/rgl/rdot.rb, tests/TestRdot.rb: Move the DOT
|
|
165
|
-
module into the RGL module
|
|
166
|
-
|
|
167
|
-
* This eliminates a class conflict with the DOT module from rdoc
|
|
168
|
-
when building RGL's documentation * Also remove the superfluous
|
|
169
|
-
DOT prefixes from class names in the DOT module
|
|
170
|
-
|
|
171
|
-
### 2008-08-24 06:16 javanthropus
|
|
172
|
-
|
|
173
|
-
* Rakefile: Remove some comments I accidentally left in while
|
|
174
|
-
testing rdoc functionality
|
|
175
|
-
|
|
176
|
-
### 2008-08-24 06:03 javanthropus
|
|
177
|
-
|
|
178
|
-
* Rakefile, lib/rgl/transitiv_closure.rb, lib/rgl/transitivity.rb,
|
|
179
|
-
tests/TestTransitiveClosure.rb, tests/TestTransitivity.rb:
|
|
180
|
-
Feature 21641: Added transitive reduction functionality
|
|
181
|
-
|
|
182
|
-
* Updated the gem description to announce this functionality *
|
|
183
|
-
Moved the transitive closure functionality into the
|
|
184
|
-
transitivity.rb file along with the transitive reduction
|
|
185
|
-
funtionality * Modifed the transitiv_closure.rb file to simply
|
|
186
|
-
load the transitivity.rb file for backward compatibility * Moved
|
|
187
|
-
all transitivity tests into TestTransitivity.rb
|
|
188
|
-
|
|
189
|
-
### 2008-08-23 15:45 javanthropus
|
|
190
|
-
|
|
191
|
-
* lib/rgl/condensation.rb, lib/rgl/transitiv_closure.rb,
|
|
192
|
-
tests/TestTransitiveClosure.rb: Defect 21630: Fixed transitive
|
|
193
|
-
closure
|
|
194
|
-
|
|
195
|
-
* The fix is based on the algorithm described in the
|
|
196
|
-
documentation for the implementation of transitive closure in
|
|
197
|
-
Boost * Along with the fix, performance is improved to O(|V||E|)
|
|
198
|
-
* This implementation needs graph condensation, so that function
|
|
199
|
-
was added as well * More tests were added to cover more corner
|
|
200
|
-
cases
|
|
201
|
-
|
|
202
|
-
### 2008-08-23 05:40 javanthropus
|
|
203
|
-
|
|
204
|
-
* tests/TestGraph.rb: Update basic graph tests to account for
|
|
205
|
-
graphs with edgeless vertices Also clean up some minor formatting
|
|
206
|
-
and assertion issues
|
|
207
|
-
|
|
208
|
-
### 2008-08-23 05:37 javanthropus
|
|
209
|
-
|
|
210
|
-
* lib/rgl/adjacency.rb: Defect 21609: Fix the to_adjacency method
|
|
211
|
-
to preserve edgeless vertices
|
|
212
|
-
|
|
213
|
-
### 2008-03-18 15:03 javanthropus
|
|
214
|
-
|
|
215
|
-
* lib/rgl/rdot.rb, tests/TestRdot.rb: More reliably detect and
|
|
216
|
-
handle newlines embedded within IDs and labels
|
|
217
|
-
|
|
218
|
-
### 2008-03-08 10:48 monora
|
|
219
|
-
|
|
220
|
-
* ChangeLog, lib/rgl/base.rb (utags: REL_0_3_1): Prepare 0.3.1
|
|
221
|
-
release
|
|
222
|
-
|
|
223
|
-
### 2008-03-04 20:18 monora
|
|
224
|
-
|
|
225
|
-
* Rakefile (tags: REL_0_3_1, REL_0_3_0): pre-tag commit
|
|
226
|
-
|
|
227
|
-
### 2008-03-02 18:16 javanthropus
|
|
228
|
-
|
|
229
|
-
* lib/rgl/rdot.rb (tags: REL_0_3_0): IDs and labels must be
|
|
230
|
-
converted to strings before processing
|
|
231
|
-
|
|
232
|
-
### 2008-03-02 17:45 javanthropus
|
|
233
|
-
|
|
234
|
-
* lib/rgl/rdot.rb, tests/TestRdot.rb: Added documentation for
|
|
235
|
-
rdot.rb and full test coverage
|
|
236
|
-
|
|
237
|
-
### 2008-03-02 15:19 monora
|
|
238
|
-
|
|
239
|
-
* README: Removed dead link to rubygarden.com
|
|
240
|
-
|
|
241
|
-
### 2008-03-02 15:09 monora
|
|
242
|
-
|
|
243
|
-
* ChangeLog, README, Rakefile (utags: REL_0_3_0): Polishing before
|
|
244
|
-
0.3.0 release
|
|
245
|
-
|
|
246
|
-
### 2008-03-02 13:45 monora
|
|
247
|
-
|
|
248
|
-
* lib/rgl/: adjacency.rb, rdot.rb (utags: REL_0_3_0): Fixed
|
|
249
|
-
warnings generated by Ruby Dev Tools
|
|
250
|
-
|
|
251
|
-
### 2008-03-02 07:57 javanthropus
|
|
252
|
-
|
|
253
|
-
* Rakefile, lib/rgl/graphxml.rb (tags: REL_0_3_0),
|
|
254
|
-
tests/TestGraphXML.rb (tags: REL_0_3_0): Change the way GraphML
|
|
255
|
-
support is added to the MutableGraph module such that the
|
|
256
|
-
interface is cleaner and documented
|
|
257
|
-
|
|
258
|
-
### 2008-03-01 20:12 javanthropus
|
|
259
|
-
|
|
260
|
-
* lib/rgl/base.rb, tests/TestGraph.rb: Polish the documentation for
|
|
261
|
-
and expand the test coverage of RGL::Graph
|
|
262
|
-
|
|
263
|
-
### 2008-02-27 19:44 monora
|
|
264
|
-
|
|
265
|
-
* README: Added link to coverage page
|
|
266
|
-
|
|
267
|
-
### 2008-02-26 06:01 javanthropus
|
|
268
|
-
|
|
269
|
-
* lib/rgl/dot.rb, lib/rgl/rdot.rb, tests/TestDot.rb,
|
|
270
|
-
tests/TestRdot.rb: All IDs for DOT objects, including names,
|
|
271
|
-
options, and values, are now automatically quoted as necessary
|
|
272
|
-
according to the rules documented at
|
|
273
|
-
https://www.graphviz.org/doc/info/lang.html and
|
|
274
|
-
https://www.graphviz.org/Documentation/dotguide.pdf.
|
|
275
|
-
|
|
276
|
-
Labels are handled specially in order to account for \l, \r, and
|
|
277
|
-
\n sequences but are otherwise treated the same as other options.
|
|
278
|
-
|
|
279
|
-
New tests were added to confirm proper function.
|
|
280
|
-
|
|
281
|
-
Some changes were made in order to remove explicit quotes from
|
|
282
|
-
labels which are no longer necessary.
|
|
283
|
-
|
|
284
|
-
### 2008-02-17 20:15 monora
|
|
285
|
-
|
|
286
|
-
* lib/rgl/enumerable_ext.rb: Removed backwards compatability method
|
|
287
|
-
inject. Ruby > 1.8 supports it out of the box.
|
|
288
|
-
|
|
289
|
-
### 2008-02-17 20:07 monora
|
|
290
|
-
|
|
291
|
-
* tests/: TestEdge.rb, TestDirectedGraph.rb, TestGraph.rb: Improved
|
|
292
|
-
test coverage
|
|
293
|
-
|
|
294
|
-
### 2008-02-17 20:06 monora
|
|
295
|
-
|
|
296
|
-
* lib/rgl/adjacency.rb: fixed bug in edgelist_class
|
|
297
|
-
|
|
298
|
-
### 2008-02-17 17:59 monora
|
|
299
|
-
|
|
300
|
-
* Rakefile: - added coverage task - fixed BUG #2674 - added
|
|
301
|
-
changelog task - use jamis buck rdoc template
|
|
302
|
-
|
|
303
|
-
### 2008-02-17 17:45 monora
|
|
304
|
-
|
|
305
|
-
* lib/rgl/base.rb: Changed Version to 0.3.0
|
|
306
|
-
|
|
307
|
-
### 2008-02-17 09:09 javanthropus
|
|
308
|
-
|
|
309
|
-
* lib/rgl/rdot.rb: DOTSimpleElement provides no useful function, so
|
|
310
|
-
remove it
|
|
311
|
-
|
|
312
|
-
### 2008-02-17 09:08 javanthropus
|
|
313
|
-
|
|
314
|
-
* tests/TestRdot.rb: Test that setting only the name for a DOTNode
|
|
315
|
-
does NOT set the label
|
|
316
|
-
|
|
317
|
-
### 2008-02-17 08:58 javanthropus
|
|
318
|
-
|
|
319
|
-
* lib/rgl/rdot.rb, tests/TestRdot.rb: Add support for the Mrecord
|
|
320
|
-
shape to DOTNode. Rewrite DOTNode#to_s to be easier to
|
|
321
|
-
understand. #Rewrite DOTPort to allow for nesting ports.
|
|
322
|
-
|
|
323
|
-
### 2008-02-17 03:20 javanthropus
|
|
324
|
-
|
|
325
|
-
* lib/rgl/rdot.rb, tests/TestRdot.rb: BUG 17964: DOTElement no
|
|
326
|
-
longer sets the label unless the user explicitly sets one
|
|
327
|
-
|
|
328
|
-
### 2008-02-17 02:56 javanthropus
|
|
329
|
-
|
|
330
|
-
* tests/TestRdot.rb: Fix a DOTEdge test which was actually
|
|
331
|
-
retesting DOTNode
|
|
332
|
-
|
|
333
|
-
### 2008-02-16 19:58 javanthropus
|
|
334
|
-
|
|
335
|
-
* lib/rgl/rdot.rb, tests/TestRdot.rb: BUG #17962: Subgraphs must be
|
|
336
|
-
identified by a "subgraph" header rather than a "graph" header
|
|
337
|
-
|
|
338
|
-
### 2008-02-13 22:32 monora
|
|
339
|
-
|
|
340
|
-
* tests/TestRdot.rb: Fixed typo
|
|
341
|
-
|
|
342
|
-
### 2008-02-13 22:20 monora
|
|
343
|
-
|
|
344
|
-
* doc/jamis.rb: Added template from Jamis Buck for rdoc. Looks
|
|
345
|
-
better.
|
|
346
|
-
|
|
347
|
-
### 2008-02-12 23:37 monora
|
|
348
|
-
|
|
349
|
-
* lib/rgl/rdot.rb: BUG #17969: Applied patch from Jeremy Bopp.
|
|
350
|
-
Thanks.
|
|
14
|
+
* Fix command injection vulnerability in `write_to_graphic_file` ([#154](https://github.com/monora/rgl/issues/154))
|
|
351
15
|
|
|
352
|
-
###
|
|
16
|
+
### Improvements
|
|
353
17
|
|
|
354
|
-
|
|
18
|
+
* Allow `class` attribute in SVG output via Graphviz ([#142](https://github.com/monora/rgl/issues/142))
|
|
19
|
+
* Ruby code modernization: frozen string literals, keyword arguments ([#160](https://github.com/monora/rgl/issues/160))
|
|
355
20
|
|
|
356
|
-
###
|
|
21
|
+
### Maintenance
|
|
357
22
|
|
|
358
|
-
|
|
359
|
-
|
|
23
|
+
* Modernize gemspec ([#158](https://github.com/monora/rgl/issues/158))
|
|
24
|
+
* Update CI matrix, remove stale dev environment files ([#157](https://github.com/monora/rgl/issues/157))
|
|
25
|
+
* Repository cleanup ([#156](https://github.com/monora/rgl/issues/156))
|
|
26
|
+
* Fix outdated links, typos, and missing community files ([#159](https://github.com/monora/rgl/issues/159))
|
|
360
27
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
* tests/: TestDot.rb, TestRdot.rb: reproduced [#16125] DOT::DOTNode
|
|
364
|
-
produces wrong DOT syntax
|
|
365
|
-
|
|
366
|
-
### 2007-06-20 22:43 monora
|
|
367
|
-
|
|
368
|
-
* lib/rgl/base.rb, rakelib/dep_graph.rake: Fixed typo
|
|
369
|
-
|
|
370
|
-
### 2006-04-19 21:32 monora
|
|
371
|
-
|
|
372
|
-
* rakelib/dep_graph.rake: - Use write_to_graphic_file instead of
|
|
373
|
-
dotty (dotty crashes) - omit added task from vertices
|
|
374
|
-
|
|
375
|
-
### 2006-04-12 23:45 monora
|
|
376
|
-
|
|
377
|
-
* rakelib/dep_graph.rake: Initial checkin
|
|
378
|
-
|
|
379
|
-
### 2006-04-12 23:40 monora
|
|
380
|
-
|
|
381
|
-
* lib/rgl/bidirectional.rb: Moved to module RGL
|
|
382
|
-
|
|
383
|
-
### 2006-04-12 23:36 monora
|
|
384
|
-
|
|
385
|
-
* lib/rgl/base.rb: Moved BidirectionalGraph to own file.
|
|
386
|
-
|
|
387
|
-
### 2006-04-12 23:31 monora
|
|
388
|
-
|
|
389
|
-
* lib/rgl/: base.rb, edge.rb, graph.rb: - Merged changes from Shawn
|
|
390
|
-
- dont want to split base.rb
|
|
391
|
-
|
|
392
|
-
### 2006-04-12 23:27 monora
|
|
393
|
-
|
|
394
|
-
* tests/: TestCycles.rb, TestGraph.rb, test_helper.rb,
|
|
395
|
-
TestComponents.rb, TestTransitiveClosure.rb, TestTraversal.rb: -
|
|
396
|
-
Merged changes from Shawn - added test_helper
|
|
397
|
-
|
|
398
|
-
### 2006-04-12 23:23 monora
|
|
399
|
-
|
|
400
|
-
* lib/rgl/adjacency.rb: - Merged changes from Shawn - implemented
|
|
401
|
-
clone support (initialize_copy)
|
|
402
|
-
|
|
403
|
-
### 2006-04-12 23:20 monora
|
|
404
|
-
|
|
405
|
-
* lib/rgl/mutable.rb: Use clone instead of self.class.new(self)
|
|
406
|
-
|
|
407
|
-
### 2006-04-12 23:19 monora
|
|
408
|
-
|
|
409
|
-
* lib/rgl/enumerable_ext.rb: Do not extend system class Array. Only
|
|
410
|
-
used for testing.
|
|
411
|
-
|
|
412
|
-
### 2006-03-28 19:10 monora
|
|
413
|
-
|
|
414
|
-
* lib/rgl/dot.rb: Added links to graphviz.
|
|
415
|
-
|
|
416
|
-
### 2006-03-20 02:06 spgarbet
|
|
417
|
-
|
|
418
|
-
* lib/rgl/adjacency.rb, lib/rgl/base.rb, lib/rgl/bidirectional.rb,
|
|
419
|
-
lib/rgl/edge.rb, lib/rgl/enumerable_ext.rb, lib/rgl/graph.rb,
|
|
420
|
-
lib/rgl/mutable.rb, tests/TestComponents.rb, tests/TestCycles.rb,
|
|
421
|
-
tests/TestGraph.rb, tests/TestTransitiveClosure.rb,
|
|
422
|
-
tests/TestTraversal.rb: Added equality test for graphs, added
|
|
423
|
-
cycle locating. Modified initialize to allow duplicating and
|
|
424
|
-
merging of graphs. Split base into various subfiles. Added test
|
|
425
|
-
cases for changes. Fixed problem with GraphXML.
|
|
426
|
-
|
|
427
|
-
### 2006-03-09 23:25 monora
|
|
428
|
-
|
|
429
|
-
* lib/rgl/base.rb: Fixed typo Bug #2875
|
|
430
|
-
|
|
431
|
-
### 2006-03-03 22:28 monora
|
|
432
|
-
|
|
433
|
-
* .cvsignore, .project: We now use Eclipse-RDT
|
|
434
|
-
|
|
435
|
-
### 2005-09-18 14:08 monora
|
|
436
|
-
|
|
437
|
-
* tests/TestComponents.rb (tags: PRE_CHECKIN_JC): Fixed required
|
|
438
|
-
files.
|
|
439
|
-
|
|
440
|
-
### 2005-09-17 18:27 monora
|
|
441
|
-
|
|
442
|
-
* lib/rgl/base.rb (tags: PRE_CHECKIN_JC): Documentation corrected.
|
|
443
|
-
|
|
444
|
-
### 2005-09-17 18:25 monora
|
|
445
|
-
|
|
446
|
-
* README (tags: PRE_CHECKIN_JC): Added link to delicious.
|
|
447
|
-
|
|
448
|
-
### 2005-04-12 20:59 monora
|
|
449
|
-
|
|
450
|
-
* Rakefile (tags: PRE_CHECKIN_JC): corrected homepage link in
|
|
451
|
-
gemspec
|
|
452
|
-
|
|
453
|
-
### 2005-04-12 20:50 monora
|
|
454
|
-
|
|
455
|
-
* Makefile: rake is better than make
|
|
456
|
-
|
|
457
|
-
### 2005-04-12 20:35 monora
|
|
458
|
-
|
|
459
|
-
* README (tags: REL_0_2_3): updated copyright notice
|
|
460
|
-
|
|
461
|
-
### 2005-04-12 20:32 monora
|
|
462
|
-
|
|
463
|
-
* examples/examples.rb (tags: PRE_CHECKIN_JC, REL_0_2_3): Added
|
|
464
|
-
doc.
|
|
465
|
-
|
|
466
|
-
### 2005-04-12 18:23 monora
|
|
467
|
-
|
|
468
|
-
* README: Fixed some outdated links.
|
|
469
|
-
|
|
470
|
-
### 2005-04-05 19:54 monora
|
|
471
|
-
|
|
472
|
-
* ChangeLog (tags: PRE_CHECKIN_JC, REL_0_2_3): New entries
|
|
473
|
-
generated
|
|
474
|
-
|
|
475
|
-
### 2005-03-30 21:27 monora
|
|
476
|
-
|
|
477
|
-
* tests/TestDirectedGraph.rb (tags: PRE_CHECKIN_JC, REL_0_2_3):
|
|
478
|
-
Added test for isolated vertices in DirectedGraph#reverse.
|
|
479
|
-
|
|
480
|
-
### 2005-03-30 21:25 monora
|
|
481
|
-
|
|
482
|
-
* lib/rgl/adjacency.rb (tags: PRE_CHECKIN_JC, REL_0_2_3): Fixed bug
|
|
483
|
-
in DirectedGraph#reverse reported by Kaspar Schiess. Isolated
|
|
484
|
-
vertices were not treated correctly.
|
|
485
|
-
|
|
486
|
-
### 2005-03-26 15:06 wsdng
|
|
487
|
-
|
|
488
|
-
* lib/rgl/rdot.rb (tags: PRE_CHECKIN_JC, REL_0_2_3): added node and
|
|
489
|
-
edge attributes
|
|
490
|
-
|
|
491
|
-
### 2005-03-22 22:31 monora
|
|
492
|
-
|
|
493
|
-
* Rakefile (tags: REL_0_2_3): Fixed autorequire to work with gem
|
|
494
|
-
version 0.8.8
|
|
495
|
-
|
|
496
|
-
### 2005-02-04 22:41 monora
|
|
497
|
-
|
|
498
|
-
* README, lib/rgl/adjacency.rb, lib/rgl/base.rb (tags: REL_0_2_3),
|
|
499
|
-
lib/rgl/connected_components.rb (tags: PRE_CHECKIN_JC,
|
|
500
|
-
REL_0_2_3), lib/rgl/dot.rb (tags: PRE_CHECKIN_JC, REL_0_2_3),
|
|
501
|
-
lib/rgl/graphxml.rb (tags: PRE_CHECKIN_JC, REL_0_2_3),
|
|
502
|
-
lib/rgl/implicit.rb (tags: PRE_CHECKIN_JC, REL_0_2_3),
|
|
503
|
-
lib/rgl/mutable.rb (tags: PRE_CHECKIN_JC, REL_0_2_3),
|
|
504
|
-
lib/rgl/rdot.rb, lib/rgl/topsort.rb (tags: PRE_CHECKIN_JC,
|
|
505
|
-
REL_0_2_3), lib/rgl/transitiv_closure.rb (tags: PRE_CHECKIN_JC,
|
|
506
|
-
REL_0_2_3), lib/rgl/traversal.rb (tags: PRE_CHECKIN_JC,
|
|
507
|
-
REL_0_2_3): Fixed some formatting issues and smoothed
|
|
508
|
-
documentation. Thanks to Rich Morin.
|
|
509
|
-
|
|
510
|
-
### 2004-12-13 23:33 monora
|
|
511
|
-
|
|
512
|
-
* Makefile, README, Rakefile, lib/rgl/base.rb, lib/rgl/graphxml.rb,
|
|
513
|
-
lib/rgl/implicit.rb, lib/rgl/traversal.rb: Polished documentation
|
|
514
|
-
|
|
515
|
-
### 2004-12-13 21:07 monora
|
|
516
|
-
|
|
517
|
-
* lib/rgl/adjacency.rb, tests/TestDirectedGraph.rb,
|
|
518
|
-
tests/TestUnDirectedGraph.rb (tags: PRE_CHECKIN_JC, REL_0_2_3):
|
|
519
|
-
Fixed bug in Graph#reverse reported by Sascha Ebach.
|
|
520
|
-
|
|
521
|
-
### 2004-12-12 19:09 cyent
|
|
522
|
-
|
|
523
|
-
* tests/TestGraphXML.rb: Fixed bug in relative path
|
|
524
|
-
|
|
525
|
-
### 2004-12-12 19:08 cyent
|
|
526
|
-
|
|
527
|
-
* tests/TestDirectedGraph.rb: Added test_random
|
|
528
|
-
|
|
529
|
-
### 2004-12-12 19:07 cyent
|
|
530
|
-
|
|
531
|
-
* lib/rgl/: adjacency.rb, base.rb, connected_components.rb,
|
|
532
|
-
rdot.rb: Fixed comments, removed warnings in ruby1.9 -w by adding
|
|
533
|
-
attr_readers, told emacs to use tab-width 4 on these files
|
|
534
|
-
|
|
535
|
-
### 2004-12-11 23:46 monora
|
|
536
|
-
|
|
537
|
-
* README (tags: REL_0_2_2), Rakefile (tags: REL_0_2_2),
|
|
538
|
-
examples/examples.rb (tags: REL_0_2_2), lib/stream.rb,
|
|
539
|
-
lib/rgl/base.rb (tags: REL_0_2_2), lib/rgl/graphxml.rb (tags:
|
|
540
|
-
REL_0_2_2), lib/rgl/traversal.rb (tags: REL_0_2_2),
|
|
541
|
-
tests/TestGraphXML.rb (tags: PRE_CHECKIN_JC, REL_0_2_3,
|
|
542
|
-
REL_0_2_2), tests/_TestGraphXML.rb: Added gem packaging.
|
|
543
|
-
|
|
544
|
-
### 2004-10-08 15:15 monora
|
|
545
|
-
|
|
546
|
-
* tests/runtests.rb: In new testframework not needed.
|
|
547
|
-
|
|
548
|
-
### 2004-10-08 15:14 monora
|
|
549
|
-
|
|
550
|
-
* lib/utils.rb: Code move to base.rb
|
|
551
|
-
|
|
552
|
-
### 2004-10-06 22:11 monora
|
|
553
|
-
|
|
554
|
-
* lib/rgl/base.rb: Code from utils.rb included
|
|
555
|
-
|
|
556
|
-
### 2004-10-06 22:09 monora
|
|
557
|
-
|
|
558
|
-
* Rakefile: First start for gem preparation
|
|
559
|
-
|
|
560
|
-
### 2003-07-30 21:50 monora
|
|
561
|
-
|
|
562
|
-
* lib/utils.rb, lib/rgl/implicit.rb (tags: REL_0_2_2),
|
|
563
|
-
tests/TestComponents.rb (tags: REL_0_2_3, REL_0_2_2),
|
|
564
|
-
tests/TestDirectedGraph.rb (tags: REL_0_2_2),
|
|
565
|
-
tests/TestImplicit.rb (tags: PRE_CHECKIN_JC, REL_0_2_3,
|
|
566
|
-
REL_0_2_2), tests/TestTransitiveClosure.rb (tags: PRE_CHECKIN_JC,
|
|
567
|
-
REL_0_2_3, REL_0_2_2), tests/TestTraversal.rb (tags:
|
|
568
|
-
PRE_CHECKIN_JC, REL_0_2_3, REL_0_2_2),
|
|
569
|
-
tests/TestUnDirectedGraph.rb (tags: REL_0_2_2),
|
|
570
|
-
tests/_TestGraphXML.rb, tests/runtests.rb (utags: rforge-import):
|
|
571
|
-
- port to ruby 1.8 - compiler warnings removed - set_up -> setup
|
|
572
|
-
in testfiles
|
|
28
|
+
## [0.6.6](https://github.com/monora/rgl/compare/v0.6.5...v0.6.6) (2023-07-10)
|
|
573
29
|
|
|
574
|
-
###
|
|
30
|
+
### Bug Fixes
|
|
575
31
|
|
|
576
|
-
|
|
577
|
-
|
|
32
|
+
* Update pairing_heap requirement from ~> 0.3 to >= 0.3, < 4.0 ([#119](https://github.com/monora/rgl/issues/119), [#122](https://github.com/monora/rgl/issues/122)) ([13e39a4](https://github.com/monora/rgl/commit/13e39a47dd166a36dadbf8e3b5fb3b2ff3941467))
|
|
33
|
+
* 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))
|
|
578
34
|
|
|
579
|
-
|
|
35
|
+
## [0.6.5](https://github.com/monora/rgl/compare/v0.6.4...v0.6.5) (2023-06-19)
|
|
580
36
|
|
|
581
|
-
|
|
582
|
-
rforge-import), set.rb: Use knus compatibility library for Ruby
|
|
583
|
-
1.8 esp. for set.rb and inject.
|
|
37
|
+
### Bug Fixes
|
|
584
38
|
|
|
585
|
-
|
|
39
|
+
* README links ([#114](https://github.com/monora/rgl/issues/114)) ([682e4e6](https://github.com/monora/rgl/commit/682e4e6f3786dc5419ce8d8bff92d4006e95be0d))
|
|
586
40
|
|
|
587
|
-
|
|
41
|
+
## [0.6.4](https://github.com/monora/rgl/compare/v0.6.3...v0.6.4) (2023-06-19)
|
|
588
42
|
|
|
589
|
-
###
|
|
43
|
+
### Bug Fixes
|
|
590
44
|
|
|
591
|
-
|
|
45
|
+
* Add test case for `bfs_search_tree_from` (fixes [#99](https://github.com/monora/rgl/issues/99)) ([54f92e4](https://github.com/monora/rgl/commit/54f92e497c0e628c5dcdab3334ef280f6f38bfd7))
|
|
46
|
+
* Remove require of the file if already required ([0ef2ce5](https://github.com/monora/rgl/commit/0ef2ce5c43c56503268303abac40fd841c4cea43))
|
|
592
47
|
|
|
593
|
-
|
|
48
|
+
## Ältere Geschichte
|
|
594
49
|
|
|
595
|
-
|
|
596
|
-
target.
|
|
50
|
+
Releases 0.6.0–0.6.3 sind in der [GitHub Releases-Liste](https://github.com/monora/rgl/releases) dokumentiert.
|
|
597
51
|
|
|
598
|
-
###
|
|
52
|
+
### 0.5.x (2015–2022)
|
|
599
53
|
|
|
600
|
-
|
|
54
|
+
Große Algorithmen-Erweiterungen durch @KL-7: Dijkstra, Bellman-Ford, Prim MST,
|
|
55
|
+
Edmonds-Karp Maximum Flow, bipartite Mengen, `Graph#path?`. Wechsel von
|
|
56
|
+
`lazy_priority_queue` zu `pairing_heap`. Migration von Travis CI zu GitHub Actions.
|
|
601
57
|
|
|
602
|
-
###
|
|
58
|
+
### 0.4.0 (2008)
|
|
603
59
|
|
|
604
|
-
|
|
60
|
+
DOT-Modul in den `RGL`-Namespace verschoben (Konflikt mit RDocs DOT-Modul beseitigt).
|
|
61
|
+
Transitive Reduktion ergänzt.
|
|
605
62
|
|
|
606
|
-
###
|
|
63
|
+
### 0.3.x (2008)
|
|
607
64
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
NameError to NoVertexError.
|
|
65
|
+
Verbessertes Quoting von DOT-IDs und Labels gemäß Graphviz-Spezifikation.
|
|
66
|
+
Vollständige Testabdeckung für `rdot.rb`. Subgraph-Header-Fix.
|
|
611
67
|
|
|
612
|
-
###
|
|
68
|
+
### 0.2.x (2004–2006)
|
|
613
69
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
rforge-import, V0_2_1), examples/north/g.12.8.graphml (tags:
|
|
617
|
-
PRE_CHECKIN_JC, REL_0_2_3, REL_0_2_2, rforge-import, V0_2_1),
|
|
618
|
-
examples/north/g.14.9.graphml (tags: PRE_CHECKIN_JC, REL_0_2_3,
|
|
619
|
-
REL_0_2_2, rforge-import, V0_2_1), lib/dot/dot.rb,
|
|
620
|
-
lib/rgl/base.rb (tags: V0_2_1), lib/rgl/dot.rb (tags: V0_2_1),
|
|
621
|
-
lib/rgl/rdot.rb (tags: V0_2_1): canvas.rb added. Collision with
|
|
622
|
-
rdoc/dot.rb removed.
|
|
70
|
+
Erstes RubyGems-Paket. GraphML-Import via REXML. Zykelerkennung, Graph-Gleichheit,
|
|
71
|
+
`initialize_copy` für Clone-Unterstützung.
|
|
623
72
|
|
|
624
|
-
### 2002
|
|
73
|
+
### 0.1 / Erstveröffentlichung (2002)
|
|
625
74
|
|
|
626
|
-
|
|
75
|
+
Erste öffentliche Veröffentlichung auf RubyForge. Kern-Abstraktionen (`each_vertex`,
|
|
76
|
+
`each_adjacent`), Adjacency-List-Darstellung, DOT-Export.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Ruby Graph Library (RGL)
|
|
2
2
|
[](https://github.com/monora/rgl/actions/workflows/test.yml) [](https://github.com/monora/rgl/actions/workflows/doc.yml)
|
|
3
3
|
[](https://badge.fury.io/rb/rgl)
|
|
4
|
-
[](https://gitpod.io/#https://github.com/monora/rgl)
|
|
5
|
-
[](https://codeclimate.com/github/monora/rgl)
|
|
6
|
-
|
|
7
4
|
RGL is a framework for graph data structures and algorithms.
|
|
8
5
|
|
|
9
6
|
The design of the library is much influenced by the Boost Graph Library (BGL)
|
|
@@ -278,14 +275,14 @@ Library](https://www.boost.org/libs/graph/doc) kindly allowed to use the BGL
|
|
|
278
275
|
documentation as a *cheap* reference for RGL. He and Robert also gave feedback
|
|
279
276
|
and many ideas for RGL.
|
|
280
277
|
|
|
281
|
-
Dave Thomas for [RDoc](https://
|
|
278
|
+
Dave Thomas for [RDoc](https://ruby.github.io/rdoc/) which generated what you
|
|
282
279
|
read and matz for Ruby. Dave included in the latest version of RDoc (alpha9)
|
|
283
280
|
the module {RGL::DOT} which is used instead of Roberts module to visualize
|
|
284
281
|
graphs.
|
|
285
282
|
|
|
286
283
|
Jeremy Bopp, John Carter, Sascha Doerdelmann, Shawn Garbett, Andreas Schörk, Dan
|
|
287
284
|
Čermák, Kirill Lashuk and Markus Napp for contributing additions, test cases and
|
|
288
|
-
bugfixes. The complete list of
|
|
285
|
+
bugfixes. The complete list of contributors is
|
|
289
286
|
[here](https://github.com/monora/rgl/contributors).
|
|
290
287
|
|
|
291
288
|
## Links
|
|
@@ -297,6 +294,6 @@ bugfixes. The complete list of contributers is
|
|
|
297
294
|
|
|
298
295
|
## Copying
|
|
299
296
|
|
|
300
|
-
RGL is Copyright (c) 2002,2004,2005,2008,2013,2015,2019,2020,2022,2023 by Horst
|
|
297
|
+
RGL is Copyright (c) 2002,2004,2005,2008,2013,2015,2019,2020,2022,2023,2024,2025,2026 by Horst
|
|
301
298
|
Duchene. It is free software, and may be redistributed under the {file:LICENSE}
|
|
302
299
|
and terms specified in the LICENSE file.
|
data/Rakefile
CHANGED
data/lib/rgl/adjacency.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# adjacency.rb
|
|
2
4
|
#
|
|
3
5
|
require 'rgl/mutable'
|
|
@@ -77,7 +79,7 @@ module RGL
|
|
|
77
79
|
#
|
|
78
80
|
# @see Graph#has_vertex
|
|
79
81
|
def has_vertex?(v)
|
|
80
|
-
@vertices_dict.
|
|
82
|
+
@vertices_dict.key?(v)
|
|
81
83
|
end
|
|
82
84
|
|
|
83
85
|
# Complexity is O(1), if a Set is used as adjacency list. Otherwise,
|
data/lib/rgl/base.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# base.rb
|
|
2
4
|
|
|
3
5
|
# Module {RGL} defines the namespace for all modules and classes of the graph
|
|
@@ -316,7 +318,7 @@ module RGL
|
|
|
316
318
|
each_adjacent(u) do |v|
|
|
317
319
|
edge = UnDirectedEdge.new(u, v)
|
|
318
320
|
|
|
319
|
-
unless visited.
|
|
321
|
+
unless visited.key?(edge)
|
|
320
322
|
visited[edge] = true
|
|
321
323
|
yield u, v
|
|
322
324
|
end
|
data/lib/rgl/bellman_ford.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'rgl/dijkstra_visitor'
|
|
2
4
|
require 'rgl/edge_properties_map'
|
|
3
5
|
require 'rgl/path_builder'
|
|
@@ -19,7 +21,7 @@ module RGL
|
|
|
19
21
|
def initialize(graph)
|
|
20
22
|
super(graph)
|
|
21
23
|
|
|
22
|
-
# by default,
|
|
24
|
+
# by default, raise an exception if a negative-weight cycle is detected
|
|
23
25
|
@edge_not_minimized_event_handler = lambda do |u, v|
|
|
24
26
|
raise ArgumentError.new("there is a negative-weight cycle including edge (#{u}, #{v})")
|
|
25
27
|
end
|
data/lib/rgl/bidirectional.rb
CHANGED
data/lib/rgl/bipartite.rb
CHANGED
data/lib/rgl/condensation.rb
CHANGED
data/lib/rgl/dijkstra.rb
CHANGED
data/lib/rgl/dijkstra_visitor.rb
CHANGED
data/lib/rgl/dot.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# dot.rb
|
|
2
4
|
#
|
|
3
5
|
# Minimal Dot support, based on Dave Thomas's dot module (included in rdoc).
|
|
@@ -121,7 +123,7 @@ module RGL
|
|
|
121
123
|
f << self.to_dot_graph(options).to_s << "\n"
|
|
122
124
|
end
|
|
123
125
|
|
|
124
|
-
unless system("dot -T#{fmt}
|
|
126
|
+
unless system("dot", "-T#{fmt}", src, "-o", dot)
|
|
125
127
|
raise "Error executing dot. Did you install GraphViz?"
|
|
126
128
|
end
|
|
127
129
|
dot
|
data/lib/rgl/edmonds_karp.rb
CHANGED
data/lib/rgl/graph_iterator.rb
CHANGED
data/lib/rgl/graph_visitor.rb
CHANGED
data/lib/rgl/graph_wrapper.rb
CHANGED
data/lib/rgl/graphxml.rb
CHANGED
data/lib/rgl/implicit.rb
CHANGED
data/lib/rgl/mutable.rb
CHANGED
data/lib/rgl/path_builder.rb
CHANGED
data/lib/rgl/prim.rb
CHANGED
data/lib/rgl/rdot.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RGL
|
|
2
4
|
|
|
3
5
|
# This is a modified version of +dot.rb+ from {https://ruby.github.io/rdoc Dave
|
|
@@ -13,6 +15,7 @@ module RGL
|
|
|
13
15
|
|
|
14
16
|
# options for node declaration
|
|
15
17
|
NODE_OPTS = [
|
|
18
|
+
'class',# multiple space-separated classes are supported
|
|
16
19
|
'color', # default: black; node shape color
|
|
17
20
|
'colorscheme', # default: X11; scheme for interpreting color names
|
|
18
21
|
'comment', # any string (format-dependent)
|
|
@@ -59,6 +62,7 @@ module RGL
|
|
|
59
62
|
'arrowhead', # default: normal; style of arrowhead at head end
|
|
60
63
|
'arrowsize', # default: 1.0; scaling factor for arrowheads
|
|
61
64
|
'arrowtail', # default: normal; style of arrowhead at tail end
|
|
65
|
+
'class',# multiple space-separated classes are supported
|
|
62
66
|
'color', # default: black; edge stroke color
|
|
63
67
|
'colorscheme', # default: X11; scheme for interpreting color names
|
|
64
68
|
'comment', # any string (format-dependent)
|
|
@@ -120,6 +124,7 @@ module RGL
|
|
|
120
124
|
'aspect', # controls aspect ratio adjustment
|
|
121
125
|
'bgcolor', # background color for drawing, plus initial fill color
|
|
122
126
|
'center', # default: false; center draing on page
|
|
127
|
+
'class',# multiple space-separated classes are supported
|
|
123
128
|
'clusterrank', # default: local; may be "global" or "none"
|
|
124
129
|
'color', # default: black; for clusters, outline color, and fill color if
|
|
125
130
|
# fillcolor not defined
|
data/lib/rgl/topsort.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# topsort.rb
|
|
2
4
|
|
|
3
5
|
require 'rgl/graph_iterator'
|
|
@@ -26,16 +28,16 @@ module RGL
|
|
|
26
28
|
|
|
27
29
|
def set_to_begin
|
|
28
30
|
@waiting = Array.new
|
|
29
|
-
@
|
|
31
|
+
@in_degrees = Hash.new(0)
|
|
30
32
|
|
|
31
33
|
graph.each_vertex do |u|
|
|
32
|
-
@
|
|
34
|
+
@in_degrees[u] = 0 unless @in_degrees.key?(u)
|
|
33
35
|
graph.each_adjacent(u) do |v|
|
|
34
|
-
@
|
|
36
|
+
@in_degrees[v] += 1
|
|
35
37
|
end
|
|
36
38
|
end
|
|
37
39
|
|
|
38
|
-
@
|
|
40
|
+
@in_degrees.each_pair do |v, indegree|
|
|
39
41
|
@waiting.push(v) if indegree.zero?
|
|
40
42
|
end
|
|
41
43
|
end
|
|
@@ -44,8 +46,8 @@ module RGL
|
|
|
44
46
|
def basic_forward
|
|
45
47
|
u = @waiting.pop
|
|
46
48
|
graph.each_adjacent(u) do |v|
|
|
47
|
-
@
|
|
48
|
-
@waiting.push(v) if @
|
|
49
|
+
@in_degrees[v] -= 1
|
|
50
|
+
@waiting.push(v) if @in_degrees[v].zero?
|
|
49
51
|
end
|
|
50
52
|
u
|
|
51
53
|
end
|
data/lib/rgl/transitivity.rb
CHANGED
data/lib/rgl/traversal.rb
CHANGED
data/lib/rgl/version.rb
CHANGED
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.7
|
|
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:
|
|
12
|
+
date: 2026-05-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: stream
|
|
@@ -65,54 +65,11 @@ dependencies:
|
|
|
65
65
|
- - ">="
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
67
|
version: 3.2.4
|
|
68
|
-
- !ruby/object:Gem::Dependency
|
|
69
|
-
name: rake
|
|
70
|
-
requirement: !ruby/object:Gem::Requirement
|
|
71
|
-
requirements:
|
|
72
|
-
- - "~>"
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: '13.0'
|
|
75
|
-
type: :development
|
|
76
|
-
prerelease: false
|
|
77
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - "~>"
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: '13.0'
|
|
82
|
-
- !ruby/object:Gem::Dependency
|
|
83
|
-
name: yard
|
|
84
|
-
requirement: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - "~>"
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: '0.9'
|
|
89
|
-
type: :development
|
|
90
|
-
prerelease: false
|
|
91
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
-
requirements:
|
|
93
|
-
- - "~>"
|
|
94
|
-
- !ruby/object:Gem::Version
|
|
95
|
-
version: '0.9'
|
|
96
|
-
- !ruby/object:Gem::Dependency
|
|
97
|
-
name: test-unit
|
|
98
|
-
requirement: !ruby/object:Gem::Requirement
|
|
99
|
-
requirements:
|
|
100
|
-
- - "~>"
|
|
101
|
-
- !ruby/object:Gem::Version
|
|
102
|
-
version: '3.5'
|
|
103
|
-
type: :development
|
|
104
|
-
prerelease: false
|
|
105
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
-
requirements:
|
|
107
|
-
- - "~>"
|
|
108
|
-
- !ruby/object:Gem::Version
|
|
109
|
-
version: '3.5'
|
|
110
68
|
description: RGL is a framework for graph data structures and algorithms
|
|
111
69
|
email: monora@gmail.com
|
|
112
70
|
executables: []
|
|
113
71
|
extensions: []
|
|
114
|
-
extra_rdoc_files:
|
|
115
|
-
- README.md
|
|
72
|
+
extra_rdoc_files: []
|
|
116
73
|
files:
|
|
117
74
|
- CHANGELOG.md
|
|
118
75
|
- Gemfile
|
|
@@ -247,29 +204,28 @@ files:
|
|
|
247
204
|
homepage: https://github.com/monora/rgl
|
|
248
205
|
licenses:
|
|
249
206
|
- Ruby
|
|
250
|
-
metadata:
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
- "--line-numbers"
|
|
207
|
+
metadata:
|
|
208
|
+
homepage_uri: https://github.com/monora/rgl
|
|
209
|
+
source_code_uri: https://github.com/monora/rgl
|
|
210
|
+
changelog_uri: https://github.com/monora/rgl/blob/master/CHANGELOG.md
|
|
211
|
+
rubygems_mfa_required: 'true'
|
|
212
|
+
post_install_message:
|
|
213
|
+
rdoc_options: []
|
|
258
214
|
require_paths:
|
|
259
215
|
- lib
|
|
260
216
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
261
217
|
requirements:
|
|
262
218
|
- - ">="
|
|
263
219
|
- !ruby/object:Gem::Version
|
|
264
|
-
version: '
|
|
220
|
+
version: '3.1'
|
|
265
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
222
|
requirements:
|
|
267
223
|
- - ">="
|
|
268
224
|
- !ruby/object:Gem::Version
|
|
269
225
|
version: '0'
|
|
270
226
|
requirements: []
|
|
271
|
-
rubygems_version: 3.
|
|
272
|
-
signing_key:
|
|
227
|
+
rubygems_version: 3.5.22
|
|
228
|
+
signing_key:
|
|
273
229
|
specification_version: 4
|
|
274
230
|
summary: Ruby Graph Library
|
|
275
231
|
test_files: []
|