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,1023 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Fraccion - 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 id="top" class="class">
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="file-metadata">
49
+ <nav id="file-list-section" class="section">
50
+ <h3 class="section-header">Defined In</h3>
51
+ <ul>
52
+ <li>fraccion.rb
53
+ </ul>
54
+ </nav>
55
+
56
+
57
+ </div>
58
+
59
+ <div id="class-metadata">
60
+
61
+ <nav id="parent-class-section" class="section">
62
+ <h3 class="section-header">Parent</h3>
63
+
64
+ <p class="link"><a href="Object.html">Object</a>
65
+
66
+ </nav>
67
+
68
+ <!-- Included Modules -->
69
+ <nav id="includes-section" class="section">
70
+ <h3 class="section-header">Included Modules</h3>
71
+
72
+ <ul class="link-list">
73
+
74
+
75
+ <li><span class="include">Comparable</span>
76
+
77
+
78
+ </ul>
79
+ </nav>
80
+
81
+
82
+ <!-- Method Quickref -->
83
+ <nav id="method-list-section" class="section">
84
+ <h3 class="section-header">Methods</h3>
85
+
86
+ <ul class="link-list">
87
+
88
+ <li ><a href="#method-c-new">::new</a>
89
+
90
+ <li ><a href="#method-i-25">#%</a>
91
+
92
+ <li ><a href="#method-i-2A">#*</a>
93
+
94
+ <li ><a href="#method-i-2B">#+</a>
95
+
96
+ <li ><a href="#method-i-2D">#-</a>
97
+
98
+ <li ><a href="#method-i-2F">#/</a>
99
+
100
+ <li ><a href="#method-i-3C-3D-3E">#&lt;=&gt;</a>
101
+
102
+ <li ><a href="#method-i-3D-3D">#==</a>
103
+
104
+ <li ><a href="#method-i-absoluto">#absoluto</a>
105
+
106
+ <li ><a href="#method-i-coerce">#coerce</a>
107
+
108
+ <li ><a href="#method-i-denom">#denom</a>
109
+
110
+ <li ><a href="#method-i-mcm">#mcm</a>
111
+
112
+ <li ><a href="#method-i-num">#num</a>
113
+
114
+ <li ><a href="#method-i-opuesto">#opuesto</a>
115
+
116
+ <li ><a href="#method-i-reciprocal">#reciprocal</a>
117
+
118
+ <li ><a href="#method-i-simplificar">#simplificar</a>
119
+
120
+ <li ><a href="#method-i-to_f">#to_f</a>
121
+
122
+ <li ><a href="#method-i-to_s">#to_s</a>
123
+
124
+ </ul>
125
+ </nav>
126
+
127
+ </div>
128
+
129
+ <div id="project-metadata">
130
+ <nav id="fileindex-section" class="section project-section">
131
+ <h3 class="section-header">Pages</h3>
132
+
133
+ <ul>
134
+
135
+ <li class="file"><a href="./doc/Densa_html.html">Densa.html</a>
136
+
137
+ <li class="file"><a href="./doc/Dispersa_html.html">Dispersa.html</a>
138
+
139
+ <li class="file"><a href="./doc/Fraccion_html.html">Fraccion.html</a>
140
+
141
+ <li class="file"><a href="./doc/Matriz_html.html">Matriz.html</a>
142
+
143
+ <li class="file"><a href="./doc/Object_html.html">Object.html</a>
144
+
145
+ <li class="file"><a href="./doc/P10lppt13_html.html">P10lppt13.html</a>
146
+
147
+ <li class="file"><a href="./doc/VectorDisperso_html.html">VectorDisperso.html</a>
148
+
149
+ <li class="file"><a href="./doc/created_rid.html">created.rid</a>
150
+
151
+ <li class="file"><a href="./doc/doc/Densa_html_html.html">Densa_html.html</a>
152
+
153
+ <li class="file"><a href="./doc/doc/Dispersa_html_html.html">Dispersa_html.html</a>
154
+
155
+ <li class="file"><a href="./doc/doc/Fraccion_html_html.html">Fraccion_html.html</a>
156
+
157
+ <li class="file"><a href="./doc/doc/Matriz_html_html.html">Matriz_html.html</a>
158
+
159
+ <li class="file"><a href="./doc/doc/Object_html_html.html">Object_html.html</a>
160
+
161
+ <li class="file"><a href="./doc/doc/P10lppt13_html_html.html">P10lppt13_html.html</a>
162
+
163
+ <li class="file"><a href="./doc/doc/VectorDisperso_html_html.html">VectorDisperso_html.html</a>
164
+
165
+ <li class="file"><a href="./doc/doc/created_rid_html.html">created_rid.html</a>
166
+
167
+ <li class="file"><a href="./doc/doc/doc/Densa_html_html_html.html">Densa_html_html.html</a>
168
+
169
+ <li class="file"><a href="./doc/doc/doc/Dispersa_html_html_html.html">Dispersa_html_html.html</a>
170
+
171
+ <li class="file"><a href="./doc/doc/doc/Fraccion_html_html_html.html">Fraccion_html_html.html</a>
172
+
173
+ <li class="file"><a href="./doc/doc/doc/Matriz_html_html_html.html">Matriz_html_html.html</a>
174
+
175
+ <li class="file"><a href="./doc/doc/doc/Object_html_html_html.html">Object_html_html.html</a>
176
+
177
+ <li class="file"><a href="./doc/doc/doc/P10lppt13_html_html_html.html">P10lppt13_html_html.html</a>
178
+
179
+ <li class="file"><a href="./doc/doc/doc/VectorDisperso_html_html_html.html">VectorDisperso_html_html.html</a>
180
+
181
+ <li class="file"><a href="./doc/doc/doc/created_rid_html_html.html">created_rid_html.html</a>
182
+
183
+ <li class="file"><a href="./doc/doc/doc/doc/Densa_html_html_html_html.html">Densa_html_html_html.html</a>
184
+
185
+ <li class="file"><a href="./doc/doc/doc/doc/Dispersa_html_html_html_html.html">Dispersa_html_html_html.html</a>
186
+
187
+ <li class="file"><a href="./doc/doc/doc/doc/Fraccion_html_html_html_html.html">Fraccion_html_html_html.html</a>
188
+
189
+ <li class="file"><a href="./doc/doc/doc/doc/Matriz_html_html_html_html.html">Matriz_html_html_html.html</a>
190
+
191
+ <li class="file"><a href="./doc/doc/doc/doc/Object_html_html_html_html.html">Object_html_html_html.html</a>
192
+
193
+ <li class="file"><a href="./doc/doc/doc/doc/P10lppt13_html_html_html_html.html">P10lppt13_html_html_html.html</a>
194
+
195
+ <li class="file"><a href="./doc/doc/doc/doc/VectorDisperso_html_html_html_html.html">VectorDisperso_html_html_html.html</a>
196
+
197
+ <li class="file"><a href="./doc/doc/doc/doc/created_rid_html_html_html.html">created_rid_html_html.html</a>
198
+
199
+ <li class="file"><a href="./doc/doc/doc/doc/doc/created_rid_html_html_html_html.html">created_rid_html_html_html.html</a>
200
+
201
+ <li class="file"><a href="./doc/doc/doc/doc/fraccion_rb~_html_html_html_html.html">fraccion_rb~_html_html_html.html</a>
202
+
203
+ <li class="file"><a href="./doc/doc/doc/doc/index_html_html_html_html.html">index_html_html_html.html</a>
204
+
205
+ <li class="file"><a href="./doc/doc/doc/doc/js/darkfish_js_html_html_html.html">darkfish_js_html_html.html</a>
206
+
207
+ <li class="file"><a href="./doc/doc/doc/doc/js/jquery_js_html_html_html.html">jquery_js_html_html.html</a>
208
+
209
+ <li class="file"><a href="./doc/doc/doc/doc/js/navigation_js_html_html_html.html">navigation_js_html_html.html</a>
210
+
211
+ <li class="file"><a href="./doc/doc/doc/doc/js/search_index_js_html_html_html.html">search_index_js_html_html.html</a>
212
+
213
+ <li class="file"><a href="./doc/doc/doc/doc/js/search_js_html_html_html.html">search_js_html_html.html</a>
214
+
215
+ <li class="file"><a href="./doc/doc/doc/doc/js/searcher_js_html_html_html.html">searcher_js_html_html.html</a>
216
+
217
+ <li class="file"><a href="./doc/doc/doc/doc/rdoc_css_html_html_html.html">rdoc_css_html_html.html</a>
218
+
219
+ <li class="file"><a href="./doc/doc/doc/doc/table_of_contents_html_html_html_html.html">table_of_contents_html_html_html.html</a>
220
+
221
+ <li class="file"><a href="./doc/doc/doc/fraccion_rb~_html_html_html.html">fraccion_rb~_html_html.html</a>
222
+
223
+ <li class="file"><a href="./doc/doc/doc/index_html_html_html.html">index_html_html.html</a>
224
+
225
+ <li class="file"><a href="./doc/doc/doc/js/darkfish_js_html_html.html">darkfish_js_html.html</a>
226
+
227
+ <li class="file"><a href="./doc/doc/doc/js/jquery_js_html_html.html">jquery_js_html.html</a>
228
+
229
+ <li class="file"><a href="./doc/doc/doc/js/navigation_js_html_html.html">navigation_js_html.html</a>
230
+
231
+ <li class="file"><a href="./doc/doc/doc/js/search_index_js_html_html.html">search_index_js_html.html</a>
232
+
233
+ <li class="file"><a href="./doc/doc/doc/js/search_js_html_html.html">search_js_html.html</a>
234
+
235
+ <li class="file"><a href="./doc/doc/doc/js/searcher_js_html_html.html">searcher_js_html.html</a>
236
+
237
+ <li class="file"><a href="./doc/doc/doc/p10lppt13_rb~_html_html_html.html">p10lppt13_rb~_html_html.html</a>
238
+
239
+ <li class="file"><a href="./doc/doc/doc/rdoc_css_html_html.html">rdoc_css_html.html</a>
240
+
241
+ <li class="file"><a href="./doc/doc/doc/table_of_contents_html_html_html.html">table_of_contents_html_html.html</a>
242
+
243
+ <li class="file"><a href="./doc/doc/fraccion_rb~_html_html.html">fraccion_rb~_html.html</a>
244
+
245
+ <li class="file"><a href="./doc/doc/index_html_html.html">index_html.html</a>
246
+
247
+ <li class="file"><a href="./doc/doc/js/darkfish_js_html.html">darkfish_js.html</a>
248
+
249
+ <li class="file"><a href="./doc/doc/js/jquery_js_html.html">jquery_js.html</a>
250
+
251
+ <li class="file"><a href="./doc/doc/js/navigation_js_html.html">navigation_js.html</a>
252
+
253
+ <li class="file"><a href="./doc/doc/js/search_index_js_html.html">search_index_js.html</a>
254
+
255
+ <li class="file"><a href="./doc/doc/js/search_js_html.html">search_js.html</a>
256
+
257
+ <li class="file"><a href="./doc/doc/js/searcher_js_html.html">searcher_js.html</a>
258
+
259
+ <li class="file"><a href="./doc/doc/p10lppt13_rb~_html_html.html">p10lppt13_rb~_html.html</a>
260
+
261
+ <li class="file"><a href="./doc/doc/rdoc_css_html.html">rdoc_css.html</a>
262
+
263
+ <li class="file"><a href="./doc/doc/table_of_contents_html_html.html">table_of_contents_html.html</a>
264
+
265
+ <li class="file"><a href="./doc/fraccion_rb~_html.html">fraccion_rb~.html</a>
266
+
267
+ <li class="file"><a href="./doc/index_html.html">index.html</a>
268
+
269
+ <li class="file"><a href="./doc/js/darkfish_js.html">darkfish.js</a>
270
+
271
+ <li class="file"><a href="./doc/js/jquery_js.html">jquery.js</a>
272
+
273
+ <li class="file"><a href="./doc/js/navigation_js.html">navigation.js</a>
274
+
275
+ <li class="file"><a href="./doc/js/search_js.html">search.js</a>
276
+
277
+ <li class="file"><a href="./doc/js/search_index_js.html">search_index.js</a>
278
+
279
+ <li class="file"><a href="./doc/js/searcher_js.html">searcher.js</a>
280
+
281
+ <li class="file"><a href="./doc/p10lppt13_rb~_html.html">p10lppt13_rb~.html</a>
282
+
283
+ <li class="file"><a href="./doc/rdoc_css.html">rdoc.css</a>
284
+
285
+ <li class="file"><a href="./doc/table_of_contents_html.html">table_of_contents.html</a>
286
+
287
+ <li class="file"><a href="./fraccion_rb~.html">fraccion.rb~</a>
288
+
289
+ <li class="file"><a href="./gcd_rb~.html">gcd.rb~</a>
290
+
291
+ <li class="file"><a href="./p10lppt13_rb~.html">p10lppt13.rb~</a>
292
+
293
+ </ul>
294
+ </nav>
295
+
296
+ <nav id="classindex-section" class="section project-section">
297
+ <h3 class="section-header">Class and Module Index</h3>
298
+
299
+ <ul class="link-list">
300
+
301
+ <li><a href="./Densa.html">Densa</a>
302
+
303
+ <li><a href="./Dispersa.html">Dispersa</a>
304
+
305
+ <li><a href="./Fraccion.html">Fraccion</a>
306
+
307
+ <li><a href="./Matriz.html">Matriz</a>
308
+
309
+ <li><a href="./Object.html">Object</a>
310
+
311
+ <li><a href="./P10lppt13.html">P10lppt13</a>
312
+
313
+ <li><a href="./VectorDisperso.html">VectorDisperso</a>
314
+
315
+ </ul>
316
+ </nav>
317
+
318
+ </div>
319
+ </nav>
320
+
321
+ <div id="documentation">
322
+ <h1 class="class">class Fraccion</h1>
323
+
324
+ <div id="description" class="description">
325
+
326
+ <pre>Clase Fraccion de la practica #7 de LPP #</pre>
327
+
328
+ <p>Clase para crear instancias de <a href="Fraccion.html">Fraccion</a></p>
329
+
330
+ </div><!-- description -->
331
+
332
+
333
+
334
+
335
+ <section id="5Buntitled-5D" class="documentation-section">
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+ <!-- Attributes -->
344
+ <section id="attribute-method-details" class="method-section section">
345
+ <h3 class="section-header">Attributes</h3>
346
+
347
+
348
+ <div id="attribute-i-denomin" class="method-detail">
349
+ <div class="method-heading attribute-method-heading">
350
+ <span class="method-name">denomin</span><span
351
+ class="attribute-access-type">[R]</span>
352
+ </div>
353
+
354
+ <div class="method-description">
355
+
356
+
357
+
358
+ </div>
359
+ </div>
360
+
361
+ <div id="attribute-i-numer" class="method-detail">
362
+ <div class="method-heading attribute-method-heading">
363
+ <span class="method-name">numer</span><span
364
+ class="attribute-access-type">[R]</span>
365
+ </div>
366
+
367
+ <div class="method-description">
368
+
369
+
370
+
371
+ </div>
372
+ </div>
373
+
374
+ </section><!-- attribute-method-details -->
375
+
376
+
377
+ <!-- Methods -->
378
+
379
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
380
+ <h3 class="section-header">Public Class Methods</h3>
381
+
382
+
383
+ <div id="method-c-new" class="method-detail ">
384
+
385
+ <div class="method-heading">
386
+ <span class="method-name">new</span><span
387
+ class="method-args">(n,d)</span>
388
+
389
+ <span class="method-click-advice">click to toggle source</span>
390
+
391
+ </div>
392
+
393
+
394
+ <div class="method-description">
395
+
396
+
397
+
398
+
399
+
400
+
401
+ <div class="method-source-code" id="new-source">
402
+ <pre><span class="ruby-comment"># File fraccion.rb, line 14</span>
403
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">n</span>,<span class="ruby-identifier">d</span>)
404
+ <span class="ruby-ivar">@numer</span>, <span class="ruby-ivar">@denomin</span> = <span class="ruby-identifier">n</span>, <span class="ruby-identifier">d</span>
405
+ <span class="ruby-keyword">end</span></pre>
406
+ </div><!-- new-source -->
407
+
408
+ </div>
409
+
410
+
411
+
412
+
413
+ </div><!-- new-method -->
414
+
415
+
416
+ </section><!-- public-class-method-details -->
417
+
418
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
419
+ <h3 class="section-header">Public Instance Methods</h3>
420
+
421
+
422
+ <div id="method-i-25" class="method-detail ">
423
+
424
+ <div class="method-heading">
425
+ <span class="method-name">%</span><span
426
+ class="method-args">(other)</span>
427
+
428
+ <span class="method-click-advice">click to toggle source</span>
429
+
430
+ </div>
431
+
432
+
433
+ <div class="method-description">
434
+
435
+ <p>Operador para obtener el resto</p>
436
+
437
+
438
+
439
+
440
+ <div class="method-source-code" id="25-source">
441
+ <pre><span class="ruby-comment"># File fraccion.rb, line 129</span>
442
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">%</span>(<span class="ruby-identifier">other</span>) <span class="ruby-comment">#Obtenemos el resto de la division de dos fracciones </span>
443
+ <span class="ruby-identifier">aux1</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">numer</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">denomin</span> <span class="ruby-comment">#Multiplicamos el numerador de la primera entre el denominador de la segunda</span>
444
+ <span class="ruby-identifier">aux2</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">denomin</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">numer</span> <span class="ruby-comment">#Multiplicamos el denominador de la primera entre el numerador de la segunda</span>
445
+ <span class="ruby-identifier">resto</span> = <span class="ruby-identifier">aux1</span><span class="ruby-operator">%</span><span class="ruby-identifier">aux2</span> <span class="ruby-comment">#Obtenemos el Resto de la fraccion resultante</span>
446
+ <span class="ruby-keyword">end</span></pre>
447
+ </div><!-- 25-source -->
448
+
449
+ </div>
450
+
451
+
452
+
453
+
454
+ </div><!-- 25-method -->
455
+
456
+
457
+ <div id="method-i-2A" class="method-detail ">
458
+
459
+ <div class="method-heading">
460
+ <span class="method-name">*</span><span
461
+ class="method-args">(other)</span>
462
+
463
+ <span class="method-click-advice">click to toggle source</span>
464
+
465
+ </div>
466
+
467
+
468
+ <div class="method-description">
469
+
470
+ <p>Realizamos la multiplicacion de la fraccion implicita con recibida como
471
+ parametro</p>
472
+
473
+
474
+
475
+
476
+ <div class="method-source-code" id="2A-source">
477
+ <pre><span class="ruby-comment"># File fraccion.rb, line 118</span>
478
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">*</span>(<span class="ruby-identifier">other</span>)
479
+ <span class="ruby-identifier">temp</span>=<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@numer</span><span class="ruby-operator">*</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">numer</span>, <span class="ruby-ivar">@denomin</span><span class="ruby-operator">*</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">denomin</span>)
480
+ <span class="ruby-identifier">temp</span>.<span class="ruby-identifier">simplificar</span>
481
+ <span class="ruby-keyword">end</span></pre>
482
+ </div><!-- 2A-source -->
483
+
484
+ </div>
485
+
486
+
487
+
488
+
489
+ </div><!-- 2A-method -->
490
+
491
+
492
+ <div id="method-i-2B" class="method-detail ">
493
+
494
+ <div class="method-heading">
495
+ <span class="method-name">+</span><span
496
+ class="method-args">(other)</span>
497
+
498
+ <span class="method-click-advice">click to toggle source</span>
499
+
500
+ </div>
501
+
502
+
503
+ <div class="method-description">
504
+
505
+ <p>Realizamos la suma de la fraccion implicita con recibida como parametro</p>
506
+
507
+
508
+
509
+
510
+ <div class="method-source-code" id="2B-source">
511
+ <pre><span class="ruby-comment"># File fraccion.rb, line 99</span>
512
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">+</span>(<span class="ruby-identifier">other</span>)
513
+ <span class="ruby-keyword">if</span>(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">instance_of?</span><span class="ruby-constant">Fixnum</span>)
514
+ <span class="ruby-identifier">temp</span>=<span class="ruby-identifier">other</span>
515
+ <span class="ruby-identifier">other</span>=<span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">temp</span>,<span class="ruby-value">1</span>)
516
+ <span class="ruby-keyword">end</span>
517
+
518
+ <span class="ruby-identifier">aux</span> = <span class="ruby-identifier">mcm</span>(<span class="ruby-ivar">@denomin</span>, <span class="ruby-identifier">other</span>.<span class="ruby-identifier">denomin</span>)
519
+ <span class="ruby-identifier">temp</span> = <span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(((<span class="ruby-identifier">aux</span><span class="ruby-operator">/</span><span class="ruby-ivar">@denomin</span>)<span class="ruby-operator">*</span><span class="ruby-ivar">@numer</span>)<span class="ruby-operator">+</span>((<span class="ruby-identifier">aux</span><span class="ruby-operator">/</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">denomin</span>)<span class="ruby-operator">*</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">numer</span>),<span class="ruby-identifier">aux</span>)
520
+ <span class="ruby-identifier">temp</span>.<span class="ruby-identifier">simplificar</span>
521
+ <span class="ruby-keyword">end</span></pre>
522
+ </div><!-- 2B-source -->
523
+
524
+ </div>
525
+
526
+
527
+
528
+
529
+ </div><!-- 2B-method -->
530
+
531
+
532
+ <div id="method-i-2D" class="method-detail ">
533
+
534
+ <div class="method-heading">
535
+ <span class="method-name">-</span><span
536
+ class="method-args">(other)</span>
537
+
538
+ <span class="method-click-advice">click to toggle source</span>
539
+
540
+ </div>
541
+
542
+
543
+ <div class="method-description">
544
+
545
+ <p>Realizamos la resta de la fraccion implicita con recibida como parametro</p>
546
+
547
+
548
+
549
+
550
+ <div class="method-source-code" id="2D-source">
551
+ <pre><span class="ruby-comment"># File fraccion.rb, line 111</span>
552
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">-</span>(<span class="ruby-identifier">other</span>)
553
+ <span class="ruby-identifier">aux</span> = <span class="ruby-identifier">mcm</span>(<span class="ruby-ivar">@denomin</span>, <span class="ruby-identifier">other</span>.<span class="ruby-identifier">denomin</span>)
554
+ <span class="ruby-identifier">temp</span> = <span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(((<span class="ruby-identifier">aux</span><span class="ruby-operator">/</span><span class="ruby-ivar">@denomin</span>)<span class="ruby-operator">*</span><span class="ruby-ivar">@numer</span>)<span class="ruby-operator">-</span>((<span class="ruby-identifier">aux</span><span class="ruby-operator">/</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">denomin</span>)<span class="ruby-operator">*</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">numer</span>),<span class="ruby-identifier">aux</span>)
555
+ <span class="ruby-identifier">temp</span>.<span class="ruby-identifier">simplificar</span>
556
+ <span class="ruby-keyword">end</span></pre>
557
+ </div><!-- 2D-source -->
558
+
559
+ </div>
560
+
561
+
562
+
563
+
564
+ </div><!-- 2D-method -->
565
+
566
+
567
+ <div id="method-i-2F" class="method-detail ">
568
+
569
+ <div class="method-heading">
570
+ <span class="method-name">/</span><span
571
+ class="method-args">(other)</span>
572
+
573
+ <span class="method-click-advice">click to toggle source</span>
574
+
575
+ </div>
576
+
577
+
578
+ <div class="method-description">
579
+
580
+ <p>Realizamos la division de la fraccion implicita con recibida como parametro</p>
581
+
582
+
583
+
584
+
585
+ <div class="method-source-code" id="2F-source">
586
+ <pre><span class="ruby-comment"># File fraccion.rb, line 93</span>
587
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">/</span>(<span class="ruby-identifier">other</span>)
588
+ <span class="ruby-identifier">temp</span> = <span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@numer</span><span class="ruby-operator">*</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">denomin</span>, <span class="ruby-ivar">@denomin</span><span class="ruby-operator">*</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">numer</span>)
589
+ <span class="ruby-identifier">temp</span>.<span class="ruby-identifier">simplificar</span>
590
+ <span class="ruby-keyword">end</span></pre>
591
+ </div><!-- 2F-source -->
592
+
593
+ </div>
594
+
595
+
596
+
597
+
598
+ </div><!-- 2F-method -->
599
+
600
+
601
+ <div id="method-i-3C-3D-3E" class="method-detail ">
602
+
603
+ <div class="method-heading">
604
+ <span class="method-name">&lt;=&gt;</span><span
605
+ class="method-args">(other)</span>
606
+
607
+ <span class="method-click-advice">click to toggle source</span>
608
+
609
+ </div>
610
+
611
+
612
+ <div class="method-description">
613
+
614
+ <p>Operador comparable</p>
615
+
616
+
617
+
618
+
619
+ <div class="method-source-code" id="3C-3D-3E-source">
620
+ <pre><span class="ruby-comment"># File fraccion.rb, line 136</span>
621
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span>(<span class="ruby-identifier">other</span>)
622
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_f</span>
623
+ <span class="ruby-keyword">end</span></pre>
624
+ </div><!-- 3C-3D-3E-source -->
625
+
626
+ </div>
627
+
628
+
629
+
630
+
631
+ </div><!-- 3C-3D-3E-method -->
632
+
633
+
634
+ <div id="method-i-3D-3D" class="method-detail ">
635
+
636
+ <div class="method-heading">
637
+ <span class="method-name">==</span><span
638
+ class="method-args">(other)</span>
639
+
640
+ <span class="method-click-advice">click to toggle source</span>
641
+
642
+ </div>
643
+
644
+
645
+ <div class="method-description">
646
+
647
+ <p>Funcion de comparar igualdad: Comparamos la fraccion implicita, con la que
648
+ le pasamos como parametro</p>
649
+
650
+
651
+
652
+
653
+ <div class="method-source-code" id="3D-3D-source">
654
+ <pre><span class="ruby-comment"># File fraccion.rb, line 53</span>
655
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
656
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">!=</span> <span class="ruby-string">&quot;Fraccion&quot;</span>
657
+ <span class="ruby-identifier">other</span> = <span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">other</span>,<span class="ruby-value">1</span>)
658
+ <span class="ruby-keyword">end</span>
659
+ <span class="ruby-keyword">if</span> ((<span class="ruby-ivar">@numer</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">numer</span>) <span class="ruby-keyword">and</span> (<span class="ruby-ivar">@denomin</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">denomin</span>))
660
+ <span class="ruby-keyword">true</span> <span class="ruby-comment"># Si el numerador y el denominador de la implicita coinciden con los </span>
661
+ <span class="ruby-comment"># de la pasada por parametro, entonces las fracciones son iguales (true)</span>
662
+ <span class="ruby-keyword">else</span>
663
+ <span class="ruby-keyword">false</span> <span class="ruby-comment"># Si no, son distintas (false)</span>
664
+ <span class="ruby-keyword">end</span>
665
+ <span class="ruby-keyword">end</span></pre>
666
+ </div><!-- 3D-3D-source -->
667
+
668
+ </div>
669
+
670
+
671
+
672
+
673
+ </div><!-- 3D-3D-method -->
674
+
675
+
676
+ <div id="method-i-absoluto" class="method-detail ">
677
+
678
+ <div class="method-heading">
679
+ <span class="method-name">absoluto</span><span
680
+ class="method-args">()</span>
681
+
682
+ <span class="method-click-advice">click to toggle source</span>
683
+
684
+ </div>
685
+
686
+
687
+ <div class="method-description">
688
+
689
+ <p>Funcion que devuelve la funcion en valor absoluto</p>
690
+
691
+
692
+
693
+
694
+ <div class="method-source-code" id="absoluto-source">
695
+ <pre><span class="ruby-comment"># File fraccion.rb, line 66</span>
696
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">absoluto</span>
697
+ <span class="ruby-ivar">@numer</span> = <span class="ruby-ivar">@numer</span>.<span class="ruby-identifier">abs</span>
698
+ <span class="ruby-ivar">@denomin</span> = <span class="ruby-ivar">@denomin</span>.<span class="ruby-identifier">abs</span>
699
+ <span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@numer</span>,<span class="ruby-ivar">@denomin</span>)
700
+ <span class="ruby-keyword">end</span></pre>
701
+ </div><!-- absoluto-source -->
702
+
703
+ </div>
704
+
705
+
706
+
707
+
708
+ </div><!-- absoluto-method -->
709
+
710
+
711
+ <div id="method-i-coerce" class="method-detail ">
712
+
713
+ <div class="method-heading">
714
+ <span class="method-name">coerce</span><span
715
+ class="method-args">(other)</span>
716
+
717
+ <span class="method-click-advice">click to toggle source</span>
718
+
719
+ </div>
720
+
721
+
722
+ <div class="method-description">
723
+
724
+ <p>Metodo coerce para cambiar instancia por parametro.</p>
725
+
726
+
727
+
728
+
729
+ <div class="method-source-code" id="coerce-source">
730
+ <pre><span class="ruby-comment"># File fraccion.rb, line 141</span>
731
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
732
+ <span class="ruby-comment">#aux = Fraccion.new(other,1)</span>
733
+ [<span class="ruby-keyword">self</span>,<span class="ruby-identifier">other</span>]
734
+ <span class="ruby-keyword">end</span></pre>
735
+ </div><!-- coerce-source -->
736
+
737
+ </div>
738
+
739
+
740
+
741
+
742
+ </div><!-- coerce-method -->
743
+
744
+
745
+ <div id="method-i-denom" class="method-detail ">
746
+
747
+ <div class="method-heading">
748
+ <span class="method-name">denom</span><span
749
+ class="method-args">()</span>
750
+
751
+ <span class="method-click-advice">click to toggle source</span>
752
+
753
+ </div>
754
+
755
+
756
+ <div class="method-description">
757
+
758
+ <p>Getter del denom</p>
759
+
760
+
761
+
762
+
763
+ <div class="method-source-code" id="denom-source">
764
+ <pre><span class="ruby-comment"># File fraccion.rb, line 28</span>
765
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">denom</span>()
766
+ <span class="ruby-keyword">return</span> <span class="ruby-ivar">@denomin</span>
767
+ <span class="ruby-keyword">end</span></pre>
768
+ </div><!-- denom-source -->
769
+
770
+ </div>
771
+
772
+
773
+
774
+
775
+ </div><!-- denom-method -->
776
+
777
+
778
+ <div id="method-i-mcm" class="method-detail ">
779
+
780
+ <div class="method-heading">
781
+ <span class="method-name">mcm</span><span
782
+ class="method-args">(n, m)</span>
783
+
784
+ <span class="method-click-advice">click to toggle source</span>
785
+
786
+ </div>
787
+
788
+
789
+ <div class="method-description">
790
+
791
+ <p>Necesitamos hallar el minimo comun multiplo para la suma y la resta</p>
792
+
793
+
794
+
795
+
796
+ <div class="method-source-code" id="mcm-source">
797
+ <pre><span class="ruby-comment"># File fraccion.rb, line 87</span>
798
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">mcm</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">m</span>)
799
+ <span class="ruby-identifier">aux</span>=<span class="ruby-identifier">gcd</span>(<span class="ruby-identifier">n</span>,<span class="ruby-identifier">m</span>)
800
+ (<span class="ruby-identifier">n</span><span class="ruby-operator">/</span><span class="ruby-identifier">aux</span>)<span class="ruby-operator">*</span><span class="ruby-identifier">m</span>
801
+ <span class="ruby-keyword">end</span></pre>
802
+ </div><!-- mcm-source -->
803
+
804
+ </div>
805
+
806
+
807
+
808
+
809
+ </div><!-- mcm-method -->
810
+
811
+
812
+ <div id="method-i-num" class="method-detail ">
813
+
814
+ <div class="method-heading">
815
+ <span class="method-name">num</span><span
816
+ class="method-args">()</span>
817
+
818
+ <span class="method-click-advice">click to toggle source</span>
819
+
820
+ </div>
821
+
822
+
823
+ <div class="method-description">
824
+
825
+ <p>Getter del num</p>
826
+
827
+
828
+
829
+
830
+ <div class="method-source-code" id="num-source">
831
+ <pre><span class="ruby-comment"># File fraccion.rb, line 23</span>
832
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">num</span>()
833
+ <span class="ruby-keyword">return</span> <span class="ruby-ivar">@numer</span>
834
+ <span class="ruby-keyword">end</span></pre>
835
+ </div><!-- num-source -->
836
+
837
+ </div>
838
+
839
+
840
+
841
+
842
+ </div><!-- num-method -->
843
+
844
+
845
+ <div id="method-i-opuesto" class="method-detail ">
846
+
847
+ <div class="method-heading">
848
+ <span class="method-name">opuesto</span><span
849
+ class="method-args">()</span>
850
+
851
+ <span class="method-click-advice">click to toggle source</span>
852
+
853
+ </div>
854
+
855
+
856
+ <div class="method-description">
857
+
858
+ <p>Funcion que calcula la fraccion opuesta</p>
859
+
860
+
861
+
862
+
863
+ <div class="method-source-code" id="opuesto-source">
864
+ <pre><span class="ruby-comment"># File fraccion.rb, line 78</span>
865
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">opuesto</span>
866
+ <span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">-</span><span class="ruby-ivar">@numer</span>,<span class="ruby-ivar">@denomin</span>)
867
+ <span class="ruby-keyword">end</span></pre>
868
+ </div><!-- opuesto-source -->
869
+
870
+ </div>
871
+
872
+
873
+
874
+
875
+ </div><!-- opuesto-method -->
876
+
877
+
878
+ <div id="method-i-reciprocal" class="method-detail ">
879
+
880
+ <div class="method-heading">
881
+ <span class="method-name">reciprocal</span><span
882
+ class="method-args">()</span>
883
+
884
+ <span class="method-click-advice">click to toggle source</span>
885
+
886
+ </div>
887
+
888
+
889
+ <div class="method-description">
890
+
891
+ <p>Obtiene la fraccion reciproca a la implicita</p>
892
+
893
+
894
+
895
+
896
+ <div class="method-source-code" id="reciprocal-source">
897
+ <pre><span class="ruby-comment"># File fraccion.rb, line 73</span>
898
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">reciprocal</span>
899
+ <span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@denomin</span>,<span class="ruby-ivar">@numer</span>)
900
+ <span class="ruby-keyword">end</span></pre>
901
+ </div><!-- reciprocal-source -->
902
+
903
+ </div>
904
+
905
+
906
+
907
+
908
+ </div><!-- reciprocal-method -->
909
+
910
+
911
+ <div id="method-i-simplificar" class="method-detail ">
912
+
913
+ <div class="method-heading">
914
+ <span class="method-name">simplificar</span><span
915
+ class="method-args">()</span>
916
+
917
+ <span class="method-click-advice">click to toggle source</span>
918
+
919
+ </div>
920
+
921
+
922
+ <div class="method-description">
923
+
924
+ <p>Funcion para simplificar y mostrar la fraccion en formato reducido</p>
925
+
926
+
927
+
928
+
929
+ <div class="method-source-code" id="simplificar-source">
930
+ <pre><span class="ruby-comment"># File fraccion.rb, line 33</span>
931
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">simplificar</span>
932
+ <span class="ruby-identifier">aux</span> = <span class="ruby-identifier">gcd</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">numer</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">denomin</span>) <span class="ruby-comment"># MCD entre num y denom</span>
933
+ <span class="ruby-constant">Fraccion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">numer</span><span class="ruby-operator">/</span><span class="ruby-identifier">aux</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">denomin</span><span class="ruby-operator">/</span><span class="ruby-identifier">aux</span>) <span class="ruby-comment"># Simplificamos la fraccion que le pasemos</span>
934
+ <span class="ruby-keyword">end</span></pre>
935
+ </div><!-- simplificar-source -->
936
+
937
+ </div>
938
+
939
+
940
+
941
+
942
+ </div><!-- simplificar-method -->
943
+
944
+
945
+ <div id="method-i-to_f" class="method-detail ">
946
+
947
+ <div class="method-heading">
948
+ <span class="method-name">to_f</span><span
949
+ class="method-args">()</span>
950
+
951
+ <span class="method-click-advice">click to toggle source</span>
952
+
953
+ </div>
954
+
955
+
956
+ <div class="method-description">
957
+
958
+ <p>Mostramos los atributos en float</p>
959
+
960
+
961
+
962
+
963
+ <div class="method-source-code" id="to_f-source">
964
+ <pre><span class="ruby-comment"># File fraccion.rb, line 44</span>
965
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_f</span>
966
+ <span class="ruby-ivar">@numer</span><span class="ruby-operator">/</span><span class="ruby-ivar">@denomin</span>.<span class="ruby-identifier">to_f</span>
967
+ <span class="ruby-keyword">end</span></pre>
968
+ </div><!-- to_f-source -->
969
+
970
+ </div>
971
+
972
+
973
+
974
+
975
+ </div><!-- to_f-method -->
976
+
977
+
978
+ <div id="method-i-to_s" class="method-detail ">
979
+
980
+ <div class="method-heading">
981
+ <span class="method-name">to_s</span><span
982
+ class="method-args">()</span>
983
+
984
+ <span class="method-click-advice">click to toggle source</span>
985
+
986
+ </div>
987
+
988
+
989
+ <div class="method-description">
990
+
991
+ <p>Mostramos los atributos en un string</p>
992
+
993
+
994
+
995
+
996
+ <div class="method-source-code" id="to_s-source">
997
+ <pre><span class="ruby-comment"># File fraccion.rb, line 39</span>
998
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
999
+ <span class="ruby-node">&quot;#{@numer}/#{@denomin}&quot;</span>
1000
+ <span class="ruby-keyword">end</span></pre>
1001
+ </div><!-- to_s-source -->
1002
+
1003
+ </div>
1004
+
1005
+
1006
+
1007
+
1008
+ </div><!-- to_s-method -->
1009
+
1010
+
1011
+ </section><!-- public-instance-method-details -->
1012
+
1013
+ </section><!-- 5Buntitled-5D -->
1014
+
1015
+ </div><!-- documentation -->
1016
+
1017
+
1018
+ <footer id="validator-badges">
1019
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
1020
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
1021
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
1022
+ </footer>
1023
+