rgl 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,9 @@
1
1
  require 'test/unit'
2
2
  require 'rgl/transitiv_closure'
3
+ require 'test_helper'
3
4
 
4
5
  include RGL
5
6
 
6
- class Array
7
- alias add push
8
- end
9
-
10
7
  class TestTransitiveClosure < Test::Unit::TestCase
11
8
 
12
9
  def setup
@@ -4,9 +4,7 @@ require 'rgl/traversal'
4
4
  require 'rgl/topsort'
5
5
  require 'rgl/implicit'
6
6
 
7
- class Array
8
- alias add push
9
- end
7
+ require 'test_helper'
10
8
 
11
9
  include RGL
12
10
 
@@ -0,0 +1,7 @@
1
+ # Some helper utilities used in test classes
2
+
3
+ class Array
4
+ # We need Array#add in test classes to be able to use Arrays as adjacency lists
5
+ # This is needed to have ordered lists as neigbors in our test graphs.
6
+ alias add push
7
+ end
metadata CHANGED
@@ -1,163 +1,173 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.10
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rgl
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.3
7
- date: 2005-04-12
6
+ version: 0.3.0
7
+ date: 2008-03-04 00:00:00 +01:00
8
8
  summary: Ruby Graph Library
9
9
  require_paths:
10
- - lib
11
- email: hd.at.clr@hduchene.de
10
+ - lib
11
+ email: monora@gmail.com
12
12
  homepage: http://rgl.rubyforge.org
13
13
  rubyforge_project: rgl
14
- description: "RGL is a framework for graph data structures and algorithms. The design of the
15
- library is much influenced by the Boost Graph Library (BGL) which is written in
16
- C++ heavily using its template mechanism. RGL currently contains a core set of
17
- algorithm patterns: * Breadth First Search * Depth First Search The
18
- algorithm patterns by themselves do not compute any meaningful quantities over
19
- graphs, they are merely building blocks for constructing graph algorithms. The
20
- graph algorithms in RGL currently include: * Topological Sort * Connected
21
- Components * Strongly Connected Components * Transitive Closure"
14
+ description: "RGL is a framework for graph data structures and algorithms. The design of the library is much influenced by the Boost Graph Library (BGL) which is written in C++ heavily using its template mechanism. RGL currently contains a core set of algorithm patterns: * Breadth First Search * Depth First Search The algorithm patterns by themselves do not compute any meaningful quantities over graphs, they are merely building blocks for constructing graph algorithms. The graph algorithms in RGL currently include: * Topological Sort * Connected Components * Strongly Connected Components * Transitive Closure * Search cycles (contributed by Shawn Garbett)"
22
15
  autorequire: rgl/base
23
16
  default_executable:
24
17
  bindir: bin
25
18
  has_rdoc: true
26
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
27
20
  requirements:
28
- -
29
- - ">"
30
- - !ruby/object:Gem::Version
31
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
32
24
  version:
33
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
34
29
  authors:
35
- - Horst Duchene
30
+ - Horst Duchene
36
31
  files:
