simple_graph 0.2.0 → 0.2.1
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/docs/SimpleGraph/Graph/Node.html +497 -497
- data/docs/SimpleGraph/Graph.html +1123 -1123
- data/docs/SimpleGraph.html +146 -146
- data/docs/_index.html +136 -136
- data/docs/class_list.html +51 -51
- data/docs/css/full_list.css +58 -58
- data/docs/css/style.css +492 -492
- data/docs/file.README.html +154 -154
- data/docs/file_list.html +56 -56
- data/docs/frames.html +17 -17
- data/docs/index.html +154 -154
- data/docs/js/app.js +248 -248
- data/docs/js/full_list.js +216 -216
- data/docs/js/jquery.js +3 -3
- data/docs/method_list.html +203 -203
- data/docs/top-level-namespace.html +109 -109
- data/lib/simple_graph/version.rb +1 -1
- data/simple_graph.gemspec +2 -0
- metadata +23 -3
@@ -1,504 +1,504 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
Class: SimpleGraph::Graph::Node
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.9
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
pathId = "SimpleGraph::Graph::Node";
|
19
|
-
relpath = '../../';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="../../_index.html">Index (N)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../../SimpleGraph.html" title="SimpleGraph (module)">SimpleGraph</a></span></span> » <span class='title'><span class='object_link'><a href="../Graph.html" title="SimpleGraph::Graph (class)">Graph</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Node</span>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div id="search">
|
47
|
-
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="../../class_list.html">
|
50
|
-
|
51
|
-
<svg width="24" height="24">
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
-
</svg>
|
56
|
-
</a>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div id="content"><h1>Class: SimpleGraph::Graph::Node
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName">Object</span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li>Object</li>
|
76
|
-
|
77
|
-
<li class="next">SimpleGraph::Graph::Node</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<dl>
|
96
|
-
<dt>Defined in:</dt>
|
97
|
-
<dd>lib/simple_graph.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
<h2>Overview</h2><div class="docstring">
|
103
|
-
<div class="discussion">
|
104
|
-
<p>A internal class representing a single vertex/node inside a graph</p>
|
105
|
-
|
106
|
-
|
107
|
-
</div>
|
108
|
-
</div>
|
109
|
-
<div class="tags">
|
110
|
-
|
111
|
-
|
112
|
-
</div>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
117
|
-
<ul class="summary">
|
118
|
-
|
119
|
-
<li class="public ">
|
120
|
-
<span class="summary_signature">
|
121
|
-
|
122
|
-
<a href="#data-instance_method" title="#data (instance method)">#<strong>data</strong> ⇒ Object </a>
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
</span>
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<span class="note title readonly">readonly</span>
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute data.</p>
|
142
|
-
</div></span>
|
143
|
-
|
144
|
-
</li>
|
145
|
-
|
146
|
-
|
147
|
-
<li class="public ">
|
148
|
-
<span class="summary_signature">
|
149
|
-
|
150
|
-
<a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> ⇒ Object </a>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
</span>
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
<span class="note title readonly">readonly</span>
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute id.</p>
|
170
|
-
</div></span>
|
171
|
-
|
172
|
-
</li>
|
173
|
-
|
174
|
-
|
175
|
-
<li class="public ">
|
176
|
-
<span class="summary_signature">
|
177
|
-
|
178
|
-
<a href="#neighbors-instance_method" title="#neighbors (instance method)">#<strong>neighbors</strong> ⇒ Object </a>
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
</span>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
<span class="note title readonly">readonly</span>
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute neighbors.</p>
|
198
|
-
</div></span>
|
199
|
-
|
200
|
-
</li>
|
201
|
-
|
202
|
-
|
203
|
-
</ul>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
<h2>
|
210
|
-
Instance Method Summary
|
211
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
212
|
-
</h2>
|
213
|
-
|
214
|
-
<ul class="summary">
|
215
|
-
|
216
|
-
<li class="public ">
|
217
|
-
<span class="summary_signature">
|
218
|
-
|
219
|
-
<a href="#add_neighbor-instance_method" title="#add_neighbor (instance method)">#<strong>add_neighbor</strong>(node) ⇒ Object </a>
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
</span>
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
<span class="summary_desc"><div class='inline'><p>Adds a neighbor to the given node.</p>
|
234
|
-
</div></span>
|
235
|
-
|
236
|
-
</li>
|
237
|
-
|
238
|
-
|
239
|
-
<li class="public ">
|
240
|
-
<span class="summary_signature">
|
241
|
-
|
242
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(id:, data:) ⇒ Node </a>
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
</span>
|
247
|
-
|
248
|
-
|
249
|
-
<span class="note title constructor">constructor</span>
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
<span class="summary_desc"><div class='inline'><p>A new instance of Node.</p>
|
259
|
-
</div></span>
|
260
|
-
|
261
|
-
</li>
|
262
|
-
|
263
|
-
|
264
|
-
</ul>
|
265
|
-
|
266
|
-
|
267
|
-
<div id="constructor_details" class="method_details_list">
|
268
|
-
<h2>Constructor Details</h2>
|
269
|
-
|
270
|
-
<div class="method_details first">
|
271
|
-
<h3 class="signature first" id="initialize-instance_method">
|
272
|
-
|
273
|
-
#<strong>initialize</strong>(id:, data:) ⇒ <tt><span class='object_link'><a href="" title="SimpleGraph::Graph::Node (class)">Node</a></span></tt>
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
</h3><div class="docstring">
|
280
|
-
<div class="discussion">
|
281
|
-
<p>Returns a new instance of Node</p>
|
282
|
-
|
283
|
-
|
284
|
-
</div>
|
285
|
-
</div>
|
286
|
-
<div class="tags">
|
287
|
-
|
288
|
-
|
289
|
-
</div><table class="source_code">
|
290
|
-
<tr>
|
291
|
-
<td>
|
292
|
-
<pre class="lines">
|
293
|
-
|
294
|
-
|
295
|
-
10
|
296
|
-
11
|
297
|
-
12
|
298
|
-
13
|
299
|
-
14</pre>
|
300
|
-
</td>
|
301
|
-
<td>
|
302
|
-
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 10</span>
|
303
|
-
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: SimpleGraph::Graph::Node
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "SimpleGraph::Graph::Node";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (N)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../SimpleGraph.html" title="SimpleGraph (module)">SimpleGraph</a></span></span> » <span class='title'><span class='object_link'><a href="../Graph.html" title="SimpleGraph::Graph (class)">Graph</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Node</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: SimpleGraph::Graph::Node
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">SimpleGraph::Graph::Node</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/simple_graph.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
<p>A internal class representing a single vertex/node inside a graph</p>
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
<div class="tags">
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
117
|
+
<ul class="summary">
|
118
|
+
|
119
|
+
<li class="public ">
|
120
|
+
<span class="summary_signature">
|
121
|
+
|
122
|
+
<a href="#data-instance_method" title="#data (instance method)">#<strong>data</strong> ⇒ Object </a>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
</span>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="note title readonly">readonly</span>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute data.</p>
|
142
|
+
</div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> ⇒ Object </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<span class="note title readonly">readonly</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute id.</p>
|
170
|
+
</div></span>
|
171
|
+
|
172
|
+
</li>
|
173
|
+
|
174
|
+
|
175
|
+
<li class="public ">
|
176
|
+
<span class="summary_signature">
|
177
|
+
|
178
|
+
<a href="#neighbors-instance_method" title="#neighbors (instance method)">#<strong>neighbors</strong> ⇒ Object </a>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
</span>
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<span class="note title readonly">readonly</span>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute neighbors.</p>
|
198
|
+
</div></span>
|
199
|
+
|
200
|
+
</li>
|
201
|
+
|
202
|
+
|
203
|
+
</ul>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<h2>
|
210
|
+
Instance Method Summary
|
211
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
212
|
+
</h2>
|
213
|
+
|
214
|
+
<ul class="summary">
|
215
|
+
|
216
|
+
<li class="public ">
|
217
|
+
<span class="summary_signature">
|
218
|
+
|
219
|
+
<a href="#add_neighbor-instance_method" title="#add_neighbor (instance method)">#<strong>add_neighbor</strong>(node) ⇒ Object </a>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</span>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'><p>Adds a neighbor to the given node.</p>
|
234
|
+
</div></span>
|
235
|
+
|
236
|
+
</li>
|
237
|
+
|
238
|
+
|
239
|
+
<li class="public ">
|
240
|
+
<span class="summary_signature">
|
241
|
+
|
242
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(id:, data:) ⇒ Node </a>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
</span>
|
247
|
+
|
248
|
+
|
249
|
+
<span class="note title constructor">constructor</span>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
<span class="summary_desc"><div class='inline'><p>A new instance of Node.</p>
|
259
|
+
</div></span>
|
260
|
+
|
261
|
+
</li>
|
262
|
+
|
263
|
+
|
264
|
+
</ul>
|
265
|
+
|
266
|
+
|
267
|
+
<div id="constructor_details" class="method_details_list">
|
268
|
+
<h2>Constructor Details</h2>
|
269
|
+
|
270
|
+
<div class="method_details first">
|
271
|
+
<h3 class="signature first" id="initialize-instance_method">
|
272
|
+
|
273
|
+
#<strong>initialize</strong>(id:, data:) ⇒ <tt><span class='object_link'><a href="" title="SimpleGraph::Graph::Node (class)">Node</a></span></tt>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
</h3><div class="docstring">
|
280
|
+
<div class="discussion">
|
281
|
+
<p>Returns a new instance of Node</p>
|
282
|
+
|
283
|
+
|
284
|
+
</div>
|
285
|
+
</div>
|
286
|
+
<div class="tags">
|
287
|
+
|
288
|
+
|
289
|
+
</div><table class="source_code">
|
290
|
+
<tr>
|
291
|
+
<td>
|
292
|
+
<pre class="lines">
|
293
|
+
|
294
|
+
|
295
|
+
10
|
296
|
+
11
|
297
|
+
12
|
298
|
+
13
|
299
|
+
14</pre>
|
300
|
+
</td>
|
301
|
+
<td>
|
302
|
+
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 10</span>
|
303
|
+
|
304
304
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>id:</span><span class='comma'>,</span> <span class='label'>data:</span><span class='rparen'>)</span>
|
305
305
|
<span class='ivar'>@data</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span>
|
306
306
|
<span class='ivar'>@neighbors</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
307
307
|
<span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_id'>id</span>
|
308
|
-
<span class='kw'>end</span></pre>
|
309
|
-
</td>
|
310
|
-
</tr>
|
311
|
-
</table>
|
312
|
-
</div>
|
313
|
-
|
314
|
-
</div>
|
315
|
-
|
316
|
-
<div id="instance_attr_details" class="attr_details">
|
317
|
-
<h2>Instance Attribute Details</h2>
|
318
|
-
|
319
|
-
|
320
|
-
<span id=""></span>
|
321
|
-
<div class="method_details first">
|
322
|
-
<h3 class="signature first" id="data-instance_method">
|
323
|
-
|
324
|
-
#<strong>data</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
</h3><div class="docstring">
|
331
|
-
<div class="discussion">
|
332
|
-
<p>Returns the value of attribute data</p>
|
333
|
-
|
334
|
-
|
335
|
-
</div>
|
336
|
-
</div>
|
337
|
-
<div class="tags">
|
338
|
-
|
339
|
-
|
340
|
-
</div><table class="source_code">
|
341
|
-
<tr>
|
342
|
-
<td>
|
343
|
-
<pre class="lines">
|
344
|
-
|
345
|
-
|
346
|
-
22
|
347
|
-
23
|
348
|
-
24</pre>
|
349
|
-
</td>
|
350
|
-
<td>
|
351
|
-
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 22</span>
|
352
|
-
|
353
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_data'>data</span>
|
354
|
-
<span class='ivar'>@data</span>
|
355
|
-
<span class='kw'>end</span></pre>
|
356
|
-
</td>
|
357
|
-
</tr>
|
358
|
-
</table>
|
359
|
-
</div>
|
360
|
-
|
361
|
-
|
362
|
-
<span id=""></span>
|
363
|
-
<div class="method_details ">
|
364
|
-
<h3 class="signature " id="id-instance_method">
|
365
|
-
|
366
|
-
#<strong>id</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
</h3><div class="docstring">
|
373
|
-
<div class="discussion">
|
374
|
-
<p>Returns the value of attribute id</p>
|
375
|
-
|
376
|
-
|
377
|
-
</div>
|
378
|
-
</div>
|
379
|
-
<div class="tags">
|
380
|
-
|
381
|
-
|
382
|
-
</div><table class="source_code">
|
383
|
-
<tr>
|
384
|
-
<td>
|
385
|
-
<pre class="lines">
|
386
|
-
|
387
|
-
|
388
|
-
23
|
389
|
-
24
|
390
|
-
25</pre>
|
391
|
-
</td>
|
392
|
-
<td>
|
393
|
-
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 23</span>
|
394
|
-
|
395
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
396
|
-
<span class='ivar'>@id</span>
|
397
|
-
<span class='kw'>end</span></pre>
|
398
|
-
</td>
|
399
|
-
</tr>
|
400
|
-
</table>
|
401
|
-
</div>
|
402
|
-
|
403
|
-
|
404
|
-
<span id=""></span>
|
405
|
-
<div class="method_details ">
|
406
|
-
<h3 class="signature " id="neighbors-instance_method">
|
407
|
-
|
408
|
-
#<strong>neighbors</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
</h3><div class="docstring">
|
415
|
-
<div class="discussion">
|
416
|
-
<p>Returns the value of attribute neighbors</p>
|
417
|
-
|
418
|
-
|
419
|
-
</div>
|
420
|
-
</div>
|
421
|
-
<div class="tags">
|
422
|
-
|
423
|
-
|
424
|
-
</div><table class="source_code">
|
425
|
-
<tr>
|
426
|
-
<td>
|
427
|
-
<pre class="lines">
|
428
|
-
|
429
|
-
|
430
|
-
21
|
431
|
-
22
|
432
|
-
23</pre>
|
433
|
-
</td>
|
434
|
-
<td>
|
435
|
-
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 21</span>
|
436
|
-
|
437
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_neighbors'>neighbors</span>
|
438
|
-
<span class='ivar'>@neighbors</span>
|
439
|
-
<span class='kw'>end</span></pre>
|
440
|
-
</td>
|
441
|
-
</tr>
|
442
|
-
</table>
|
443
|
-
</div>
|
444
|
-
|
445
|
-
</div>
|
446
|
-
|
447
|
-
|
448
|
-
<div id="instance_method_details" class="method_details_list">
|
449
|
-
<h2>Instance Method Details</h2>
|
450
|
-
|
451
|
-
|
452
|
-
<div class="method_details first">
|
453
|
-
<h3 class="signature first" id="add_neighbor-instance_method">
|
454
|
-
|
455
|
-
#<strong>add_neighbor</strong>(node) ⇒ <tt>Object</tt>
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
</h3><div class="docstring">
|
462
|
-
<div class="discussion">
|
463
|
-
<p>Adds a neighbor to the given node</p>
|
464
|
-
|
465
|
-
|
466
|
-
</div>
|
467
|
-
</div>
|
468
|
-
<div class="tags">
|
469
|
-
|
470
|
-
|
471
|
-
</div><table class="source_code">
|
472
|
-
<tr>
|
473
|
-
<td>
|
474
|
-
<pre class="lines">
|
475
|
-
|
476
|
-
|
477
|
-
17
|
478
|
-
18
|
479
|
-
19</pre>
|
480
|
-
</td>
|
481
|
-
<td>
|
482
|
-
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 17</span>
|
483
|
-
|
308
|
+
<span class='kw'>end</span></pre>
|
309
|
+
</td>
|
310
|
+
</tr>
|
311
|
+
</table>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
</div>
|
315
|
+
|
316
|
+
<div id="instance_attr_details" class="attr_details">
|
317
|
+
<h2>Instance Attribute Details</h2>
|
318
|
+
|
319
|
+
|
320
|
+
<span id=""></span>
|
321
|
+
<div class="method_details first">
|
322
|
+
<h3 class="signature first" id="data-instance_method">
|
323
|
+
|
324
|
+
#<strong>data</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
</h3><div class="docstring">
|
331
|
+
<div class="discussion">
|
332
|
+
<p>Returns the value of attribute data</p>
|
333
|
+
|
334
|
+
|
335
|
+
</div>
|
336
|
+
</div>
|
337
|
+
<div class="tags">
|
338
|
+
|
339
|
+
|
340
|
+
</div><table class="source_code">
|
341
|
+
<tr>
|
342
|
+
<td>
|
343
|
+
<pre class="lines">
|
344
|
+
|
345
|
+
|
346
|
+
22
|
347
|
+
23
|
348
|
+
24</pre>
|
349
|
+
</td>
|
350
|
+
<td>
|
351
|
+
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 22</span>
|
352
|
+
|
353
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_data'>data</span>
|
354
|
+
<span class='ivar'>@data</span>
|
355
|
+
<span class='kw'>end</span></pre>
|
356
|
+
</td>
|
357
|
+
</tr>
|
358
|
+
</table>
|
359
|
+
</div>
|
360
|
+
|
361
|
+
|
362
|
+
<span id=""></span>
|
363
|
+
<div class="method_details ">
|
364
|
+
<h3 class="signature " id="id-instance_method">
|
365
|
+
|
366
|
+
#<strong>id</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
</h3><div class="docstring">
|
373
|
+
<div class="discussion">
|
374
|
+
<p>Returns the value of attribute id</p>
|
375
|
+
|
376
|
+
|
377
|
+
</div>
|
378
|
+
</div>
|
379
|
+
<div class="tags">
|
380
|
+
|
381
|
+
|
382
|
+
</div><table class="source_code">
|
383
|
+
<tr>
|
384
|
+
<td>
|
385
|
+
<pre class="lines">
|
386
|
+
|
387
|
+
|
388
|
+
23
|
389
|
+
24
|
390
|
+
25</pre>
|
391
|
+
</td>
|
392
|
+
<td>
|
393
|
+
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 23</span>
|
394
|
+
|
395
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
396
|
+
<span class='ivar'>@id</span>
|
397
|
+
<span class='kw'>end</span></pre>
|
398
|
+
</td>
|
399
|
+
</tr>
|
400
|
+
</table>
|
401
|
+
</div>
|
402
|
+
|
403
|
+
|
404
|
+
<span id=""></span>
|
405
|
+
<div class="method_details ">
|
406
|
+
<h3 class="signature " id="neighbors-instance_method">
|
407
|
+
|
408
|
+
#<strong>neighbors</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
</h3><div class="docstring">
|
415
|
+
<div class="discussion">
|
416
|
+
<p>Returns the value of attribute neighbors</p>
|
417
|
+
|
418
|
+
|
419
|
+
</div>
|
420
|
+
</div>
|
421
|
+
<div class="tags">
|
422
|
+
|
423
|
+
|
424
|
+
</div><table class="source_code">
|
425
|
+
<tr>
|
426
|
+
<td>
|
427
|
+
<pre class="lines">
|
428
|
+
|
429
|
+
|
430
|
+
21
|
431
|
+
22
|
432
|
+
23</pre>
|
433
|
+
</td>
|
434
|
+
<td>
|
435
|
+
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 21</span>
|
436
|
+
|
437
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_neighbors'>neighbors</span>
|
438
|
+
<span class='ivar'>@neighbors</span>
|
439
|
+
<span class='kw'>end</span></pre>
|
440
|
+
</td>
|
441
|
+
</tr>
|
442
|
+
</table>
|
443
|
+
</div>
|
444
|
+
|
445
|
+
</div>
|
446
|
+
|
447
|
+
|
448
|
+
<div id="instance_method_details" class="method_details_list">
|
449
|
+
<h2>Instance Method Details</h2>
|
450
|
+
|
451
|
+
|
452
|
+
<div class="method_details first">
|
453
|
+
<h3 class="signature first" id="add_neighbor-instance_method">
|
454
|
+
|
455
|
+
#<strong>add_neighbor</strong>(node) ⇒ <tt>Object</tt>
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
</h3><div class="docstring">
|
462
|
+
<div class="discussion">
|
463
|
+
<p>Adds a neighbor to the given node</p>
|
464
|
+
|
465
|
+
|
466
|
+
</div>
|
467
|
+
</div>
|
468
|
+
<div class="tags">
|
469
|
+
|
470
|
+
|
471
|
+
</div><table class="source_code">
|
472
|
+
<tr>
|
473
|
+
<td>
|
474
|
+
<pre class="lines">
|
475
|
+
|
476
|
+
|
477
|
+
17
|
478
|
+
18
|
479
|
+
19</pre>
|
480
|
+
</td>
|
481
|
+
<td>
|
482
|
+
<pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 17</span>
|
483
|
+
|
484
484
|
<span class='kw'>def</span> <span class='id identifier rubyid_add_neighbor'>add_neighbor</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
485
485
|
<span class='ivar'>@neighbors</span> <span class='op'><<</span> <span class='id identifier rubyid_node'>node</span>
|
486
|
-
<span class='kw'>end</span></pre>
|
487
|
-
</td>
|
488
|
-
</tr>
|
489
|
-
</table>
|
490
|
-
</div>
|
491
|
-
|
492
|
-
</div>
|
493
|
-
|
494
|
-
</div>
|
495
|
-
|
496
|
-
<div id="footer">
|
497
|
-
Generated on
|
498
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
499
|
-
0.9.9 (ruby-2.3.1).
|
500
|
-
</div>
|
501
|
-
|
502
|
-
</div>
|
503
|
-
</body>
|
486
|
+
<span class='kw'>end</span></pre>
|
487
|
+
</td>
|
488
|
+
</tr>
|
489
|
+
</table>
|
490
|
+
</div>
|
491
|
+
|
492
|
+
</div>
|
493
|
+
|
494
|
+
</div>
|
495
|
+
|
496
|
+
<div id="footer">
|
497
|
+
Generated on Wed Dec 6 15:09:43 2017 by
|
498
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
499
|
+
0.9.9 (ruby-2.3.1).
|
500
|
+
</div>
|
501
|
+
|
502
|
+
</div>
|
503
|
+
</body>
|
504
504
|
</html>
|