rgl 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43739f63914a8070716c45a94f95c058b75efee0f4cd478a30d1cdc0e45e30c0
4
- data.tar.gz: 44d66025f8ca816c618eb12ac4a7fee1fa315c4312af698909e87caa0bdb48ad
3
+ metadata.gz: 46f0ba3170d9e82f84439dcb11ef208feb2d5d593334a09df409552e1b5bfc9d
4
+ data.tar.gz: d4eb269e797b26c41e64dc92d27f5dd54a6ed42192ba66ca2a32274cdc4cdc6c
5
5
  SHA512:
6
- metadata.gz: e910d7b6fdaaab9873f5daac67009eab91681789372e00e9d0bdbbfa09782f4b67763ce09634245cf0c07325847c5ec90695323dec65aaa6d940d775a89447a8
7
- data.tar.gz: bfcd42c97cc6361e58145aa3bf5f97c89d3e9b9d1a290f67a4ffb52e0829f9f0aff06c4d17a4d0ed1f83997e0917a1fbd11cdf340a6967fc7e8cfa3ad6dc6118
6
+ metadata.gz: da77a826c9b614ab96717a5c982ca89e9c1d14e947277a10e2cd0c267871f16f2b50356b80afe8d8f8f0a954e5968fba167f9758c3b65b9370f64e4fed1bbc23
7
+ data.tar.gz: f950c03d0b707ac672fa0adb3a80ff7fd6ad8ddfd92e50abdffda4f36dd0e7d67ec73ca5eb815783d40f222336e2a8298cd79285b5d95f4447affc7333467e1a
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2022-08 Release 0.5.9
2
+
3
+ Dan Čermák
4
+ * Drop lazy priority queue (#64) (3b1db1)
5
+
1
6
  2022-06 Release 0.5.8
2
7
 
3
8
  Horst Duchene
data/README.md CHANGED
@@ -3,20 +3,19 @@
3
3
  RGL is a framework for graph data structures and algorithms.
4
4
 
5
5
  The design of the library is much influenced by the Boost Graph Library (BGL)
6
- which is written in C++. Refer to http://www.boost.org/libs/graph/doc for
6
+ which is written in C++. Refer to https://www.boost.org/libs/graph/doc for
7
7
  further links and documentation on graph data structures and algorithms and
8
8
  the design rationales of BGL.
9
9
 
10
10
  A comprehensive summary of graph terminology can be found in the graph section
11
11
  of the *Dictionary of Algorithms and Data Structures* at
12
- http://www.nist.gov/dads/HTML/graph.html or
12
+ https://www.nist.gov/dads/HTML/graph.html or
13
13
  [Wikipedia](https://en.wikipedia.org/wiki/Graph_%28discrete_mathematics%29).
14
14
 
15
15
  ## Documentation
16
16
 
17
- * RGL's [API Reference](http://www.rubydoc.info/github/monora/rgl) at
18
- http://rubydoc.info
19
-
17
+ * RGL's [API Reference](https://www.rubydoc.info/github/monora/rgl) at
18
+ https://rubydoc.info
20
19
 
21
20
  ## Design principles
22
21
 
@@ -31,7 +30,6 @@ Ruby. The main design goals directly taken from the BGL design are:
31
30
  * A standardized generic interface for traversing graphs
32
31
  {RGL::GraphIterator}
33
32
 
34
-
35
33
  RGL provides some general purpose graph classes that conform to this
36
34
  interface, but they are not meant to be the **only** graph classes. As in BGL
37
35
  I believe that the main contribution of the RGL is the formulation of this
@@ -48,11 +46,10 @@ achieve genericity:
48
46
  * Element Type Parameterization
49
47
  * Vertex and Edge Property Multi-Parameterization
50
48
 
51
-
52
49
  The first is easily achieved in RGL using mixins, which of course is not as
53
50
  efficient than C++ templates (but much more readable :-). The second one is
54
51
  even more easily implemented using standard iterators with blocks or using the
55
- [stream](http://www.rubydoc.info/github/monora/stream) module. The third one
52
+ [stream](https://www.rubydoc.info/github/monora/stream) module. The third one
56
53
  is no issue since Ruby is dynamically typed: Each object can be a graph
57
54
  vertex. There is no need for a vertex (or even edge type). In the current
58
55
  version of RGL properties of vertices are simply attached using hashes. At
@@ -65,7 +62,6 @@ RGL current contains a core set of algorithm patterns:
65
62
  * Breadth First Search {RGL::BFSIterator}
66
63
  * Depth First Search {RGL::DFSIterator}
67
64
 
68
-
69
65
  The algorithm patterns by themselves do not compute any meaningful quantities
70
66
  over graphs, they are merely building blocks for constructing graph
71
67
  algorithms. The graph algorithms in RGL currently include:
@@ -77,7 +73,6 @@ algorithms. The graph algorithms in RGL currently include:
77
73
  * Dijkstras Shortest Path Algorithm {RGL::DijkstraAlgorithm}
78
74
  * Bellman Ford Algorithm {RGL::BellmanFordAlgorithm}
79
75
 
80
-
81
76
  ### Data Structures
82
77
 
83
78
  RGL currently provides two graph classes that implement a generalized
@@ -86,7 +81,6 @@ adjacency list and an edge list adaptor.
86
81
  * {RGL::AdjacencyGraph}
87
82
  * {RGL::ImplicitGraph}
88
83
 
89
-
90
84
  The AdjacencyGraph class is the general purpose _swiss army knife_ of graph
91
85
  classes. It is highly parameterized so that it can be optimized for different
92
86
  situations: the graph is directed or undirected, allow or disallow parallel
@@ -95,20 +89,20 @@ removal at the cost of extra space overhead, etc.
95
89
 
96
90
  ### Differences to BGL
97
91
 
98
- The concepts of IncidenceGraph, AdjacencyGraph and VertexListGraph (see
99
- http://www.boost.org/libs/graph/doc/IncidenceGraph.html) are here bundled in
100
- the base graph module. Most methods of IncidenceGraph should be standard in
101
- the base module Graph. The complexity guarantees can not necessarily provided.
102
- See http://www.boost.org/libs/graph/doc/graph_concepts.html.
92
+ The concepts of IncidenceGraph, AdjacencyGraph and VertexListGraph
93
+ (see [IncidenceGraph](https://www.boost.org/libs/graph/doc/IncidenceGraph.html)) are
94
+ bundled in RGL's base graph module. Most methods of IncidenceGraph
95
+ should be standard in the base module Graph. The complexity guarantees
96
+ can not necessarily provided (see [BGL's Graph Concepts](https://www.boost.org/libs/graph/doc/graph_concepts.html)).
103
97
 
104
98
  ## Installation
105
99
 
106
100
  % gem install rgl
107
101
 
108
- or download the latest sources from the git repository
109
- http://github.com/monora/rgl.
102
+ or download the latest sources from the [git
103
+ repository](https://github.com/monora/rgl).
110
104
 
111
- If you are going to use the drawing functionalities install [Graphviz](http://www.graphviz.org/).
105
+ If you are going to use the drawing functionalities install [Graphviz](https://www.graphviz.org/).
112
106
 
113
107
  ## Running tests
114
108
 
@@ -229,8 +223,6 @@ This graph shows all loaded RGL modules:
229
223
  Look for more in
230
224
  [examples](https://github.com/monora/rgl/tree/master/examples) directory.
231
225
 
232
- I collect some links to stuff around RGL at http://del.icio.us/monora/rgl.
233
-
234
226
  ## Credits
235
227
 
236
228
  Many thanks to Robert Feldt which also worked on a graph library
@@ -239,29 +231,28 @@ graph resources.
239
231
 
240
232
  Robert kindly allowed to integrate his work on graphr, which I did not yet
241
233
  succeed. Especially his work to output graphs for
242
- [GraphViz](http://www.graphviz.org) is much more elaborated than the minimal
234
+ [GraphViz](https://www.graphviz.org) is much more elaborated than the minimal
243
235
  support in dot.rb.
244
236
 
245
237
  Jeremy Siek one of the authors of the nice book [The Boost Graph
246
- Library](http://www.boost.org/libs/graph/doc) kindly allowed to use the BGL
238
+ Library](https://www.boost.org/libs/graph/doc) kindly allowed to use the BGL
247
239
  documentation as a *cheap* reference for RGL. He and Robert also gave feedback
248
240
  and many ideas for RGL.
249
241
 
250
- Dave Thomas for [RDoc](http://rdoc.sourceforge.net) which generated what you
242
+ Dave Thomas for [RDoc](https://rdoc.sourceforge.net) which generated what you
251
243
  read and matz for Ruby. Dave included in the latest version of RDoc (alpha9)
252
244
  the module dot/dot.rb which I use instead of Roberts module to visualize
253
245
  graphs (see rgl/dot.rb).
254
246
 
255
- Jeremy Bopp, John Carter, Sascha Doerdelmann, Shawn Garbett, Andreas Schörk
256
- and Kirill Lashuk for contributing additions, test cases and bugfixes.
257
-
258
- Kirill Lashuk who started to take over further development in November 2012.
247
+ Jeremy Bopp, John Carter, Sascha Doerdelmann, Shawn Garbett, Andreas
248
+ Schörk, Dan Čermák and Kirill Lashuk for contributing additions, test
249
+ cases and bugfixes.
259
250
 
260
- See also http://github.com/monora/rgl/contributors.
251
+ See also: https://github.com/monora/rgl/contributors
261
252
 
262
253
  ## Copying
263
254
 
264
- RGL is Copyright (c) 2002,2004,2005,2008,2013,2015,2019,2020 by Horst
255
+ RGL is Copyright (c) 2002,2004,2005,2008,2013,2015,2019,2020,2022 by Horst
265
256
  Duchene. It is free software, and may be redistributed under the [Ruby
266
257
  license](https://en.wikipedia.org/wiki/Ruby_License) and terms specified in
267
258
  the LICENSE file.
data/lib/rgl/base.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  # library. The main module is RGL::Graph which defines the abstract behavior of
5
5
  # all graphs in the library.
6
6
 
7
- RGL_VERSION = "0.5.8"
7
+ RGL_VERSION = "0.5.9"
8
8
 
9
9
  module RGL
10
10
  class NotDirectedError < RuntimeError; end
@@ -2,8 +2,6 @@ require 'rgl/dijkstra_visitor'
2
2
  require 'rgl/edge_properties_map'
3
3
  require 'rgl/path_builder'
4
4
 
5
- require 'lazy_priority_queue'
6
-
7
5
  module RGL
8
6
 
9
7
  # Bellman-Ford shortest paths algorithm has the following event points:
data/lib/rgl/dijkstra.rb CHANGED
@@ -2,7 +2,7 @@ require 'rgl/dijkstra_visitor'
2
2
  require 'rgl/edge_properties_map'
3
3
  require 'rgl/path_builder'
4
4
 
5
- require 'lazy_priority_queue'
5
+ require 'pairing_heap'
6
6
 
7
7
  module RGL
8
8
 
@@ -54,7 +54,7 @@ module RGL
54
54
  def init(source)
55
55
  @visitor.set_source(source)
56
56
 
57
- @queue = MinPriorityQueue.new
57
+ @queue = PairingHeap::MinPriorityQueue.new
58
58
  @queue.push(source, 0)
59
59
  end
60
60
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Horst Duchene
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire: rgl/base
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-06-02 00:00:00.000000000 Z
12
+ date: 2022-08-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: stream
@@ -26,19 +26,19 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.5.3
28
28
  - !ruby/object:Gem::Dependency
29
- name: lazy_priority_queue
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.1.0
34
+ version: 0.3.0
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.1.0
41
+ version: 0.3.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rexml
44
44
  requirement: !ruby/object:Gem::Requirement