p10lppt13 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,810 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>p10lppt13_rb~.html - 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="file">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+
47
+
48
+ <div id="project-metadata">
49
+ <nav id="fileindex-section" class="section project-section">
50
+ <h3 class="section-header">Pages</h3>
51
+
52
+ <ul>
53
+
54
+ <li class="file"><a href="../doc/Densa_html.html">Densa.html</a>
55
+
56
+ <li class="file"><a href="../doc/Dispersa_html.html">Dispersa.html</a>
57
+
58
+ <li class="file"><a href="../doc/Fraccion_html.html">Fraccion.html</a>
59
+
60
+ <li class="file"><a href="../doc/Matriz_html.html">Matriz.html</a>
61
+
62
+ <li class="file"><a href="../doc/Object_html.html">Object.html</a>
63
+
64
+ <li class="file"><a href="../doc/P10lppt13_html.html">P10lppt13.html</a>
65
+
66
+ <li class="file"><a href="../doc/VectorDisperso_html.html">VectorDisperso.html</a>
67
+
68
+ <li class="file"><a href="../doc/created_rid.html">created.rid</a>
69
+
70
+ <li class="file"><a href="../doc/doc/Densa_html_html.html">Densa_html.html</a>
71
+
72
+ <li class="file"><a href="../doc/doc/Dispersa_html_html.html">Dispersa_html.html</a>
73
+
74
+ <li class="file"><a href="../doc/doc/Fraccion_html_html.html">Fraccion_html.html</a>
75
+
76
+ <li class="file"><a href="../doc/doc/Matriz_html_html.html">Matriz_html.html</a>
77
+
78
+ <li class="file"><a href="../doc/doc/Object_html_html.html">Object_html.html</a>
79
+
80
+ <li class="file"><a href="../doc/doc/P10lppt13_html_html.html">P10lppt13_html.html</a>
81
+
82
+ <li class="file"><a href="../doc/doc/VectorDisperso_html_html.html">VectorDisperso_html.html</a>
83
+
84
+ <li class="file"><a href="../doc/doc/created_rid_html.html">created_rid.html</a>
85
+
86
+ <li class="file"><a href="../doc/doc/doc/Densa_html_html_html.html">Densa_html_html.html</a>
87
+
88
+ <li class="file"><a href="../doc/doc/doc/Dispersa_html_html_html.html">Dispersa_html_html.html</a>
89
+
90
+ <li class="file"><a href="../doc/doc/doc/Fraccion_html_html_html.html">Fraccion_html_html.html</a>
91
+
92
+ <li class="file"><a href="../doc/doc/doc/Matriz_html_html_html.html">Matriz_html_html.html</a>
93
+
94
+ <li class="file"><a href="../doc/doc/doc/Object_html_html_html.html">Object_html_html.html</a>
95
+
96
+ <li class="file"><a href="../doc/doc/doc/P10lppt13_html_html_html.html">P10lppt13_html_html.html</a>
97
+
98
+ <li class="file"><a href="../doc/doc/doc/VectorDisperso_html_html_html.html">VectorDisperso_html_html.html</a>
99
+
100
+ <li class="file"><a href="../doc/doc/doc/created_rid_html_html.html">created_rid_html.html</a>
101
+
102
+ <li class="file"><a href="../doc/doc/doc/doc/created_rid_html_html_html.html">created_rid_html_html.html</a>
103
+
104
+ <li class="file"><a href="../doc/doc/doc/fraccion_rb~_html_html_html.html">fraccion_rb~_html_html.html</a>
105
+
106
+ <li class="file"><a href="../doc/doc/doc/index_html_html_html.html">index_html_html.html</a>
107
+
108
+ <li class="file"><a href="../doc/doc/doc/js/darkfish_js_html_html.html">darkfish_js_html.html</a>
109
+
110
+ <li class="file"><a href="../doc/doc/doc/js/jquery_js_html_html.html">jquery_js_html.html</a>
111
+
112
+ <li class="file"><a href="../doc/doc/doc/js/navigation_js_html_html.html">navigation_js_html.html</a>
113
+
114
+ <li class="file"><a href="../doc/doc/doc/js/search_index_js_html_html.html">search_index_js_html.html</a>
115
+
116
+ <li class="file"><a href="../doc/doc/doc/js/search_js_html_html.html">search_js_html.html</a>
117
+
118
+ <li class="file"><a href="../doc/doc/doc/js/searcher_js_html_html.html">searcher_js_html.html</a>
119
+
120
+ <li class="file"><a href="../doc/doc/doc/rdoc_css_html_html.html">rdoc_css_html.html</a>
121
+
122
+ <li class="file"><a href="../doc/doc/doc/table_of_contents_html_html_html.html">table_of_contents_html_html.html</a>
123
+
124
+ <li class="file"><a href="../doc/doc/fraccion_rb~_html_html.html">fraccion_rb~_html.html</a>
125
+
126
+ <li class="file"><a href="../doc/doc/index_html_html.html">index_html.html</a>
127
+
128
+ <li class="file"><a href="../doc/doc/js/darkfish_js_html.html">darkfish_js.html</a>
129
+
130
+ <li class="file"><a href="../doc/doc/js/jquery_js_html.html">jquery_js.html</a>
131
+
132
+ <li class="file"><a href="../doc/doc/js/navigation_js_html.html">navigation_js.html</a>
133
+
134
+ <li class="file"><a href="../doc/doc/js/search_index_js_html.html">search_index_js.html</a>
135
+
136
+ <li class="file"><a href="../doc/doc/js/search_js_html.html">search_js.html</a>
137
+
138
+ <li class="file"><a href="../doc/doc/js/searcher_js_html.html">searcher_js.html</a>
139
+
140
+ <li class="file"><a href="../doc/doc/p10lppt13_rb~_html_html.html">p10lppt13_rb~_html.html</a>
141
+
142
+ <li class="file"><a href="../doc/doc/rdoc_css_html.html">rdoc_css.html</a>
143
+
144
+ <li class="file"><a href="../doc/doc/table_of_contents_html_html.html">table_of_contents_html.html</a>
145
+
146
+ <li class="file"><a href="../doc/fraccion_rb~_html.html">fraccion_rb~.html</a>
147
+
148
+ <li class="file"><a href="../doc/index_html.html">index.html</a>
149
+
150
+ <li class="file"><a href="../doc/js/darkfish_js.html">darkfish.js</a>
151
+
152
+ <li class="file"><a href="../doc/js/jquery_js.html">jquery.js</a>
153
+
154
+ <li class="file"><a href="../doc/js/navigation_js.html">navigation.js</a>
155
+
156
+ <li class="file"><a href="../doc/js/search_js.html">search.js</a>
157
+
158
+ <li class="file"><a href="../doc/js/search_index_js.html">search_index.js</a>
159
+
160
+ <li class="file"><a href="../doc/js/searcher_js.html">searcher.js</a>
161
+
162
+ <li class="file"><a href="../doc/p10lppt13_rb~_html.html">p10lppt13_rb~.html</a>
163
+
164
+ <li class="file"><a href="../doc/rdoc_css.html">rdoc.css</a>
165
+
166
+ <li class="file"><a href="../doc/table_of_contents_html.html">table_of_contents.html</a>
167
+
168
+ <li class="file"><a href="../fraccion_rb~.html">fraccion.rb~</a>
169
+
170
+ <li class="file"><a href="../p10lppt13_rb~.html">p10lppt13.rb~</a>
171
+
172
+ </ul>
173
+ </nav>
174
+
175
+ <nav id="classindex-section" class="section project-section">
176
+ <h3 class="section-header">Class and Module Index</h3>
177
+
178
+ <ul class="link-list">
179
+
180
+ <li><a href="../Densa.html">Densa</a>
181
+
182
+ <li><a href="../Dispersa.html">Dispersa</a>
183
+
184
+ <li><a href="../Fraccion.html">Fraccion</a>
185
+
186
+ <li><a href="../Matriz.html">Matriz</a>
187
+
188
+ <li><a href="../Object.html">Object</a>
189
+
190
+ <li><a href="../P10lppt13.html">P10lppt13</a>
191
+
192
+ <li><a href="../VectorDisperso.html">VectorDisperso</a>
193
+
194
+ </ul>
195
+ </nav>
196
+
197
+ </div>
198
+ </nav>
199
+
200
+ <div id="documentation" class="description">
201
+
202
+ <p>&lt;!DOCTYPE html&gt;</p>
203
+
204
+ <p>&lt;html&gt; &lt;head&gt; &lt;meta content=“text/html; charset=UTF-8”
205
+ http-equiv=“Content-Type”&gt;</p>
206
+
207
+ <p>&lt;title&gt;p10lppt13.rb~ - RDoc Documentation&lt;/title&gt;</p>
208
+
209
+ <p>&lt;link type=“text/css” media=“screen” href=“./rdoc.css”
210
+ rel=“stylesheet”&gt;</p>
211
+
212
+ <p>&lt;script type=“text/javascript”&gt;</p>
213
+
214
+ <pre>var rdoc_rel_prefix = &quot;./&quot;;</pre>
215
+
216
+ <p>&lt;/script&gt;</p>
217
+
218
+ <p>&lt;script type=“text/javascript” charset=“utf-8”
219
+ src=“./js/jquery.js”&gt;&lt;/script&gt; &lt;script type=“text/javascript”
220
+ charset=“utf-8” src=“./js/navigation.js”&gt;&lt;/script&gt; &lt;script
221
+ type=“text/javascript” charset=“utf-8”
222
+ src=“./js/search_index.js”&gt;&lt;/script&gt; &lt;script
223
+ type=“text/javascript” charset=“utf-8”
224
+ src=“./js/search.js”&gt;&lt;/script&gt; &lt;script type=“text/javascript”
225
+ charset=“utf-8” src=“./js/searcher.js”&gt;&lt;/script&gt; &lt;script
226
+ type=“text/javascript” charset=“utf-8”
227
+ src=“./js/darkfish.js”&gt;&lt;/script&gt;</p>
228
+
229
+ <p>&lt;body class=“file”&gt; &lt;nav id=“metadata”&gt;</p>
230
+
231
+ <pre>&lt;nav id=&quot;home-section&quot; class=&quot;section&quot;&gt;
232
+ &lt;h3 class=&quot;section-header&quot;&gt;
233
+ &lt;a href=&quot;./index.html&quot;&gt;Home&lt;/a&gt;
234
+ &lt;a href=&quot;./table_of_contents.html#classes&quot;&gt;Classes&lt;/a&gt;
235
+ &lt;a href=&quot;./table_of_contents.html#methods&quot;&gt;Methods&lt;/a&gt;
236
+ &lt;/h3&gt;</pre>
237
+
238
+ <p>&lt;/nav&gt;</p>
239
+
240
+ <pre>&lt;nav id=&quot;search-section&quot; class=&quot;section project-section&quot; class=&quot;initially-hidden&quot;&gt;
241
+ &lt;form action=&quot;#&quot; method=&quot;get&quot; accept-charset=&quot;utf-8&quot;&gt;
242
+ &lt;h3 class=&quot;section-header&quot;&gt;
243
+ &lt;input type=&quot;text&quot; name=&quot;search&quot; placeholder=&quot;Search&quot; id=&quot;search-field&quot;
244
+ title=&quot;Type to search, Up and Down to navigate, Enter to load&quot;&gt;
245
+ &lt;/h3&gt;
246
+ &lt;/form&gt;
247
+
248
+ &lt;ul id=&quot;search-results&quot; class=&quot;initially-hidden&quot;&gt;&lt;/ul&gt;</pre>
249
+
250
+ <p>&lt;/nav&gt;</p>
251
+
252
+ <pre>&lt;div id=&quot;project-metadata&quot;&gt;
253
+ &lt;nav id=&quot;fileindex-section&quot; class=&quot;section project-section&quot;&gt;
254
+ &lt;h3 class=&quot;section-header&quot;&gt;Pages&lt;/h3&gt;
255
+
256
+ &lt;ul&gt;
257
+
258
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/Densa_html.html&quot;&gt;Densa.html&lt;/a&gt;
259
+
260
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/Dispersa_html.html&quot;&gt;Dispersa.html&lt;/a&gt;
261
+
262
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/Fraccion_html.html&quot;&gt;Fraccion.html&lt;/a&gt;
263
+
264
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/Matriz_html.html&quot;&gt;Matriz.html&lt;/a&gt;
265
+
266
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/Object_html.html&quot;&gt;Object.html&lt;/a&gt;
267
+
268
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/P10lppt13_html.html&quot;&gt;P10lppt13.html&lt;/a&gt;
269
+
270
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/VectorDisperso_html.html&quot;&gt;VectorDisperso.html&lt;/a&gt;
271
+
272
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/created_rid.html&quot;&gt;created.rid&lt;/a&gt;
273
+
274
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/Densa_html_html.html&quot;&gt;Densa_html.html&lt;/a&gt;
275
+
276
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/Dispersa_html_html.html&quot;&gt;Dispersa_html.html&lt;/a&gt;
277
+
278
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/Fraccion_html_html.html&quot;&gt;Fraccion_html.html&lt;/a&gt;
279
+
280
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/Matriz_html_html.html&quot;&gt;Matriz_html.html&lt;/a&gt;
281
+
282
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/Object_html_html.html&quot;&gt;Object_html.html&lt;/a&gt;
283
+
284
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/P10lppt13_html_html.html&quot;&gt;P10lppt13_html.html&lt;/a&gt;
285
+
286
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/VectorDisperso_html_html.html&quot;&gt;VectorDisperso_html.html&lt;/a&gt;
287
+
288
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/created_rid_html.html&quot;&gt;created_rid.html&lt;/a&gt;
289
+
290
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/doc/created_rid_html_html.html&quot;&gt;created_rid_html.html&lt;/a&gt;
291
+
292
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/fraccion_rb~_html_html.html&quot;&gt;fraccion_rb~_html.html&lt;/a&gt;
293
+
294
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/index_html_html.html&quot;&gt;index_html.html&lt;/a&gt;
295
+
296
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/js/darkfish_js_html.html&quot;&gt;darkfish_js.html&lt;/a&gt;
297
+
298
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/js/jquery_js_html.html&quot;&gt;jquery_js.html&lt;/a&gt;
299
+
300
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/js/navigation_js_html.html&quot;&gt;navigation_js.html&lt;/a&gt;
301
+
302
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/js/search_index_js_html.html&quot;&gt;search_index_js.html&lt;/a&gt;
303
+
304
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/js/search_js_html.html&quot;&gt;search_js.html&lt;/a&gt;
305
+
306
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/js/searcher_js_html.html&quot;&gt;searcher_js.html&lt;/a&gt;
307
+
308
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/rdoc_css_html.html&quot;&gt;rdoc_css.html&lt;/a&gt;
309
+
310
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/doc/table_of_contents_html_html.html&quot;&gt;table_of_contents_html.html&lt;/a&gt;
311
+
312
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/fraccion_rb~_html.html&quot;&gt;fraccion_rb~.html&lt;/a&gt;
313
+
314
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/index_html.html&quot;&gt;index.html&lt;/a&gt;
315
+
316
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/js/darkfish_js.html&quot;&gt;darkfish.js&lt;/a&gt;
317
+
318
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/js/jquery_js.html&quot;&gt;jquery.js&lt;/a&gt;
319
+
320
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/js/navigation_js.html&quot;&gt;navigation.js&lt;/a&gt;
321
+
322
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/js/search_js.html&quot;&gt;search.js&lt;/a&gt;
323
+
324
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/js/search_index_js.html&quot;&gt;search_index.js&lt;/a&gt;
325
+
326
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/js/searcher_js.html&quot;&gt;searcher.js&lt;/a&gt;
327
+
328
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/p10lppt13_rb~_html.html&quot;&gt;p10lppt13_rb~.html&lt;/a&gt;
329
+
330
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/rdoc_css.html&quot;&gt;rdoc.css&lt;/a&gt;
331
+
332
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./doc/table_of_contents_html.html&quot;&gt;table_of_contents.html&lt;/a&gt;
333
+
334
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./fraccion_rb~.html&quot;&gt;fraccion.rb~&lt;/a&gt;
335
+
336
+ &lt;li class=&quot;file&quot;&gt;&lt;a href=&quot;./p10lppt13_rb~.html&quot;&gt;p10lppt13.rb~&lt;/a&gt;
337
+
338
+ &lt;/ul&gt;</pre>
339
+
340
+ <p>&lt;/nav&gt;</p>
341
+
342
+ <pre> &lt;nav id=&quot;classindex-section&quot; class=&quot;section project-section&quot;&gt;
343
+ &lt;h3 class=&quot;section-header&quot;&gt;Class and Module Index&lt;/h3&gt;
344
+
345
+ &lt;ul class=&quot;link-list&quot;&gt;
346
+
347
+ &lt;li&gt;&lt;a href=&quot;./Densa.html&quot;&gt;Densa&lt;/a&gt;
348
+
349
+ &lt;li&gt;&lt;a href=&quot;./Dispersa.html&quot;&gt;Dispersa&lt;/a&gt;
350
+
351
+ &lt;li&gt;&lt;a href=&quot;./Fraccion.html&quot;&gt;Fraccion&lt;/a&gt;
352
+
353
+ &lt;li&gt;&lt;a href=&quot;./Matriz.html&quot;&gt;Matriz&lt;/a&gt;
354
+
355
+ &lt;li&gt;&lt;a href=&quot;./Object.html&quot;&gt;Object&lt;/a&gt;
356
+
357
+ &lt;li&gt;&lt;a href=&quot;./P10lppt13.html&quot;&gt;P10lppt13&lt;/a&gt;
358
+
359
+ &lt;li&gt;&lt;a href=&quot;./VectorDisperso.html&quot;&gt;VectorDisperso&lt;/a&gt;
360
+
361
+ &lt;/ul&gt;</pre>
362
+
363
+ <p>&lt;/nav&gt;</p>
364
+
365
+ <pre>&lt;/div&gt;</pre>
366
+
367
+ <p>&lt;/nav&gt;</p>
368
+
369
+ <p>&lt;div id=“documentation” class=“description”&gt;</p>
370
+
371
+ <p>&lt;p&gt;require “fraccion.rb”&lt;/p&gt;</p>
372
+
373
+ <p>&lt;p&gt;# Clase base &lt;a href=“Matriz.html”&gt;Matriz&lt;/a&gt;, que
374
+ guarda el numero de filas y columnas class &lt;a
375
+ href=“Matriz.html”&gt;Matriz&lt;/a&gt;&lt;/p&gt;</p>
376
+
377
+ <p>&lt;pre class=“ruby”&gt;&lt;span class=“ruby-comment”&gt;#Variable que
378
+ almacena el numero de filas de la matriz&lt;/span&gt; &lt;span
379
+ class=“ruby-identifier”&gt;attr_reader&lt;/span&gt; :&lt;span
380
+ class=“ruby-identifier”&gt;nfil&lt;/span&gt; &lt;span
381
+ class=“ruby-comment”&gt;#Variable que almacena el numero de columnas de la
382
+ matriz&lt;/span&gt; &lt;span
383
+ class=“ruby-identifier”&gt;attr_reader&lt;/span&gt; :&lt;span
384
+ class=“ruby-identifier”&gt;ncol&lt;/span&gt;</p>
385
+
386
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo initilize de la clase
387
+ base&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
388
+ &lt;span class=“ruby-identifier”&gt;initialize&lt;/span&gt;(&lt;span
389
+ class=“ruby-identifier”&gt;nfil&lt;/span&gt;, &lt;span
390
+ class=“ruby-identifier”&gt;ncol&lt;/span&gt;)</p>
391
+
392
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;nfil&lt;/span&gt;
393
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;</pre>
394
+
395
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
396
+
397
+ <p>&lt;span class=“ruby-comment”&gt;# Getter de nfil (devuelve el numero de
398
+ filas de la matriz)&lt;/span&gt; &lt;span
399
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
400
+ class=“ruby-identifier”&gt;filas&lt;/span&gt;</p>
401
+
402
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;</pre>
403
+
404
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
405
+
406
+ <p>&lt;span class=“ruby-comment”&gt;# Getter de ncol (devuelve el numero de
407
+ columnas de la matriz)&lt;/span&gt; &lt;span
408
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
409
+ class=“ruby-identifier”&gt;colum&lt;/span&gt;</p>
410
+
411
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;</pre>
412
+
413
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
414
+
415
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para convertir la matriz a string
416
+ (a una cadena)&lt;/span&gt; &lt;span
417
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
418
+ class=“ruby-identifier”&gt;to_s&lt;/span&gt;</p>
419
+
420
+ <pre>&lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; = &lt;span class=&quot;ruby-string&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
421
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
422
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
423
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-node&quot;&gt;&amp;quot;#{pos[i][j]}\t&amp;quot;&lt;/span&gt;
424
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
425
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-string&quot;&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;
426
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
427
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt;</pre>
428
+
429
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
430
+
431
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para sumar dos matrices (si
432
+ tienen la misma dimension)&lt;/span&gt; &lt;span
433
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
434
+ class=“ruby-operator”&gt;+&lt;/span&gt;(&lt;span
435
+ class=“ruby-identifier”&gt;other&lt;/span&gt;)</p>
436
+
437
+ <pre>&lt;span class=&quot;ruby-comment&quot;&gt;# Primero se comprueba si se pueden sumar (si tienen la misma dimension)&lt;/span&gt;
438
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; ((&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;nfil&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;||&lt;/span&gt; (&lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;))
439
+ &lt;span class=&quot;ruby-identifier&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;ruby-string&quot;&gt;&amp;quot;No se pueden sumar las matrices&amp;quot;&lt;/span&gt;
440
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
441
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
442
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
443
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
444
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
445
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
446
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
447
+ &lt;span class=&quot;ruby-keyword&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
448
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
449
+ &lt;span class=&quot;ruby-keyword&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
450
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;
451
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
452
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
453
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
454
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
455
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt;
456
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
457
+ &lt;span class=&quot;ruby-constant&quot;&gt;Densa&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;, &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt;)
458
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;</pre>
459
+
460
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
461
+
462
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para restar dos matrices (si
463
+ tienen la misma dimension)&lt;/span&gt; &lt;span
464
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
465
+ class=“ruby-operator”&gt;-&lt;/span&gt;(&lt;span
466
+ class=“ruby-identifier”&gt;other&lt;/span&gt;)</p>
467
+
468
+ <pre>&lt;span class=&quot;ruby-comment&quot;&gt;# Primero se comprueba si se pueden restar (si tienen la misma dimension)&lt;/span&gt;
469
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; ((&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;nfil&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;||&lt;/span&gt; (&lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;))
470
+ &lt;span class=&quot;ruby-identifier&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;ruby-string&quot;&gt;&amp;quot;No se pueden restar las matrices&amp;quot;&lt;/span&gt;
471
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
472
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
473
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
474
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
475
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
476
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
477
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
478
+ &lt;span class=&quot;ruby-keyword&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
479
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
480
+ &lt;span class=&quot;ruby-keyword&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
481
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;
482
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
483
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
484
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
485
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
486
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt;
487
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
488
+ &lt;span class=&quot;ruby-constant&quot;&gt;Densa&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;, &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt;)
489
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;</pre>
490
+
491
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
492
+
493
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para hallar el primer valor no
494
+ nulo de una matriz&lt;/span&gt; &lt;span
495
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
496
+ class=“ruby-identifier”&gt;primervalor&lt;/span&gt;</p>
497
+
498
+ <pre>&lt;span class=&quot;ruby-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;
499
+ &lt;span class=&quot;ruby-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ruby-ivar&quot;&gt;@nncol&lt;/span&gt;
500
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;)
501
+ &lt;span class=&quot;ruby-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
502
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
503
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
504
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;</pre>
505
+
506
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
507
+
508
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para hallar el valor maximo de
509
+ los elementos de una matriz&lt;/span&gt; &lt;span
510
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
511
+ class=“ruby-identifier”&gt;max&lt;/span&gt;</p>
512
+
513
+ <pre>&lt;span class=&quot;ruby-identifier&quot;&gt;acum&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;][&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;]
514
+ &lt;span class=&quot;ruby-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;filas&lt;/span&gt;
515
+ &lt;span class=&quot;ruby-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;colum&lt;/span&gt;
516
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
517
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;acum&lt;/span&gt;
518
+ &lt;span class=&quot;ruby-identifier&quot;&gt;acum&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
519
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
520
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
521
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
522
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
523
+ &lt;span class=&quot;ruby-identifier&quot;&gt;acum&lt;/span&gt;</pre>
524
+
525
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
526
+
527
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para hallar el valor minimo de
528
+ los elementos de una matriz&lt;/span&gt; &lt;span
529
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
530
+ class=“ruby-identifier”&gt;min&lt;/span&gt;</p>
531
+
532
+ <pre>&lt;span class=&quot;ruby-identifier&quot;&gt;acum&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;][&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;]
533
+ &lt;span class=&quot;ruby-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;filas&lt;/span&gt;
534
+ &lt;span class=&quot;ruby-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;colum&lt;/span&gt;
535
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
536
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;acum&lt;/span&gt;
537
+ &lt;span class=&quot;ruby-identifier&quot;&gt;acum&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
538
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
539
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
540
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
541
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
542
+ &lt;span class=&quot;ruby-identifier&quot;&gt;acum&lt;/span&gt;</pre>
543
+
544
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
545
+
546
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para multiplicacion dos
547
+ matrices&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
548
+ &lt;span class=“ruby-identifier”&gt;por&lt;/span&gt;(&lt;span
549
+ class=“ruby-identifier”&gt;other&lt;/span&gt;)</p>
550
+
551
+ <pre>&lt;span class=&quot;ruby-comment&quot;&gt;# Primero se comprueba si se pueden multiplicar (las dimensiones deben ser nxm y mxn)&lt;/span&gt;
552
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; ((&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;||&lt;/span&gt; (&lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;nfil&lt;/span&gt;))
553
+ &lt;span class=&quot;ruby-identifier&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;ruby-string&quot;&gt;&amp;quot;No se pueden multiplicarr las matrices&amp;quot;&lt;/span&gt;
554
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
555
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
556
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
557
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
558
+ &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
559
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; = &lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;
560
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
561
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;
562
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
563
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
564
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
565
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt;
566
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
567
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt;
568
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
569
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
570
+ &lt;span class=&quot;ruby-constant&quot;&gt;Densa&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt;)</pre>
571
+
572
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
573
+
574
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para multiplicacion dos
575
+ matrices&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
576
+ &lt;span class=“ruby-identifier”&gt;porf&lt;/span&gt;(&lt;span
577
+ class=“ruby-identifier”&gt;other&lt;/span&gt;)</p>
578
+
579
+ <pre>&lt;span class=&quot;ruby-comment&quot;&gt;# Primero se comprueba si se pueden multiplicar (las dimensiones deben ser nxm y mxn)&lt;/span&gt;
580
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; ((&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;||&lt;/span&gt; (&lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;nfil&lt;/span&gt;))
581
+ &lt;span class=&quot;ruby-identifier&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;ruby-string&quot;&gt;&amp;quot;No se pueden multiplicarr las matrices&amp;quot;&lt;/span&gt;
582
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
583
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
584
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
585
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
586
+ &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
587
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Fraccion&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt;)
588
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt;
589
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
590
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;ruby-keyword&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;)
591
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
592
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
593
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
594
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
595
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt;
596
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
597
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
598
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt;
599
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
600
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
601
+ &lt;span class=&quot;ruby-constant&quot;&gt;Densa&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt;)</pre>
602
+
603
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
604
+
605
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para multiplicar una matriz por
606
+ un escalar&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
607
+ &lt;span class=“ruby-operator”&gt;*&lt;/span&gt;(&lt;span
608
+ class=“ruby-identifier”&gt;other&lt;/span&gt;)</p>
609
+
610
+ <pre>&lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
611
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
612
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
613
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
614
+ &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;nil&lt;/span&gt;)
615
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]&lt;span class=&quot;ruby-operator&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;other&lt;/span&gt;
616
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
617
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
618
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
619
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
620
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt;
621
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
622
+ &lt;span class=&quot;ruby-constant&quot;&gt;Densa&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;, &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt;)</pre>
623
+
624
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
625
+
626
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para hallar la traspuesta de una
627
+ matriz&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
628
+ &lt;span class=“ruby-identifier”&gt;trasponer&lt;/span&gt;</p>
629
+
630
+ <pre>&lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
631
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
632
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
633
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
634
+ &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;]
635
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
636
+ &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;fila&lt;/span&gt;
637
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
638
+ &lt;span class=&quot;ruby-constant&quot;&gt;Densa&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;, &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;elemento&lt;/span&gt;)</pre>
639
+
640
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
641
+
642
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para convertir la matriz en un
643
+ vector&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
644
+ &lt;span class=“ruby-identifier”&gt;vectorizar&lt;/span&gt;</p>
645
+
646
+ <pre>&lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
647
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@ncol&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
648
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@nfil&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
649
+ &lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;][&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;]
650
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
651
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
652
+ &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;aux&lt;/span&gt;)</pre>
653
+
654
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt; &lt;/pre&gt;</p>
655
+
656
+ <p>&lt;p&gt;end&lt;/p&gt;</p>
657
+
658
+ <p>&lt;p&gt;# Clase de Matrices Densas class &lt;a
659
+ href=“Densa.html”&gt;Densa&lt;/a&gt; &amp;lt; &lt;a
660
+ href=“Matriz.html”&gt;Matriz&lt;/a&gt;&lt;/p&gt;</p>
661
+
662
+ <p>&lt;pre class=“ruby”&gt;&lt;span
663
+ class=“ruby-identifier”&gt;attr_reader&lt;/span&gt; :&lt;span
664
+ class=“ruby-identifier”&gt;pos&lt;/span&gt;</p>
665
+
666
+ <p>&lt;span class=“ruby-comment”&gt;# Constructor de la clase <a
667
+ href="../Matriz.html">Matriz</a> <a
668
+ href="../Densa.html">Densa</a>&lt;/span&gt; &lt;span
669
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
670
+ class=“ruby-identifier”&gt;initialize&lt;/span&gt;(&lt;span
671
+ class=“ruby-identifier”&gt;nfil&lt;/span&gt;, &lt;span
672
+ class=“ruby-identifier”&gt;ncol&lt;/span&gt;, &lt;span
673
+ class=“ruby-identifier”&gt;pos&lt;/span&gt;)</p>
674
+
675
+ <pre>&lt;span class=&quot;ruby-keyword&quot;&gt;super&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;nfil&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;)
676
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@pos&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Array&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;pos&lt;/span&gt;)</pre>
677
+
678
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
679
+
680
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo de acceso a las
681
+ filas&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
682
+ &lt;span class=“ruby-operator”&gt;[]&lt;/span&gt;(&lt;span
683
+ class=“ruby-identifier”&gt;i&lt;/span&gt;)</p>
684
+
685
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@data&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;]</pre>
686
+
687
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
688
+
689
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo de acceso a las
690
+ posiciones&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
691
+ &lt;span class=“ruby-operator”&gt;[]=&lt;/span&gt;(&lt;span
692
+ class=“ruby-identifier”&gt;i&lt;/span&gt;,&lt;span
693
+ class=“ruby-identifier”&gt;value&lt;/span&gt;)</p>
694
+
695
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@data&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;] = &lt;span class=&quot;ruby-identifier&quot;&gt;value&lt;/span&gt;</pre>
696
+
697
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt; &lt;/pre&gt;</p>
698
+
699
+ <p>&lt;p&gt;end&lt;/p&gt;</p>
700
+
701
+ <p>&lt;p&gt;# Clase de Vectores dispersos class &lt;a
702
+ href=“VectorDisperso.html”&gt;VectorDisperso&lt;/a&gt;&lt;/p&gt;</p>
703
+
704
+ <p>&lt;pre class=“ruby”&gt;&lt;span
705
+ class=“ruby-identifier”&gt;attr_reader&lt;/span&gt; :&lt;span
706
+ class=“ruby-identifier”&gt;vector&lt;/span&gt;</p>
707
+
708
+ <p>&lt;span class=“ruby-comment”&gt;# Constructor de la clase <a
709
+ href="../VectorDisperso.html">VectorDisperso</a>&lt;/span&gt; &lt;span
710
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
711
+ class=“ruby-identifier”&gt;initialize&lt;/span&gt;(&lt;span
712
+ class=“ruby-identifier”&gt;h&lt;/span&gt; = {})</p>
713
+
714
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@vector&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Hash&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;)
715
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@vector&lt;/span&gt; = &lt;span class=&quot;ruby-ivar&quot;&gt;@vector&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;merge!&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;h&lt;/span&gt;)</pre>
716
+
717
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
718
+
719
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para acceder a una
720
+ posicion&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
721
+ &lt;span class=“ruby-operator”&gt;[]&lt;/span&gt;(&lt;span
722
+ class=“ruby-identifier”&gt;i&lt;/span&gt;)</p>
723
+
724
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@vector&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;]</pre>
725
+
726
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
727
+
728
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para convertir a un
729
+ string&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
730
+ &lt;span class=“ruby-identifier”&gt;to_s&lt;/span&gt;</p>
731
+
732
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@vector&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;to_s&lt;/span&gt;</pre>
733
+
734
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt; &lt;/pre&gt;</p>
735
+
736
+ <p>&lt;p&gt;end&lt;/p&gt;</p>
737
+
738
+ <p>&lt;p&gt;# Clase de Matrices Dispersas class &lt;a
739
+ href=“Dispersa.html”&gt;Dispersa&lt;/a&gt; &amp;lt; &lt;a
740
+ href=“Matriz.html”&gt;Matriz&lt;/a&gt;&lt;/p&gt;</p>
741
+
742
+ <p>&lt;pre class=“ruby”&gt;&lt;span
743
+ class=“ruby-identifier”&gt;attr_reader&lt;/span&gt; :&lt;span
744
+ class=“ruby-identifier”&gt;pos&lt;/span&gt;</p>
745
+
746
+ <p>&lt;span class=“ruby-comment”&gt;# Constructor de la clase <a
747
+ href="../Matriz.html">Matriz</a> <a
748
+ href="../Dispersa.html">Dispersa</a>&lt;/span&gt; &lt;span
749
+ class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
750
+ class=“ruby-identifier”&gt;initialize&lt;/span&gt;(&lt;span
751
+ class=“ruby-identifier”&gt;nfil&lt;/span&gt;, &lt;span
752
+ class=“ruby-identifier”&gt;ncol&lt;/span&gt;, &lt;span
753
+ class=“ruby-identifier”&gt;h&lt;/span&gt; = {})</p>
754
+
755
+ <pre>&lt;span class=&quot;ruby-keyword&quot;&gt;super&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;nfil&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;ncol&lt;/span&gt;)
756
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@pos&lt;/span&gt; = &lt;span class=&quot;ruby-constant&quot;&gt;Hash&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;({})
757
+ &lt;span class=&quot;ruby-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;h&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;keys&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt;
758
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;] = &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;h&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;].&lt;span class=&quot;ruby-identifier&quot;&gt;is_a?&lt;/span&gt; &lt;span class=&quot;ruby-constant&quot;&gt;VectorDisperso&lt;/span&gt;
759
+ &lt;span class=&quot;ruby-identifier&quot;&gt;h&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;]
760
+ &lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
761
+ &lt;span class=&quot;ruby-ivar&quot;&gt;@pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;] = &lt;span class=&quot;ruby-constant&quot;&gt;VectorDisperso&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;h&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;k&lt;/span&gt;])
762
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
763
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;</pre>
764
+
765
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
766
+
767
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para acceder a una posicion de la
768
+ matriz&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
769
+ &lt;span class=“ruby-operator”&gt;[]&lt;/span&gt;(&lt;span
770
+ class=“ruby-identifier”&gt;i&lt;/span&gt;)</p>
771
+
772
+ <pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;i&lt;/span&gt;]</pre>
773
+
774
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;</p>
775
+
776
+ <p>&lt;span class=“ruby-comment”&gt;# Metodo para acceder a una columna de la
777
+ matriz&lt;/span&gt; &lt;span class=“ruby-keyword”&gt;def&lt;/span&gt;
778
+ &lt;span class=“ruby-identifier”&gt;col&lt;/span&gt;(&lt;span
779
+ class=“ruby-identifier”&gt;j&lt;/span&gt;)</p>
780
+
781
+ <pre>&lt;span class=&quot;ruby-identifier&quot;&gt;c&lt;/span&gt; = {}
782
+ &lt;span class=&quot;ruby-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;r&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;ruby-ivar&quot;&gt;@pos&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;keys&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt;
783
+ &lt;span class=&quot;ruby-identifier&quot;&gt;c&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;r&lt;/span&gt;] = &lt;span class=&quot;ruby-ivar&quot;&gt;@pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;r&lt;/span&gt;].&lt;span class=&quot;ruby-identifier&quot;&gt;vector&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;] &lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-ivar&quot;&gt;@pos&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;r&lt;/span&gt;].&lt;span class=&quot;ruby-identifier&quot;&gt;vector&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;keys&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;include?&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;j&lt;/span&gt;
784
+ &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
785
+ &lt;span class=&quot;ruby-constant&quot;&gt;VectorDisperso&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;c&lt;/span&gt;</pre>
786
+
787
+ <p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt; &lt;/pre&gt;</p>
788
+
789
+ <p>&lt;p&gt;end&lt;/p&gt;</p>
790
+
791
+ <p>&lt;/div&gt;</p>
792
+
793
+ <p>&lt;footer id=“validator-badges”&gt;</p>
794
+
795
+ <pre>&lt;p&gt;&lt;a href=&quot;http://validator.w3.org/check/referer&quot;&gt;[Validate]&lt;/a&gt;
796
+ &lt;p&gt;Generated by &lt;a href=&quot;https://github.com/rdoc/rdoc&quot;&gt;RDoc&lt;/a&gt; 4.0.0.
797
+ &lt;p&gt;Generated with the &lt;a href=&quot;http://deveiate.org/projects/Darkfish-Rdoc/&quot;&gt;Darkfish Rdoc Generator&lt;/a&gt; 3.</pre>
798
+
799
+ <p>&lt;/footer&gt;</p>
800
+
801
+ </div>
802
+
803
+
804
+
805
+ <footer id="validator-badges">
806
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
807
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
808
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
809
+ </footer>
810
+