37
- - install.rb
38
- - ChangeLog
39
- - README
40
- - Rakefile
41
- - TAGS
42
- - tests/TestGraphXML.rb
43
- - tests/TestComponents.rb
44
- - tests/TestDirectedGraph.rb
45
- - tests/TestEdge.rb
46
- - tests/TestImplicit.rb
47
- - tests/TestTransitiveClosure.rb
48
- - tests/TestTraversal.rb
49
- - tests/TestUnDirectedGraph.rb
50
- - examples/north
51
- - examples/canvas.rb
52
- - examples/example.jpg
53
- - examples/examples.rb
54
- - examples/module_graph.jpg
55
- - examples/north.rb
56
- - examples/north2.rb
57
- - examples/rdep-rgl.rb
58
- - examples/codegraph
59
- - examples/graph.dot
60
- - examples/insel.rb
61
- - examples/debgraph.rb
62
- - examples/north/Graph.log
63
- - examples/north/g.10.0.graphml
64
- - examples/north/g.10.1.graphml
65
- - examples/north/g.10.11.graphml
66
- - examples/north/g.10.12.graphml
67
- - examples/north/g.10.13.graphml
68
- - examples/north/g.10.14.graphml
69
- - examples/north/g.10.15.graphml
70
- - examples/north/g.10.16.graphml
71
- - examples/north/g.10.17.graphml
72
- - examples/north/g.10.19.graphml
73
- - examples/north/g.10.2.graphml
74
- - examples/north/g.10.20.graphml
75
- - examples/north/g.10.22.graphml
76
- - examples/north/g.10.24.graphml
77
- - examples/north/g.10.25.graphml
78
- - examples/north/g.10.27.graphml
79
- - examples/north/g.10.28.graphml
80
- - examples/north/g.10.29.graphml
81
- - examples/north/g.10.3.graphml
82
- - examples/north/g.10.30.graphml
83
- - examples/north/g.10.31.graphml
84
- - examples/north/g.10.34.graphml
85
- - examples/north/g.10.37.graphml
86
- - examples/north/g.10.38.graphml
87
- - examples/north/g.10.39.graphml
88
- - examples/north/g.10.4.graphml
89
- - examples/north/g.10.40.graphml
90
- - examples/north/g.10.41.graphml
91
- - examples/north/g.10.42.graphml
92
- - examples/north/g.10.45.graphml
93
- - examples/north/g.10.46.graphml
94
- - examples/north/g.10.5.graphml
95
- - examples/north/g.10.50.graphml
96
- - examples/north/g.10.56.graphml
97
- - examples/north/g.10.57.graphml
98
- - examples/north/g.10.58.graphml
99
- - examples/north/g.10.6.graphml
100
- - examples/north/g.10.60.graphml
101
- - examples/north/g.10.61.graphml
102
- - examples/north/g.10.62.graphml
103
- - examples/north/g.10.68.graphml
104
- - examples/north/g.10.69.graphml
105
- - examples/north/g.10.7.graphml
106
- - examples/north/g.10.70.graphml
107
- - examples/north/g.10.71.graphml
108
- - examples/north/g.10.72.graphml
109
- - examples/north/g.10.74.graphml
110
- - examples/north/g.10.75.graphml
111
- - examples/north/g.10.78.graphml
112
- - examples/north/g.10.79.graphml
113
- - examples/north/g.10.8.graphml
114
- - examples/north/g.10.80.graphml
115
- - examples/north/g.10.82.graphml
116
- - examples/north/g.10.83.graphml
117
- - examples/north/g.10.85.graphml
118
- - examples/north/g.10.86.graphml
119
- - examples/north/g.10.88.graphml
120
- - examples/north/g.10.89.graphml
121
- - examples/north/g.10.9.graphml
122
- - examples/north/g.10.90.graphml
123
- - examples/north/g.10.91.graphml
124
- - examples/north/g.10.92.graphml
125
- - examples/north/g.10.93.graphml
126
- - examples/north/g.10.94.graphml
127
- - examples/north/g.12.8.graphml
128
- - examples/north/g.14.9.graphml
129
- - lib/rgl/adjacency.rb
130
- - lib/rgl/base.rb
131
- - lib/rgl/connected_components.rb
132
- - lib/rgl/dot.rb
133
- - lib/rgl/graphxml.rb
134
- - lib/rgl/implicit.rb
135
- - lib/rgl/mutable.rb
136
- - lib/rgl/rdot.rb
137
- - lib/rgl/topsort.rb
138
- - lib/rgl/transitiv_closure.rb
139
- - lib/rgl/traversal.rb
32
+ - install.rb
33
+ - ChangeLog
34
+ - README
35
+ - Rakefile
36
+ - tests/TestTransitiveClosure.rb
37
+ - tests/TestComponents.rb
38
+ - tests/TestCycles.rb
39
+ - tests/TestDirectedGraph.rb
40
+ - tests/TestEdge.rb
41
+ - tests/TestGraph.rb
42
+ - tests/TestGraphXML.rb
43
+ - tests/TestImplicit.rb
44
+ - tests/TestUnDirectedGraph.rb
45
+ - tests/TestTraversal.rb
46
+ - tests/test_helper.rb
47
+ - tests/TestDot.rb
48
+ - tests/TestRdot.rb
49
+ - examples/north
50
+ - examples/module_graph.jpg
51
+ - examples/canvas.rb
52
+ - examples/insel-der-tausend-gefahren.rb
53
+ - examples/example.jpg
54
+ - examples/examples.rb
55
+ - examples/north2.rb
56
+ - examples/north.rb
57
+ - examples/rdep-rgl.rb
58
+ - examples/north/g.10.0.graphml
59
+ - examples/north/Graph.log
60
+ - examples/north/g.10.1.graphml
61
+ - examples/north/g.10.11.graphml
62
+ - examples/north/g.10.12.graphml
63
+ - examples/north/g.10.13.graphml
64
+ - examples/north/g.10.14.graphml
65
+ - examples/north/g.10.15.graphml
66
+ - examples/north/g.10.16.graphml
67
+ - examples/north/g.10.17.graphml
68
+ - examples/north/g.10.19.graphml
69
+ - examples/north/g.10.2.graphml
70
+ - examples/north/g.10.20.graphml
71
+ - examples/north/g.10.22.graphml
72
+ - examples/north/g.10.24.graphml
73
+ - examples/north/g.10.25.graphml
74
+ - examples/north/g.10.27.graphml
75
+ - examples/north/g.10.28.graphml
76
+ - examples/north/g.10.29.graphml
77
+ - examples/north/g.10.3.graphml
78
+ - examples/north/g.10.30.graphml
79
+ - examples/north/g.10.31.graphml
80
+ - examples/north/g.10.34.graphml
81
+ - examples/north/g.10.37.graphml
82
+ - examples/north/g.10.38.graphml
83
+ - examples/north/g.10.39.graphml
84
+ - examples/north/g.10.4.graphml
85
+ - examples/north/g.10.40.graphml
86
+ - examples/north/g.10.41.graphml
87
+ - examples/north/g.10.42.graphml
88
+ - examples/north/g.10.45.graphml
89
+ - examples/north/g.10.46.graphml
90
+ - examples/north/g.10.5.graphml
91
+ - examples/north/g.10.50.graphml
92
+ - examples/north/g.10.56.graphml
93
+ - examples/north/g.10.57.graphml
94
+ - examples/north/g.10.58.graphml
95
+ - examples/north/g.10.6.graphml
96
+ - examples/north/g.10.60.graphml
97
+ - examples/north/g.10.61.graphml
98
+ - examples/north/g.10.62.graphml
99
+ - examples/north/g.10.68.graphml
100
+ - examples/north/g.10.69.graphml
101
+ - examples/north/g.10.7.graphml
102
+ - examples/north/g.10.70.graphml
103
+ - examples/north/g.10.71.graphml
104
+ - examples/north/g.10.72.graphml
105
+ - examples/north/g.10.74.graphml
106
+ - examples/north/g.10.75.graphml
107
+ - examples/north/g.10.78.graphml
108
+ - examples/north/g.10.79.graphml
109
+ - examples/north/g.10.8.graphml
110
+ - examples/north/g.10.80.graphml
111
+ - examples/north/g.10.82.graphml
112
+ - examples/north/g.10.83.graphml
113
+ - examples/north/g.10.85.graphml
114
+ - examples/north/g.10.86.graphml
115
+ - examples/north/g.10.88.graphml
116
+ - examples/north/g.10.89.graphml
117
+ - examples/north/g.10.9.graphml
118
+ - examples/north/g.10.90.graphml
119
+ - examples/north/g.10.91.graphml
120
+ - examples/north/g.10.92.graphml
121
+ - examples/north/g.10.93.graphml
122
+ - examples/north/g.10.94.graphml
123
+ - examples/north/g.12.8.graphml
124
+ - examples/north/g.14.9.graphml
125
+ - rakelib/dep_graph.rake
126
+ - lib/rgl/bidirectional.rb
127
+ - lib/rgl/adjacency.rb
128
+ - lib/rgl/base.rb
129
+ - lib/rgl/graphxml.rb
130
+ - lib/rgl/dot.rb
131
+ - lib/rgl/connected_components.rb
132
+ - lib/rgl/rdot.rb
133
+ - lib/rgl/enumerable_ext.rb
134
+ - lib/rgl/implicit.rb
135
+ - lib/rgl/mutable.rb
136
+ - lib/rgl/topsort.rb
137
+ - lib/rgl/transitiv_closure.rb
138
+ - lib/rgl/traversal.rb
140
139
  test_files: []
