p10lppt13 1.0.0 → 1.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.
Files changed (131) hide show
  1. data/.gitignore +0 -2
  2. data/.travis.yml +0 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/doc/Densa.html +451 -0
  5. data/lib/doc/Dispersa.html +462 -0
  6. data/lib/doc/Fraccion.html +1023 -0
  7. data/lib/doc/Matriz.html +985 -0
  8. data/lib/doc/Object.html +349 -0
  9. data/lib/doc/P10lppt13.html +303 -0
  10. data/lib/doc/VectorDisperso.html +444 -0
  11. data/lib/doc/created.rid +89 -0
  12. data/lib/doc/doc/Densa_html.html +659 -0
  13. data/lib/doc/doc/Dispersa_html.html +669 -0
  14. data/lib/doc/doc/Fraccion_html.html +1193 -0
  15. data/lib/doc/doc/Matriz_html.html +1159 -0
  16. data/lib/doc/doc/Object_html.html +557 -0
  17. data/lib/doc/doc/P10lppt13_html.html +509 -0
  18. data/lib/doc/doc/VectorDisperso_html.html +646 -0
  19. data/lib/doc/doc/created_rid.html +336 -0
  20. data/lib/doc/doc/doc/Densa_html_html.html +908 -0
  21. data/lib/doc/doc/doc/Dispersa_html_html.html +949 -0
  22. data/lib/doc/doc/doc/Fraccion_html_html.html +1713 -0
  23. data/lib/doc/doc/doc/Matriz_html_html.html +1684 -0
  24. data/lib/doc/doc/doc/Object_html_html.html +816 -0
  25. data/lib/doc/doc/doc/P10lppt13_html_html.html +754 -0
  26. data/lib/doc/doc/doc/VectorDisperso_html_html.html +887 -0
  27. data/lib/doc/doc/doc/created_rid_html.html +536 -0
  28. data/lib/doc/doc/doc/doc/Densa_html_html_html.html +1191 -0
  29. data/lib/doc/doc/doc/doc/Dispersa_html_html_html.html +1260 -0
  30. data/lib/doc/doc/doc/doc/Fraccion_html_html_html.html +2174 -0
  31. data/lib/doc/doc/doc/doc/Matriz_html_html_html.html +2235 -0
  32. data/lib/doc/doc/doc/doc/Object_html_html_html.html +1099 -0
  33. data/lib/doc/doc/doc/doc/P10lppt13_html_html_html.html +1028 -0
  34. data/lib/doc/doc/doc/doc/VectorDisperso_html_html_html.html +1168 -0
  35. data/lib/doc/doc/doc/doc/created_rid_html_html.html +722 -0
  36. data/lib/doc/doc/doc/doc/doc/Densa_html_html_html_html.html +1424 -0
  37. data/lib/doc/doc/doc/doc/doc/Dispersa_html_html_html_html.html +1502 -0
  38. data/lib/doc/doc/doc/doc/doc/Fraccion_html_html_html_html.html +2619 -0
  39. data/lib/doc/doc/doc/doc/doc/Matriz_html_html_html_html.html +2764 -0
  40. data/lib/doc/doc/doc/doc/doc/Object_html_html_html_html.html +1315 -0
  41. data/lib/doc/doc/doc/doc/doc/P10lppt13_html_html_html_html.html +1227 -0
  42. data/lib/doc/doc/doc/doc/doc/VectorDisperso_html_html_html_html.html +1403 -0
  43. data/lib/doc/doc/doc/doc/doc/created_rid_html_html_html.html +920 -0
  44. data/lib/doc/doc/doc/doc/doc/doc/created_rid_html_html_html_html.html +1089 -0
  45. data/lib/doc/doc/doc/doc/doc/fraccion_rb~_html_html_html_html.html +1754 -0
  46. data/lib/doc/doc/doc/doc/doc/index_html_html_html_html.html +1086 -0
  47. data/lib/doc/doc/doc/doc/doc/js/darkfish_js_html_html_html.html +1207 -0
  48. data/lib/doc/doc/doc/doc/doc/js/jquery_js_html_html_html.html +3210 -0
  49. data/lib/doc/doc/doc/doc/doc/js/navigation_js_html_html_html.html +1122 -0
  50. data/lib/doc/doc/doc/doc/doc/js/search_index_js_html_html_html.html +1031 -0
  51. data/lib/doc/doc/doc/doc/doc/js/search_js_html_html_html.html +1058 -0
  52. data/lib/doc/doc/doc/doc/doc/js/searcher_js_html_html_html.html +1295 -0
  53. data/lib/doc/doc/doc/doc/doc/rdoc_css_html_html_html.html +1827 -0
  54. data/lib/doc/doc/doc/doc/doc/table_of_contents_html_html_html_html.html +1727 -0
  55. data/lib/doc/doc/doc/doc/fraccion_rb~_html_html_html.html +1509 -0
  56. data/lib/doc/doc/doc/doc/index_html_html_html.html +911 -0
  57. data/lib/doc/doc/doc/doc/js/darkfish_js_html_html.html +920 -0
  58. data/lib/doc/doc/doc/doc/js/jquery_js_html_html.html +2908 -0
  59. data/lib/doc/doc/doc/doc/js/navigation_js_html_html.html +852 -0
  60. data/lib/doc/doc/doc/doc/js/search_index_js_html_html.html +889 -0
  61. data/lib/doc/doc/doc/doc/js/search_js_html_html.html +802 -0
  62. data/lib/doc/doc/doc/doc/js/searcher_js_html_html.html +975 -0
  63. data/lib/doc/doc/doc/doc/p10lppt13_rb~_html_html_html.html +1996 -0
  64. data/lib/doc/doc/doc/doc/rdoc_css_html_html.html +1443 -0
  65. data/lib/doc/doc/doc/doc/table_of_contents_html_html_html.html +1503 -0
  66. data/lib/doc/doc/doc/fraccion_rb~_html_html.html +1052 -0
  67. data/lib/doc/doc/doc/index_html_html.html +669 -0
  68. data/lib/doc/doc/doc/js/darkfish_js_html.html +667 -0
  69. data/lib/doc/doc/doc/js/jquery_js_html.html +213 -0
  70. data/lib/doc/doc/doc/js/navigation_js_html.html +557 -0
  71. data/lib/doc/doc/doc/js/search_index_js_html.html +589 -0
  72. data/lib/doc/doc/doc/js/search_js_html.html +499 -0
  73. data/lib/doc/doc/doc/js/searcher_js_html.html +655 -0
  74. data/lib/doc/doc/doc/p10lppt13_rb~_html_html.html +1361 -0
  75. data/lib/doc/doc/doc/rdoc_css_html.html +1039 -0
  76. data/lib/doc/doc/doc/table_of_contents_html_html.html +1134 -0
  77. data/lib/doc/doc/fraccion_rb~_html.html +582 -0
  78. data/lib/doc/doc/index_html.html +389 -0
  79. data/lib/doc/doc/js/darkfish_js.html +386 -0
  80. data/lib/doc/doc/js/jquery_js.html +1611 -0
  81. data/lib/doc/doc/js/navigation_js.html +354 -0
  82. data/lib/doc/doc/js/search_index_js.html +427 -0
  83. data/lib/doc/doc/js/search_js.html +308 -0
  84. data/lib/doc/doc/js/searcher_js.html +441 -0
  85. data/lib/doc/doc/p10lppt13_rb~_html.html +810 -0
  86. data/lib/doc/doc/rdoc_css.html +939 -0
  87. data/lib/doc/doc/table_of_contents_html.html +489 -0
  88. data/lib/doc/fraccion_rb~.html +356 -0
  89. data/lib/doc/images/add.png +0 -0
  90. data/lib/doc/images/arrow_up.png +0 -0
  91. data/lib/doc/images/brick.png +0 -0
  92. data/lib/doc/images/brick_link.png +0 -0
  93. data/lib/doc/images/bug.png +0 -0
  94. data/lib/doc/images/bullet_black.png +0 -0
  95. data/lib/doc/images/bullet_toggle_minus.png +0 -0
  96. data/lib/doc/images/bullet_toggle_plus.png +0 -0
  97. data/lib/doc/images/date.png +0 -0
  98. data/lib/doc/images/delete.png +0 -0
  99. data/lib/doc/images/find.png +0 -0
  100. data/lib/doc/images/loadingAnimation.gif +0 -0
  101. data/lib/doc/images/macFFBgHack.png +0 -0
  102. data/lib/doc/images/package.png +0 -0
  103. data/lib/doc/images/page_green.png +0 -0
  104. data/lib/doc/images/page_white_text.png +0 -0
  105. data/lib/doc/images/page_white_width.png +0 -0
  106. data/lib/doc/images/plugin.png +0 -0
  107. data/lib/doc/images/ruby.png +0 -0
  108. data/lib/doc/images/tag_blue.png +0 -0
  109. data/lib/doc/images/tag_green.png +0 -0
  110. data/lib/doc/images/transparent.png +0 -0
  111. data/lib/doc/images/wrench.png +0 -0
  112. data/lib/doc/images/wrench_orange.png +0 -0
  113. data/lib/doc/images/zoom.png +0 -0
  114. data/lib/doc/index.html +248 -0
  115. data/lib/doc/js/darkfish.js +155 -0
  116. data/lib/doc/js/jquery.js +18 -0
  117. data/lib/doc/js/navigation.js +142 -0
  118. data/lib/doc/js/search.js +94 -0
  119. data/lib/doc/js/search_index.js +1 -0
  120. data/lib/doc/js/searcher.js +228 -0
  121. data/lib/doc/p10lppt13_rb~.html +522 -0
  122. data/lib/doc/rdoc.css +595 -0
  123. data/lib/doc/table_of_contents.html +360 -0
  124. data/lib/fraccion.rb +18 -3
  125. data/lib/p10lppt13.rb +71 -41
  126. data/lib/p10lppt13/version.rb +3 -1
  127. data/spec/p10lppt13_spec.rb +16 -6
  128. data/test/tc_p10lppt13.rb +2 -0
  129. metadata +166 -26
  130. checksums.yaml +0 -7
  131. data/lib/gcd.rb +0 -7
