simple_graph 0.1.0

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.
@@ -0,0 +1,483 @@
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
+ &mdash; 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> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../SimpleGraph.html" title="SimpleGraph (module)">SimpleGraph</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Graph.html" title="SimpleGraph::Graph (class)">Graph</a></span></span>
41
+ &raquo;
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
+
103
+
104
+
105
+
106
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
107
+ <ul class="summary">
108
+
109
+ <li class="public ">
110
+ <span class="summary_signature">
111
+
112
+ <a href="#data-instance_method" title="#data (instance method)">#<strong>data</strong> &#x21d2; Object </a>
113
+
114
+
115
+
116
+ </span>
117
+
118
+
119
+
120
+
121
+ <span class="note title readonly">readonly</span>
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute data.</p>
132
+ </div></span>
133
+
134
+ </li>
135
+
136
+
137
+ <li class="public ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> &#x21d2; Object </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+
148
+
149
+ <span class="note title readonly">readonly</span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute id.</p>
160
+ </div></span>
161
+
162
+ </li>
163
+
164
+
165
+ <li class="public ">
166
+ <span class="summary_signature">
167
+
168
+ <a href="#neighbors-instance_method" title="#neighbors (instance method)">#<strong>neighbors</strong> &#x21d2; Object </a>
169
+
170
+
171
+
172
+ </span>
173
+
174
+
175
+
176
+
177
+ <span class="note title readonly">readonly</span>
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute neighbors.</p>
188
+ </div></span>
189
+
190
+ </li>
191
+
192
+
193
+ </ul>
194
+
195
+
196
+
197
+
198
+
199
+ <h2>
200
+ Instance Method Summary
201
+ <small><a href="#" class="summary_toggle">collapse</a></small>
202
+ </h2>
203
+
204
+ <ul class="summary">
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature">
208
+
209
+ <a href="#add_neighbor-instance_method" title="#add_neighbor (instance method)">#<strong>add_neighbor</strong>(node) &#x21d2; Object </a>
210
+
211
+
212
+
213
+ </span>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+ <span class="summary_desc"><div class='inline'></div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="public ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(id:, data:) &#x21d2; Node </a>
232
+
233
+
234
+
235
+ </span>
236
+
237
+
238
+ <span class="note title constructor">constructor</span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+ <span class="summary_desc"><div class='inline'><p>A new instance of Node.</p>
248
+ </div></span>
249
+
250
+ </li>
251
+
252
+
253
+ </ul>
254
+
255
+
256
+ <div id="constructor_details" class="method_details_list">
257
+ <h2>Constructor Details</h2>
258
+
259
+ <div class="method_details first">
260
+ <h3 class="signature first" id="initialize-instance_method">
261
+
262
+ #<strong>initialize</strong>(id:, data:) &#x21d2; <tt><span class='object_link'><a href="" title="SimpleGraph::Graph::Node (class)">Node</a></span></tt>
263
+
264
+
265
+
266
+
267
+
268
+ </h3><div class="docstring">
269
+ <div class="discussion">
270
+ <p>Returns a new instance of Node</p>
271
+
272
+
273
+ </div>
274
+ </div>
275
+ <div class="tags">
276
+
277
+
278
+ </div><table class="source_code">
279
+ <tr>
280
+ <td>
281
+ <pre class="lines">
282
+
283
+
284
+ 6
285
+ 7
286
+ 8
287
+ 9
288
+ 10</pre>
289
+ </td>
290
+ <td>
291
+ <pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 6</span>
292
+
293
+ <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>
294
+ <span class='ivar'>@data</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span>
295
+ <span class='ivar'>@neighbors</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
296
+ <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_id'>id</span>
297
+ <span class='kw'>end</span></pre>
298
+ </td>
299
+ </tr>
300
+ </table>
301
+ </div>
302
+
303
+ </div>
304
+
305
+ <div id="instance_attr_details" class="attr_details">
306
+ <h2>Instance Attribute Details</h2>
307
+
308
+
309
+ <span id=""></span>
310
+ <div class="method_details first">
311
+ <h3 class="signature first" id="data-instance_method">
312
+
313
+ #<strong>data</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
314
+
315
+
316
+
317
+
318
+
319
+ </h3><div class="docstring">
320
+ <div class="discussion">
321
+ <p>Returns the value of attribute data</p>
322
+
323
+
324
+ </div>
325
+ </div>
326
+ <div class="tags">
327
+
328
+
329
+ </div><table class="source_code">
330
+ <tr>
331
+ <td>
332
+ <pre class="lines">
333
+
334
+
335
+ 17
336
+ 18
337
+ 19</pre>
338
+ </td>
339
+ <td>
340
+ <pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 17</span>
341
+
342
+ <span class='kw'>def</span> <span class='id identifier rubyid_data'>data</span>
343
+ <span class='ivar'>@data</span>
344
+ <span class='kw'>end</span></pre>
345
+ </td>
346
+ </tr>
347
+ </table>
348
+ </div>
349
+
350
+
351
+ <span id=""></span>
352
+ <div class="method_details ">
353
+ <h3 class="signature " id="id-instance_method">
354
+
355
+ #<strong>id</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
356
+
357
+
358
+
359
+
360
+
361
+ </h3><div class="docstring">
362
+ <div class="discussion">
363
+ <p>Returns the value of attribute id</p>
364
+
365
+
366
+ </div>
367
+ </div>
368
+ <div class="tags">
369
+
370
+
371
+ </div><table class="source_code">
372
+ <tr>
373
+ <td>
374
+ <pre class="lines">
375
+
376
+
377
+ 18
378
+ 19
379
+ 20</pre>
380
+ </td>
381
+ <td>
382
+ <pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 18</span>
383
+
384
+ <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
385
+ <span class='ivar'>@id</span>
386
+ <span class='kw'>end</span></pre>
387
+ </td>
388
+ </tr>
389
+ </table>
390
+ </div>
391
+
392
+
393
+ <span id=""></span>
394
+ <div class="method_details ">
395
+ <h3 class="signature " id="neighbors-instance_method">
396
+
397
+ #<strong>neighbors</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
398
+
399
+
400
+
401
+
402
+
403
+ </h3><div class="docstring">
404
+ <div class="discussion">
405
+ <p>Returns the value of attribute neighbors</p>
406
+
407
+
408
+ </div>
409
+ </div>
410
+ <div class="tags">
411
+
412
+
413
+ </div><table class="source_code">
414
+ <tr>
415
+ <td>
416
+ <pre class="lines">
417
+
418
+
419
+ 16
420
+ 17
421
+ 18</pre>
422
+ </td>
423
+ <td>
424
+ <pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 16</span>
425
+
426
+ <span class='kw'>def</span> <span class='id identifier rubyid_neighbors'>neighbors</span>
427
+ <span class='ivar'>@neighbors</span>
428
+ <span class='kw'>end</span></pre>
429
+ </td>
430
+ </tr>
431
+ </table>
432
+ </div>
433
+
434
+ </div>
435
+
436
+
437
+ <div id="instance_method_details" class="method_details_list">
438
+ <h2>Instance Method Details</h2>
439
+
440
+
441
+ <div class="method_details first">
442
+ <h3 class="signature first" id="add_neighbor-instance_method">
443
+
444
+ #<strong>add_neighbor</strong>(node) &#x21d2; <tt>Object</tt>
445
+
446
+
447
+
448
+
449
+
450
+ </h3><table class="source_code">
451
+ <tr>
452
+ <td>
453
+ <pre class="lines">
454
+
455
+
456
+ 12
457
+ 13
458
+ 14</pre>
459
+ </td>
460
+ <td>
461
+ <pre class="code"><span class="info file"># File 'lib/simple_graph.rb', line 12</span>
462
+
463
+ <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>
464
+ <span class='ivar'>@neighbors</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_node'>node</span>
465
+ <span class='kw'>end</span></pre>
466
+ </td>
467
+ </tr>
468
+ </table>
469
+ </div>
470
+
471
+ </div>
472
+
473
+ </div>
474
+
475
+ <div id="footer">
476
+ Generated on Thu Nov 23 18:04:53 2017 by
477
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
478
+ 0.9.9 (ruby-2.3.1).
479
+ </div>
480
+
481
+ </div>
482
+ </body>
483
+ </html>