140
+
141
141
  rdoc_options:
142
- - "--title"
143
- - "RGL - Ruby Graph Library"
144
- - "--main"
145
- - README
146
- - "--line-numbers"
142
+ - --title
143
+ - RGL - Ruby Graph Library
144
+ - --main
145
+ - README
146
+ - --line-numbers
147
147
  extra_rdoc_files:
148
- - README
148
+ - README
149
149
  executables: []
150
+
150
151
  extensions: []
152
+
151
153
  requirements:
152
- - "Stream library, v0.5 or later"
154
+ - Stream library, v0.5 or later
153
155
  dependencies:
154
- - !ruby/object:Gem::Dependency
155
- name: stream
156
- version_requirement:
157
- version_requirements: !ruby/object:Gem::Version::Requirement
158
- requirements:
159
- -
160
- - ">="
161
- - !ruby/object:Gem::Version
162
- version: "0.5"
163
- version:
156
+ - !ruby/object:Gem::Dependency
157
+ name: stream
158
+ version_requirement:
159
+ version_requirements: !ruby/object:Gem::Version::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: "0.5"
164
+ version:
165
+ - !ruby/object:Gem::Dependency
166
+ name: rake
167
+ version_requirement:
168
+ version_requirements: !ruby/object:Gem::Version::Requirement
169
+ requirements:
170
+ - - ">"
171
+ - !ruby/object:Gem::Version
172
+ version: 0.0.0
173
+ version:
data/TAGS DELETED
@@ -1,253 +0,0 @@
1
-
2
- lib/rgl/adjacency.rb,998
3
- module RGLRGL18,633
4
- class DirectedAdjacencyGraphDirectedAdjacencyGraph20,645
5
- def initialize (edgelist_class = Set)initialize39,1191
6
- def each_vertex (&b)each_vertex46,1369
7
- def each_adjacent (v, &b) # :nodoc:each_adjacent50,1436
8
- def directed?directed?58,1628
9
- def has_vertex? (v)has_vertex?65,1799
10
- def has_edge? (u, v)has_edge?75,2023
11
- def add_vertex (v)add_vertex84,2242
12
- def add_edge (u, v)add_edge90,2355
13
- def remove_vertex (v)remove_vertex98,2568
14
- def remove_edge (u, v)remove_edge108,2788
15
- def basic_add_edge (u, v)basic_add_edge114,2901
16
- class AdjacencyGraph < DirectedAdjacencyGraph AdjacencyGraph124,3211
17
- def directed? # Always returns false.directed?126,3261
18
- def remove_edge (u, v)remove_edge132,3361
19
- def basic_add_edge (u,v)basic_add_edge139,3486
20
- module GraphGraph146,3623
21
- def to_adjacencyto_adjacency151,3797
22
- def reversereverse162,4177
23
- def to_undirectedto_undirected176,4637
24
-
25
- lib/rgl/base.rb,2023
26
- module EnumerableEnumerable10,277
27
- def inject(*argv)inject11,297
28
- module EnumerableEnumerable39,787
29
- def lengthlength46,979
30
- module RGLRGL53,1050
31
- class NotDirectedError < RuntimeError; endNotDirectedError54,1061
32
- class NotUndirectedError < RuntimeError; endNotUndirectedError55,1106
33
- class NoVertexError < IndexError; endNoVertexError57,1154
34
- class NoEdgeError < IndexError; endNoEdgeError58,1194
35
- module EdgeEdge63,1423
36
- class DirectedEdgeDirectedEdge69,1762
37
- def initialize (a,b)initialize78,2009
38
- def eql?(edge)eql?84,2242
39
- def reversereverse90,2390
40
- def to_sto_s99,2702
41
- def to_a; [source,target]; endto_a103,2802
42
- class UnDirectedEdge < DirectedEdgeUnDirectedEdge113,3152
43
- def eql?(edge)eql?114,3192
44
- def hashhash118,3297
45
- def to_s; "(#{source}=#{target})"; endto_s123,3407
46
- module GraphGraph140,4274
47
- def each_vertexeach_vertex147,4502
48
- def each_adjacent (v)each_adjacent155,4787
49
- def each_edge (&block)each_edge167,5315
50
- def each(&block); each_vertex(&block); endeach180,5654
51
- def directed?; false; enddirected?183,5762
52
- def has_vertex?(v); include?(v); end # inherited from enumerablehas_vertex?188,6000
53
- def empty?; num_vertices.zero?; endempty?193,6193
54
- def vertices; to_a; endvertices196,6312
55
- def edge_class; directed? ? DirectedEdge : UnDirectedEdge; endedge_class199,6408
56
- def edgesedges203,6625
57
- def adjacent_vertices (v)adjacent_vertices211,6806
58
- def out_degree (v)out_degree219,7039
59
- def size() # Why not in Enumerable?size226,7166
60
- def num_vertices; size; endnum_vertices232,7330
61
- def num_edges; r = 0; each_edge {|u,v| r +=1}; r; endnum_edges235,7398
62
- def to_sto_s238,7537
63
- def each_edge_auxeach_edge_aux244,7598
64
- module BidirectionalGraphBidirectionalGraph268,8533
65
- def each_in_neighbor (v)each_in_neighbor275,8888
66
- def in_degree (v)in_degree282,9112
67
- def degree (v)degree290,9356
68
-
69
- lib/rgl/connected_components.rb,527
70
- module RGLRGL9,261
71
- module GraphGraph11,273
72
- def each_connected_componenteach_connected_component23,720
73
- class TarjanSccVisitor < DFSVisitorTarjanSccVisitor41,1322
74
- def initialize (g)initialize47,1473
75
- def handle_examine_vertex (v)handle_examine_vertex57,1721
76
- def handle_finish_vertex (v)handle_finish_vertex65,1912
77
- def num_compnum_comp85,2561
78
- def min_discover_time (u, v)min_discover_time91,2623
79
- def strongly_connected_componentsstrongly_connected_components129,4218
80
-
81
- lib/rgl/dot.rb,309
82
- module RGLRGL11,251
83
- module GraphGraph13,263
84
- def to_dot_graph (params = {})to_dot_graph19,447
85
- def print_dotted_on (params = {}, s = $stdout)print_dotted_on40,1239
86
- def dotty (params = {})dotty47,1453
87
- def write_to_graphic_file (fmt='png', dotfile="graph")write_to_graphic_file58,1744
88
-
89
- lib/rgl/graphxml.rb,359
90
- module RGLRGL18,614
91
- module GraphXMLGraphXML27,905
92
- class MutableGraphParserMutableGraphParser29,924
93
- def initialize (graph)initialize35,1017
94
- def tag_start (name, attrs)tag_start39,1080
95
- def MutableGraph.append_features (includingClass)append_features50,1341
96
- def includingClass.from_graphxml (source)from_graphxml55,1473
97
-
98
- lib/rgl/implicit.rb,704
99
- module RGLRGL23,730
100
- class ImplicitGraphImplicitGraph25,742
101
- def initializeinitialize39,1182
102
- def directed?directed?48,1440
103
- def each_vertex (&block) # :nodoc:each_vertex52,1491
104
- def each_adjacent (v, &block) # :nodoc:each_adjacent56,1576
105
- def each_edge (&block) # :nodoc:each_edge60,1670
106
- def vertex_iterator (&block)vertex_iterator72,1997
107
- def adjacent_iterator (&block)adjacent_iterator85,2365
108
- def edge_iterator (&block)edge_iterator93,2623
109
- module GraphGraph100,2723
110
- def vertices_filtered_by (&filter)vertices_filtered_by126,3533
111
- def edges_filtered_by (&filter)edges_filtered_by146,4175
112
- def implicit_graphimplicit_graph163,4698
113
-
114
- lib/rgl/mutable.rb,382
115
- module RGLRGL5,34
116
- module MutableGraphMutableGraph10,137
117
- def add_vertex (v)add_vertex17,310
118
- def add_edge (u, v)add_edge29,770
119
- def add_vertices (*a)add_vertices35,884
120
- def add_edges (*edges)add_edges43,1127
121
- def remove_vertex (v)remove_vertex53,1512
122
- def remove_edge (u, v)remove_edge63,1831
123
- def remove_vertices (*a)remove_vertices70,1998
124
-
125
- lib/rgl/rdot.rb,1493
126
- module DOTDOT10,254
127
- def change_tab (t)change_tab19,428
128
- class DOTSimpleElementDOTSimpleElement118,4745
129
- def initialize (params = {})initialize122,4796
130
- def to_sto_s126,4890
131
- class DOTElement < DOTSimpleElementDOTElement133,4992
132
- def initialize (params = {}, option_list = [])initialize138,5092
133
- def each_optioneach_option149,5451
134
- def each_option_paireach_option_pair153,5515
135
- class DOTPort < DOTSimpleElementDOTPort168,5840
136
- def initialize (params = {})initialize172,5910
137
- def to_sto_s177,6025
138
- class DOTNode < DOTElementDOTNode184,6140
139
- def initialize (params = {}, option_list = NODE_OPTS)initialize188,6182
140
- def each_porteach_port193,6336
141
- def push (thing)push201,6447
142
- def poppop205,6502
143
- def to_s (t = '')to_s209,6540
144
- class DOTSubgraph < DOTElementDOTSubgraph238,7531
145
- def initialize (params = {}, option_list = GRAPH_OPTS)initialize243,7593
146
- def each_nodeeach_node249,7781
147
- def push (thing)push257,7898
148
- def poppop261,7955
149
- def to_s (t = '')to_s265,7993
150
- class DOTDigraph < DOTSubgraphDOTDigraph284,8473
151
- def initialize (params = {}, option_list = GRAPH_OPTS)initialize286,8507
152
- class DOTEdge < DOTElementDOTEdge295,8687
153
- def initialize (params = {}, option_list = EDGE_OPTS)initialize299,8747
154
- def edge_linkedge_link305,8954
155
- def to_s (t = '')to_s309,8992
156
- class DOTDirectedEdge < DOTEdgeDOTDirectedEdge320,9341
157
- def edge_linkedge_link322,9376
158
-
159
- lib/rgl/topsort.rb,484
160
- module RGLRGL5,39
161
- class TopsortIteratorTopsortIterator17,521
162
- def initialize (g)initialize21,573
163
- def set_to_begin # :nodoc:set_to_begin26,639
164
- def basic_forward # :nodoc:basic_forward42,1017
165
- def at_beginning?; true; end # :nodoc: FIXMEat_beginning?51,1213
166
- def at_end?; @waiting.empty?; end # :nodoc:at_end?52,1273
167
- module GraphGraph56,1360
168
- def topsort_iteratortopsort_iterator60,1410
169
- def acyclic?acyclic?67,1627
170
-
171
- lib/rgl/transitiv_closure.rb,131
172
- module RGLRGL12,362
173
- module GraphGraph14,374
174
- def transitive_closure_floyd_warshaltransitive_closure_floyd_warshal23,721
175
-
176
- lib/rgl/traversal.rb,1779
177
- module RGLRGL16,593
178
- module GraphWrapper # :nodoc:GraphWrapper18,605
179
- def initialize (graph)initialize23,743
180
- module GraphIteratorGraphIterator31,1009
181
- module GraphVisitorGraphVisitor66,2413
182
- def initialize (graph)initialize74,2535
183
- def resetreset81,2649
184
- def finished_vertex? (v)finished_vertex?87,2777
185
- def attach_distance_map (map = Hash.new(0))attach_distance_map100,3220
186
- def handle_tree_edge (u, v)handle_tree_edge105,3312
187
- def distance_to_root (v)distance_to_root112,3471
188
- def follow_edge? (u, v) # :nodoc:follow_edge?121,3630
189
- def self.def_event_handler (m)def_event_handler127,3740
190
- def handle_#{m} (#{params})handle_130,3841
191
- def set_#{m}_event_handler (&b)set_134,3968
192
- class BFSIteratorBFSIterator160,4865
193
- def initialize (graph, start=graph.detect{ |x| true })initialize169,5043
194
- def at_beginning? # :nodoc:at_beginning?177,5258
195
- def at_end?at_end?183,5379
196
- def set_to_beginset_to_begin189,5503
197
- def basic_forward # :nodoc:basic_forward195,5685
198
- def next_vertex # :nodoc:next_vertex219,6414
199
- module GraphGraph226,6532
200
- def bfs_iterator (v = self.detect { |x| true})bfs_iterator230,6602
201
- def bfs_search_tree_from (v)bfs_search_tree_from238,6910
202
- class DFSIterator < BFSIteratorDFSIterator258,7523
203
- def next_vertexnext_vertex260,7558
204
- class DFSVisitorDFSVisitor279,8231
205
- module GraphGraph288,8357
206
- def dfs_iterator (v = self.detect { |x| true })dfs_iterator292,8425
207
- def depth_first_search (vis = DFSVisitor.new(self), &b)depth_first_search300,8706
208
- def depth_first_visit (u, vis = DFSVisitor.new(self), &b)depth_first_visit312,9047
209
- def acyclic?acyclic?337,9940
210
-
211
- lib/rgl/xx.rb,1766
212
- module EnumerableEnumerable15,316
213
- def inject (*argv)inject17,337
214
- module EnumerableEnumerable47,910
215
- def lengthlength56,1106
216
- module RGLRGL65,1200
217
- class NotDirectedError < RuntimeError; end NotDirectedError67,1212
218
- class NotUndirectedError < RuntimeError; end NotUndirectedError68,1261
219
- class NoVertexError < IndexError; end NoVertexError69,1310
220
- class NoEdgeError < IndexError; endNoEdgeError70,1359
221
- module EdgeEdge76,1600
222
- class DirectedEdgeDirectedEdge84,1940
223
- def initialize (a, b)initialize96,2192
224
- def eql? (edge)eql?104,2441
225
- def reversereverse112,2592
226
- def to_sto_s125,2921
227
- def to_ato_a131,3024
228
- class UnDirectedEdge < DirectedEdgeUnDirectedEdge146,3378
229
- def eql? (edge)eql?148,3419
230
- def hashhash152,3529
231
- def to_sto_s158,3644
232
- module GraphGraph181,4544
233
- def each_vertexeach_vertex190,4775
234
- def each_adjacent (v)each_adjacent199,5049
235
- def each_edge (&block)each_edge212,5565
236
- def each (&block)each226,5916
237
- def directed?directed?232,6039
238
- def has_vertex? (v)has_vertex?240,6291
239
- def empty?empty?248,6495
240
- def verticesvertices254,6625
241
- def edge_classedge_class260,6730
242
- def edgesedges267,6956
243
- def adjacent_vertices (v)adjacent_vertices276,7143
244
- def out_degree (v)out_degree285,7379
245
- def size # Why not in Enumerable?size293,7508
246
- def num_verticesnum_vertices303,7716
247
- def num_edgesnum_edges309,7793
248
- def to_sto_s317,7954
249
- def each_edge_auxeach_edge_aux323,8019
250
- module BidirectionalGraphBidirectionalGraph349,8937
251
- def each_in_neighbor (v)each_in_neighbor359,9301
252
- def in_degree (v)in_degree367,9530
253
- def degree (v)degree376,9775