@@ -0,0 +1,360 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Table of Contents - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body class="indexpage">
24
+ <h1>Table of Contents - RDoc Documentation</h1>
25
+
26
+ <h2>Pages</h2>
27
+ <ul>
28
+ <li class="file">
29
+ <a href="doc/Densa_html.html">Densa.html</a>
30
+ </li>
31
+ <li class="file">
32
+ <a href="doc/Dispersa_html.html">Dispersa.html</a>
33
+ </li>
34
+ <li class="file">
35
+ <a href="doc/Fraccion_html.html">Fraccion.html</a>
36
+ </li>
37
+ <li class="file">
38
+ <a href="doc/Matriz_html.html">Matriz.html</a>
39
+ </li>
40
+ <li class="file">
41
+ <a href="doc/Object_html.html">Object.html</a>
42
+ </li>
43
+ <li class="file">
44
+ <a href="doc/P10lppt13_html.html">P10lppt13.html</a>
45
+ </li>
46
+ <li class="file">
47
+ <a href="doc/VectorDisperso_html.html">VectorDisperso.html</a>
48
+ </li>
49
+ <li class="file">
50
+ <a href="doc/created_rid.html">created.rid</a>
51
+ </li>
52
+ <li class="file">
53
+ <a href="doc/doc/Densa_html_html.html">Densa_html.html</a>
54
+ </li>
55
+ <li class="file">
56
+ <a href="doc/doc/Dispersa_html_html.html">Dispersa_html.html</a>
57
+ </li>
58
+ <li class="file">
59
+ <a href="doc/doc/Fraccion_html_html.html">Fraccion_html.html</a>
60
+ </li>
61
+ <li class="file">
62
+ <a href="doc/doc/Matriz_html_html.html">Matriz_html.html</a>
63
+ </li>
64
+ <li class="file">
65
+ <a href="doc/doc/Object_html_html.html">Object_html.html</a>
66
+ </li>
67
+ <li class="file">
68
+ <a href="doc/doc/P10lppt13_html_html.html">P10lppt13_html.html</a>
69
+ </li>
70
+ <li class="file">
71
+ <a href="doc/doc/VectorDisperso_html_html.html">VectorDisperso_html.html</a>
72
+ </li>
73
+ <li class="file">
74
+ <a href="doc/doc/created_rid_html.html">created_rid.html</a>
75
+ </li>
76
+ <li class="file">
77
+ <a href="doc/doc/doc/Densa_html_html_html.html">Densa_html_html.html</a>
78
+ </li>
79
+ <li class="file">
80
+ <a href="doc/doc/doc/Dispersa_html_html_html.html">Dispersa_html_html.html</a>
81
+ </li>
82
+ <li class="file">
83
+ <a href="doc/doc/doc/Fraccion_html_html_html.html">Fraccion_html_html.html</a>
84
+
85
+ <img class="toc-toggle" src="images/transparent.png" alt="" title="toggle headings">
86
+ <ul class="initially-hidden">
87
+ <li><a href="doc/doc/doc/Fraccion_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
88
+ <li><a href="doc/doc/doc/Fraccion_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
89
+ <li><a href="doc/doc/doc/Fraccion_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
90
+ <li><a href="doc/doc/doc/Fraccion_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
91
+ <li><a href="doc/doc/doc/Fraccion_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
92
+ <li><a href="doc/doc/doc/Fraccion_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
93
+ <li><a href="doc/doc/doc/Fraccion_html_html_html.html#label-%3Ca">&lt;a</a>
94
+ </ul>
95
+ </li>
96
+ <li class="file">
97
+ <a href="doc/doc/doc/Matriz_html_html_html.html">Matriz_html_html.html</a>
98
+
99
+ <img class="toc-toggle" src="images/transparent.png" alt="" title="toggle headings">
100
+ <ul class="initially-hidden">
101
+ <li><a href="doc/doc/doc/Matriz_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
102
+ <li><a href="doc/doc/doc/Matriz_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
103
+ <li><a href="doc/doc/doc/Matriz_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
104
+ <li><a href="doc/doc/doc/Matriz_html_html_html.html#label-%26amp%3Blt%3Bspan">&amp;amp;lt;span</a>
105
+ </ul>
106
+ </li>
107
+ <li class="file">
108
+ <a href="doc/doc/doc/Object_html_html_html.html">Object_html_html.html</a>
109
+ </li>
110
+ <li class="file">
111
+ <a href="doc/doc/doc/P10lppt13_html_html_html.html">P10lppt13_html_html.html</a>
112
+ </li>
113
+ <li class="file">
114
+ <a href="doc/doc/doc/VectorDisperso_html_html_html.html">VectorDisperso_html_html.html</a>
115
+ </li>
116
+ <li class="file">
117
+ <a href="doc/doc/doc/created_rid_html_html.html">created_rid_html.html</a>
118
+ </li>
119
+ <li class="file">
120
+ <a href="doc/doc/doc/doc/created_rid_html_html_html.html">created_rid_html_html.html</a>
121
+ </li>
122
+ <li class="file">
123
+ <a href="doc/doc/doc/fraccion_rb~_html_html_html.html">fraccion_rb~_html_html.html</a>
124
+ </li>
125
+ <li class="file">
126
+ <a href="doc/doc/doc/index_html_html_html.html">index_html_html.html</a>
127
+ </li>
128
+ <li class="file">
129
+ <a href="doc/doc/doc/js/darkfish_js_html_html.html">darkfish_js_html.html</a>
130
+ </li>
131
+ <li class="file">
132
+ <a href="doc/doc/doc/js/jquery_js_html_html.html">jquery_js_html.html</a>
133
+ </li>
134
+ <li class="file">
135
+ <a href="doc/doc/doc/js/navigation_js_html_html.html">navigation_js_html.html</a>
136
+ </li>
137
+ <li class="file">
138
+ <a href="doc/doc/doc/js/search_index_js_html_html.html">search_index_js_html.html</a>
139
+ </li>
140
+ <li class="file">
141
+ <a href="doc/doc/doc/js/search_js_html_html.html">search_js_html.html</a>
142
+ </li>
143
+ <li class="file">
144
+ <a href="doc/doc/doc/js/searcher_js_html_html.html">searcher_js_html.html</a>
145
+
146
+ <img class="toc-toggle" src="images/transparent.png" alt="" title="toggle headings">
147
+ <ul class="initially-hidden">
148
+ <li><a href="doc/doc/doc/js/searcher_js_html_html.html#label-regexps.length+-+1%3B+i+%26amp%3Bgt%3B%3D+0%3B+i%E2%80%93%29%7B+%2F%2F+++++++++if+%28%21%3Ca">regexps.length - 1; i &amp;amp;gt;= 0; i–){ // if (!&lt;a</a>
149
+ </ul>
150
+ </li>
151
+ <li class="file">
152
+ <a href="doc/doc/doc/rdoc_css_html_html.html">rdoc_css_html.html</a>
153
+ </li>
154
+ <li class="file">
155
+ <a href="doc/doc/doc/table_of_contents_html_html_html.html">table_of_contents_html_html.html</a>
156
+ </li>
157
+ <li class="file">
158
+ <a href="doc/doc/fraccion_rb~_html_html.html">fraccion_rb~_html.html</a>
159
+ </li>
160
+ <li class="file">
161
+ <a href="doc/doc/index_html_html.html">index_html.html</a>
162
+ </li>
163
+ <li class="file">
164
+ <a href="doc/doc/js/darkfish_js_html.html">darkfish_js.html</a>
165
+ </li>
166
+ <li class="file">
167
+ <a href="doc/doc/js/jquery_js_html.html">jquery_js.html</a>
168
+ </li>
169
+ <li class="file">
170
+ <a href="doc/doc/js/navigation_js_html.html">navigation_js.html</a>
171
+ </li>
172
+ <li class="file">
173
+ <a href="doc/doc/js/search_index_js_html.html">search_index_js.html</a>
174
+
175
+ <img class="toc-toggle" src="images/transparent.png" alt="" title="toggle headings">
176
+ <ul class="initially-hidden">
177
+ <li><a href="doc/doc/js/search_index_js_html.html#label-function%28data%2C+input%2C+result%29+%7Bnn%26lt%3Bpre%26gt%3Bthis.data+%3D+data%3Bnthis.%24input">function(data, input, result) {nn&amp;lt;pre&amp;gt;this.data = data;nthis.$input</a>
178
+ <li><a href="doc/doc/js/search_index_js_html.html#label-%24%28input%29%3Bnthis.%24result+%3D+%24%28result%29%3B">$(input);nthis.$result = $(result);</a>
179
+ <li><a href="doc/doc/js/search_index_js_html.html#label-function%28data%29+%7Bnn%26lt%3Bpre%26gt%3Bthis.data+%3D+data%3Bnthis.handlers+%3D">function(data) {nn&amp;lt;pre&amp;gt;this.data = data;nthis.handlers =</a>
180
+ </ul>
181
+ </li>
182
+ <li class="file">
183
+ <a href="doc/doc/js/search_js_html.html">search_js.html</a>
184
+ </li>
185
+ <li class="file">
186
+ <a href="doc/doc/js/searcher_js_html.html">searcher_js.html</a>
187
+ </li>
188
+ <li class="file">
189
+ <a href="doc/doc/p10lppt13_rb~_html_html.html">p10lppt13_rb~_html.html</a>
190
+ </li>
191
+ <li class="file">
192
+ <a href="doc/doc/rdoc_css_html.html">rdoc_css.html</a>
193
+ </li>
194
+ <li class="file">
195
+ <a href="doc/doc/table_of_contents_html_html.html">table_of_contents_html.html</a>
196
+ </li>
197
+ <li class="file">
198
+ <a href="doc/fraccion_rb~_html.html">fraccion_rb~.html</a>
199
+ </li>
200
+ <li class="file">
201
+ <a href="doc/index_html.html">index.html</a>
202
+ </li>
203
+ <li class="file">
204
+ <a href="doc/js/darkfish_js.html">darkfish.js</a>
205
+ </li>
206
+ <li class="file">
207
+ <a href="doc/js/jquery_js.html">jquery.js</a>
208
+ </li>
209
+ <li class="file">
210
+ <a href="doc/js/navigation_js.html">navigation.js</a>
211
+ </li>
212
+ <li class="file">
213
+ <a href="doc/js/search_js.html">search.js</a>
214
+ </li>
215
+ <li class="file">
216
+ <a href="doc/js/search_index_js.html">search_index.js</a>
217
+ </li>
218
+ <li class="file">
219
+ <a href="doc/js/searcher_js.html">searcher.js</a>
220
+ </li>
221
+ <li class="file">
222
+ <a href="doc/p10lppt13_rb~_html.html">p10lppt13_rb~.html</a>
223
+ </li>
224
+ <li class="file">
225
+ <a href="doc/rdoc_css.html">rdoc.css</a>
226
+ </li>
227
+ <li class="file">
228
+ <a href="doc/table_of_contents_html.html">table_of_contents.html</a>
229
+ </li>
230
+ <li class="file">
231
+ <a href="fraccion_rb~.html">fraccion.rb~</a>
232
+ </li>
233
+ <li class="file">
234
+ <a href="p10lppt13_rb~.html">p10lppt13.rb~</a>
235
+ </li>
236
+
237
+ </ul>
238
+
239
+ <h2 id="classes">Classes/Modules</h2>
240
+ <ul>
241
+ <li class="class">
242
+ <a href="Densa.html">Densa</a>
243
+ </li>
244
+ <li class="class">
245
+ <a href="Dispersa.html">Dispersa</a>
246
+ </li>
247
+ <li class="class">
248
+ <a href="Fraccion.html">Fraccion</a>
249
+ </li>
250
+ <li class="class">
251
+ <a href="Matriz.html">Matriz</a>
252
+ </li>
253
+ <li class="class">
254
+ <a href="Object.html">Object</a>
255
+ </li>
256
+ <li class="module">
257
+ <a href="P10lppt13.html">P10lppt13</a>
258
+ </li>
259
+ <li class="class">
260
+ <a href="VectorDisperso.html">VectorDisperso</a>
261
+ </li>
262
+
263
+ </ul>
264
+
265
+ <h2 id="methods">Methods</h2>
266
+ <ul>
267
+
268
+ <li class="method"><a href="Fraccion.html#method-c-new">::new &mdash; Fraccion</a>
269
+
270
+ <li class="method"><a href="Matriz.html#method-c-new">::new &mdash; Matriz</a>
271
+
272
+ <li class="method"><a href="Dispersa.html#method-c-new">::new &mdash; Dispersa</a>
273
+
274
+ <li class="method"><a href="VectorDisperso.html#method-c-new">::new &mdash; VectorDisperso</a>
275
+
276
+ <li class="method"><a href="Densa.html#method-c-new">::new &mdash; Densa</a>
277
+
278
+ <li class="method"><a href="Fraccion.html#method-i-25">#% &mdash; Fraccion</a>
279
+
280
+ <li class="method"><a href="Fraccion.html#method-i-2A">#* &mdash; Fraccion</a>
281
+
282
+ <li class="method"><a href="Matriz.html#method-i-2A">#* &mdash; Matriz</a>
283
+
284
+ <li class="method"><a href="Matriz.html#method-i-2B">#+ &mdash; Matriz</a>
285
+
286
+ <li class="method"><a href="Fraccion.html#method-i-2B">#+ &mdash; Fraccion</a>
287
+
288
+ <li class="method"><a href="Fraccion.html#method-i-2D">#- &mdash; Fraccion</a>
289
+
290
+ <li class="method"><a href="Matriz.html#method-i-2D">#- &mdash; Matriz</a>
291
+
292
+ <li class="method"><a href="Fraccion.html#method-i-2F">#/ &mdash; Fraccion</a>
293
+
294
+ <li class="method"><a href="Fraccion.html#method-i-3C-3D-3E">#<=> &mdash; Fraccion</a>
295
+
296
+ <li class="method"><a href="Fraccion.html#method-i-3D-3D">#== &mdash; Fraccion</a>
297
+
298
+ <li class="method"><a href="VectorDisperso.html#method-i-5B-5D">#[] &mdash; VectorDisperso</a>
299
+
300
+ <li class="method"><a href="Dispersa.html#method-i-5B-5D">#[] &mdash; Dispersa</a>
301
+
302
+ <li class="method"><a href="Densa.html#method-i-5B-5D">#[] &mdash; Densa</a>
303
+
304
+ <li class="method"><a href="Densa.html#method-i-5B-5D-3D">#[]= &mdash; Densa</a>
305
+
306
+ <li class="method"><a href="Fraccion.html#method-i-absoluto">#absoluto &mdash; Fraccion</a>
307
+
308
+ <li class="method"><a href="Fraccion.html#method-i-coerce">#coerce &mdash; Fraccion</a>
309
+
310
+ <li class="method"><a href="Dispersa.html#method-i-col">#col &mdash; Dispersa</a>
311
+
312
+ <li class="method"><a href="Matriz.html#method-i-colum">#colum &mdash; Matriz</a>
313
+
314
+ <li class="method"><a href="Fraccion.html#method-i-denom">#denom &mdash; Fraccion</a>
315
+
316
+ <li class="method"><a href="Matriz.html#method-i-filas">#filas &mdash; Matriz</a>
317
+
318
+ <li class="method"><a href="Object.html#method-i-gcd">#gcd &mdash; Object</a>
319
+
320
+ <li class="method"><a href="Matriz.html#method-i-max">#max &mdash; Matriz</a>
321
+
322
+ <li class="method"><a href="Fraccion.html#method-i-mcm">#mcm &mdash; Fraccion</a>
323
+
324
+ <li class="method"><a href="Matriz.html#method-i-min">#min &mdash; Matriz</a>
325
+
326
+ <li class="method"><a href="Fraccion.html#method-i-num">#num &mdash; Fraccion</a>
327
+
328
+ <li class="method"><a href="Fraccion.html#method-i-opuesto">#opuesto &mdash; Fraccion</a>
329
+
330
+ <li class="method"><a href="Matriz.html#method-i-por">#por &mdash; Matriz</a>
331
+
332
+ <li class="method"><a href="Matriz.html#method-i-porf">#porf &mdash; Matriz</a>
333
+
334
+ <li class="method"><a href="Matriz.html#method-i-primervalor">#primervalor &mdash; Matriz</a>
335
+
336
+ <li class="method"><a href="Fraccion.html#method-i-reciprocal">#reciprocal &mdash; Fraccion</a>
337
+
338
+ <li class="method"><a href="Fraccion.html#method-i-simplificar">#simplificar &mdash; Fraccion</a>
339
+
340
+ <li class="method"><a href="Fraccion.html#method-i-to_f">#to_f &mdash; Fraccion</a>
341
+
342
+ <li class="method"><a href="Fraccion.html#method-i-to_s">#to_s &mdash; Fraccion</a>
343
+
344
+ <li class="method"><a href="VectorDisperso.html#method-i-to_s">#to_s &mdash; VectorDisperso</a>
345
+
346
+ <li class="method"><a href="Matriz.html#method-i-to_s">#to_s &mdash; Matriz</a>
347
+
348
+ <li class="method"><a href="Matriz.html#method-i-trasponer">#trasponer &mdash; Matriz</a>
349
+
350
+ <li class="method"><a href="Matriz.html#method-i-vectorizar">#vectorizar &mdash; Matriz</a>
351
+
352
+ </ul>
353
+
354
+
355
+ <footer id="validator-badges">
356
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
357
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
358
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
359
+ </footer>
360
+
data/lib/fraccion.rb CHANGED
@@ -1,20 +1,32 @@
1
- require "gcd.rb"
1
+ #require "gcd.rb"
2
2
 
3
3
  #############################################################
4
4
  # Clase Fraccion de la practica #7 de LPP #
5
5
  #############################################################
6
-
6
+ #Clase para crear instancias de Fraccion
7
7
  class Fraccion
8
8
 
9
- attr_reader :numer, :denomin
9
+ # Variable que almacena el numerador de la fraccion
10
+ attr_reader :numer
11
+ # Variable que almacena el denominador de la fraccion
12
+ attr_reader :denomin
10
13
 
11
14
  # Incluimos el módulo Comparable
12
15
  include Comparable
13
16
 
17
+ # Metodo de inicializacion de la clase Fraccion
14
18
  def initialize(n,d)
15
19
  @numer, @denomin = n, d
16
20
  end
17
21
 
22
+ #Maximo comun divisor
23
+ def gcd(u, v)
24
+ u, v = u.abs, v.abs
25
+ while v != 0
26
+ u , v = v, u % v
27
+ end
28
+ u
29
+ end
18
30
  #############################################################
19
31
  # Funciones basicas de la clase #
20
32
  #############################################################
@@ -125,16 +137,19 @@ class Fraccion
125
137
  # menor o igual y mayor o igual)
126
138
  #############################################################
127
139
 
140
+ #Operador para obtener el resto
128
141
  def %(other) #Obtenemos el resto de la division de dos fracciones
129
142
  aux1 = self.numer * other.denomin #Multiplicamos el numerador de la primera entre el denominador de la segunda
130
143
  aux2 = self.denomin * other.numer #Multiplicamos el denominador de la primera entre el numerador de la segunda
131
144
  resto = aux1%aux2 #Obtenemos el Resto de la fraccion resultante
132
145
  end
133
146
 
147
+ #Operador comparable
134
148
  def <=>(other)
135
149
  self.to_f <=> other.to_f
136
150
  end
137
151
 
152
+ #Metodo coerce para cambiar instancia por parametro.
138
153
  def coerce(other)
139
154
  #aux = Fraccion.new(other,1)
140
155
  [self,other]
data/lib/p10lppt13.rb CHANGED
@@ -1,26 +1,30 @@
1
1
  require "fraccion.rb"
2
2
 
3
+ # Clase base Matriz, que guarda el numero de filas y columnas
3
4
  class Matriz
4
-
5
- attr_reader :nfil, :ncol
5
+
6
+ #Variable que almacena el numero de filas de la matriz
7
+ attr_reader :nfil
8
+ #Variable que almacena el numero de columnas de la matriz
9
+ attr_reader :ncol
10
+
6
11
  # Metodo initilize de la clase base
7
- $acum
8
12
  def initialize(nfil, ncol)
9
13
  @nfil = nfil
10
14
  @ncol = ncol
11
15
  end
12
16
 
13
- # Getter de nfil
17
+ # Getter de nfil (devuelve el numero de filas de la matriz)
14
18
  def filas
15
19
  @nfil
16
20
  end
17
21
 
18
- # Getter de ncol
22
+ # Getter de ncol (devuelve el numero de columnas de la matriz)
19
23
  def colum
20
24
  @ncol
21
25
  end
22
26
 
23
- # Metodo para convertir la matriz a string
27
+ # Metodo para convertir la matriz a string (a una cadena)
24
28
  def to_s
25
29
  aux = ""
26
30
  @nfil.times do |i|
@@ -32,15 +36,16 @@ class Matriz
32
36
  aux
33
37
  end
34
38
 
35
- # Metodo para sumar dos matrices
39
+ # Metodo para sumar dos matrices (si tienen la misma dimension)
36
40
  def +(other)
41
+ # Primero se comprueba si se pueden sumar (si tienen la misma dimension)
37
42
  if ((@nfil != other.nfil) || (@ncol != other.ncol))
38
43
  puts "No se pueden sumar las matrices"
39
44
  else
40
45
  elemento = Array.new(0)
41
- for i in 0...filas
46
+ @nfil.times do |i|
42
47
  fila = Array.new(0)
43
- for j in 0...colum
48
+ @ncol.times do |j|
44
49
  if self.pos[i][j] == nil && other.pos[i][j] != nil
45
50
  fila << other.pos[i][j]
46
51
  elsif self.pos[i][j] != nil && other.pos[i][j] == nil
@@ -57,15 +62,16 @@ class Matriz
57
62
  end
58
63
  end
59
64
 
60
- # Metodo para restar dos matrices
65
+ # Metodo para restar dos matrices (si tienen la misma dimension)
61
66
  def -(other)
67
+ # Primero se comprueba si se pueden restar (si tienen la misma dimension)
62
68
  if ((@nfil != other.nfil) || (@ncol != other.ncol))
63
69
  puts "No se pueden restar las matrices"
64
70
  else
65
71
  elemento = Array.new(0)
66
- for i in 0...filas
72
+ @nfil.times do |i|
67
73
  fila = Array.new(0)
68
- for j in 0...colum
74
+ @ncol.times do |j|
69
75
  if self.pos[i][j] == nil && other.pos[i][j] != nil
70
76
  fila << -other.pos[i][j]
71
77
  elsif self.pos[i][j] != nil && other.pos[i][j] == nil
@@ -82,6 +88,7 @@ class Matriz
82
88
  end
83
89
  end
84
90
 
91
+ # Metodo para hallar el primer valor no nulo de una matriz
85
92
  def primervalor
86
93
  for i in 0...@nfil
87
94
  for j in 0...@nncol
@@ -92,7 +99,7 @@ class Matriz
92
99
  end
93
100
  end
94
101
 
95
- # Metodo para hallar el maximo de una matriz
102
+ # Metodo para hallar el valor maximo de los elementos de una matriz
96
103
  def max
97
104
  acum = pos[0][0]
98
105
  for i in 0...filas
@@ -107,7 +114,7 @@ class Matriz
107
114
  acum
108
115
  end
109
116
 
110
- # Metodo para hallar el minimo de una matriz
117
+ # Metodo para hallar el valor minimo de los elementos de una matriz
111
118
  def min
112
119
  acum = pos[0][0]
113
120
  for i in 0...filas
@@ -124,40 +131,48 @@ class Matriz
124
131
 
125
132
  # Metodo para multiplicacion dos matrices
126
133
  def por(other)
134
+ # Primero se comprueba si se pueden multiplicar (las dimensiones deben ser nxm y mxn)
127
135
  if ((@nfil != other.ncol) || (@ncol != other.nfil))
128
136
  puts "No se pueden multiplicarr las matrices"
129
137
  else
130
138
  elemento = Array.new(0)
131
- for i in 0...nfil
139
+ @nfil.times do |i|
132
140
  fila = Array.new(0)
133
- for j in 0...other.ncol
141
+ other.ncol.times do |j|
134
142
  aux = 0
135
- for k in 0...ncol
136
- aux += pos[i][k] * other.pos[k][j]
143
+ @ncol.times do |k|
144
+ if self.pos[i][k] != nil && other.pos[i][k] != nil
145
+ aux += pos[i][k] * other.pos[k][j]
146
+ end
137
147
  end
138
148
  fila << aux
139
149
  end
140
150
  elemento << fila
141
151
  end
142
152
  end
143
- Matriz.new(@nfil, other.ncol, elemento)
153
+ Densa.new(@nfil, other.ncol, elemento)
144
154
  end
145
155
 
146
156
  # Metodo para multiplicacion dos matrices
147
157
  def porf(other)
158
+ # Primero se comprueba si se pueden multiplicar (las dimensiones deben ser nxm y mxn)
148
159
  if ((@nfil != other.ncol) || (@ncol != other.nfil))
149
160
  puts "No se pueden multiplicarr las matrices"
150
161
  else
151
162
  elemento = Array.new(0)
152
- for i in 0...nfil
163
+ @nfil.times do |i|
153
164
  fila = Array.new(0)
154
- for j in 0...other.ncol
165
+ other.ncol.times do |j|
155
166
  aux = Fraccion.new(1,1)
156
167
  aux = aux - aux
157
- for k in 0...ncol
158
- aux += pos[i][k] * other.pos[k][j]
168
+ @ncol.times do |k|
169
+ if (self.pos[i][k] != nil && other.pos[i][k] != nil)
170
+ aux += pos[i][k] * other.pos[k][j]
171
+ else
172
+ aux << pos[i][j]
173
+ end
174
+ fila << aux
159
175
  end
160
- fila << aux
161
176
  end
162
177
  elemento << fila
163
178
  end
@@ -168,22 +183,26 @@ class Matriz
168
183
  # Metodo para multiplicar una matriz por un escalar
169
184
  def *(other)
170
185
  elemento = Array.new(0)
171
- for i in 0...filas
186
+ @nfil.times do |i|
172
187
  fila = Array.new(0)
173
- for j in 0...colum
174
- fila << pos[i][j]*other
188
+ @ncol.times do |j|
189
+ if (pos[i][j] != nil)
190
+ fila << pos[i][j]*other
191
+ else
192
+ fila << pos[i][j]
193
+ end
175
194
  end
176
195
  elemento << fila
177
196
  end
178
- Matriz.new(@nfil, @ncol, elemento)
197
+ Densa.new(@nfil, @ncol, elemento)
179
198
  end
180
199
 
181
200
  # Metodo para hallar la traspuesta de una matriz
182
201
  def trasponer
183
202
  elemento = Array.new(0)
184
- for i in 0...colum
203
+ @ncol.times do |i|
185
204
  fila = Array.new(0)
186
- for j in 0...filas
205
+ @nfil.times do |j|
187
206
  fila << pos[j][i]
188
207
  end
189
208
  elemento << fila
@@ -195,8 +214,8 @@ class Matriz
195
214
  # Metodo para convertir la matriz en un vector
196
215
  def vectorizar
197
216
  aux = Array.new(0)
198
- for i in 0...colum
199
- for j in 0...filas
217
+ @ncol.times do |i|
218
+ @nfil.times do |j|
200
219
  aux << pos[i][j]
201
220
  end
202
221
  end
@@ -208,18 +227,21 @@ end
208
227
  # Clase de Matrices Densas
209
228
  class Densa < Matriz
210
229
 
230
+ #Vector que almacena los valores de la matriz(Array de arrays, en el que cada array es una fila).
211
231
  attr_reader :pos
212
-
213
232
 
233
+ # Constructor de la clase Matriz Densa
214
234
  def initialize(nfil, ncol, pos)
215
235
  super(nfil, ncol)
216
236
  @pos = Array.new(pos)
217
237
  end
218
238
 
239
+ # Metodo de acceso a las filas
219
240
  def [](i)
220
241
  @data[i]
221
242
  end
222
-
243
+
244
+ # Metodo de acceso a las posiciones
223
245
  def []=(i,value)
224
246
  @data[i] = value
225
247
  end
@@ -228,17 +250,22 @@ end
228
250
 
229
251
  # Clase de Vectores dispersos
230
252
  class VectorDisperso
253
+
254
+ #Vector que almacena los valores de la matriz.
231
255
  attr_reader :vector
232
256
 
257
+ # Constructor de la clase VectorDisperso
233
258
  def initialize(h = {})
234
259
  @vector = Hash.new(0)
235
260
  @vector = @vector.merge!(h)
236
261
  end
237
-
262
+
263
+ # Metodo para acceder a una posicion
238
264
  def [](i)
239
265
  @vector[i]
240
266
  end
241
-
267
+
268
+ # Metodo para convertir a un string
242
269
  def to_s
243
270
  @vector.to_s
244
271
  end
@@ -246,12 +273,15 @@ end
246
273
 
247
274
  # Clase de Matrices Dispersas
248
275
  class Dispersa < Matriz
276
+
277
+ #Vector que almacena los valores de la matriz(Array de arrays, en el que cada array es una fila).
249
278
  attr_reader :pos
250
279
 
280
+ # Constructor de la clase Matriz Dispersa
251
281
  def initialize(nfil, ncol, h = {})
252
282
  super(nfil, ncol)
253
283
  @pos = Hash.new({})
254
- for k in h.keys do
284
+ for k in h.keys do
255
285
  @pos[k] = if h[k].is_a? VectorDisperso
256
286
  h[k]
257
287
  else
@@ -259,13 +289,13 @@ class Dispersa < Matriz
259
289
  end
260
290
  end
261
291
  end
262
- =begin
263
- for i in self.pos.keys do
264
- =end
292
+
293
+ # Metodo para acceder a una posicion de la matriz
265
294
  def [](i)
266
295
  @pos[i]
267
296
  end
268
-
297
+
298
+ # Metodo para acceder a una columna de la matriz
269
299
  def col(j)
270
300
  c = {}
271
301
  for r in @pos.keys do