modai_prct12 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +6 -0
- data/Gemfile +9 -0
- data/Guardfile +346 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +6 -0
- data/documentacion/classes/MatrizAbstracta.html +144 -0
- data/documentacion/classes/MatrizAbstracta.src/M000032.html +21 -0
- data/documentacion/classes/MatrizDSL.html +212 -0
- data/documentacion/classes/MatrizDSL.src/M000028.html +36 -0
- data/documentacion/classes/MatrizDSL.src/M000029.html +20 -0
- data/documentacion/classes/MatrizDSL.src/M000030.html +27 -0
- data/documentacion/classes/MatrizDSL.src/M000031.html +40 -0
- data/documentacion/classes/MatrizDensa.html +345 -0
- data/documentacion/classes/MatrizDensa.src/M000016.html +18 -0
- data/documentacion/classes/MatrizDensa.src/M000017.html +37 -0
- data/documentacion/classes/MatrizDensa.src/M000018.html +27 -0
- data/documentacion/classes/MatrizDensa.src/M000019.html +44 -0
- data/documentacion/classes/MatrizDensa.src/M000020.html +41 -0
- data/documentacion/classes/MatrizDensa.src/M000021.html +29 -0
- data/documentacion/classes/MatrizDensa.src/M000022.html +37 -0
- data/documentacion/classes/MatrizDensa.src/M000023.html +28 -0
- data/documentacion/classes/MatrizDensa.src/M000024.html +28 -0
- data/documentacion/classes/MatrizDensa.src/M000025.html +35 -0
- data/documentacion/classes/MatrizDensa.src/M000026.html +18 -0
- data/documentacion/classes/MatrizDensa.src/M000027.html +37 -0
- data/documentacion/classes/MatrizDispersa.html +314 -0
- data/documentacion/classes/MatrizDispersa.src/M000033.html +22 -0
- data/documentacion/classes/MatrizDispersa.src/M000034.html +49 -0
- data/documentacion/classes/MatrizDispersa.src/M000035.html +33 -0
- data/documentacion/classes/MatrizDispersa.src/M000036.html +64 -0
- data/documentacion/classes/MatrizDispersa.src/M000037.html +66 -0
- data/documentacion/classes/MatrizDispersa.src/M000038.html +53 -0
- data/documentacion/classes/MatrizDispersa.src/M000039.html +31 -0
- data/documentacion/classes/MatrizDispersa.src/M000040.html +31 -0
- data/documentacion/classes/MatrizDispersa.src/M000041.html +35 -0
- data/documentacion/classes/MatrizDispersa.src/M000042.html +18 -0
- data/documentacion/classes/ModaiPrct12.html +147 -0
- data/documentacion/classes/Racional.html +380 -0
- data/documentacion/classes/Racional.src/M000002.html +24 -0
- data/documentacion/classes/Racional.src/M000003.html +18 -0
- data/documentacion/classes/Racional.src/M000004.html +22 -0
- data/documentacion/classes/Racional.src/M000005.html +18 -0
- data/documentacion/classes/Racional.src/M000006.html +18 -0
- data/documentacion/classes/Racional.src/M000007.html +18 -0
- data/documentacion/classes/Racional.src/M000008.html +18 -0
- data/documentacion/classes/Racional.src/M000009.html +23 -0
- data/documentacion/classes/Racional.src/M000010.html +23 -0
- data/documentacion/classes/Racional.src/M000011.html +23 -0
- data/documentacion/classes/Racional.src/M000012.html +23 -0
- data/documentacion/classes/Racional.src/M000013.html +23 -0
- data/documentacion/classes/Racional.src/M000014.html +19 -0
- data/documentacion/classes/Racional.src/M000015.html +18 -0
- data/documentacion/created.rid +1 -0
- data/documentacion/files/lib/modai_prct12/gcd_rb.html +132 -0
- data/documentacion/files/lib/modai_prct12/gcd_rb.src/M000001.html +22 -0
- data/documentacion/files/lib/modai_prct12/matrizAbstracta_rb.html +108 -0
- data/documentacion/files/lib/modai_prct12/matrizDSL_rb.html +105 -0
- data/documentacion/files/lib/modai_prct12/matrizDensa_rb.html +105 -0
- data/documentacion/files/lib/modai_prct12/matrizDispersa_rb.html +106 -0
- data/documentacion/files/lib/modai_prct12/racional_rb.html +114 -0
- data/documentacion/files/lib/modai_prct12/version_rb.html +101 -0
- data/documentacion/files/lib/modai_prct12_rb.html +112 -0
- data/documentacion/files/spec/modai_prct12_spec_rb.html +116 -0
- data/documentacion/files/spec/spec_helper_rb.html +114 -0
- data/documentacion/fr_class_index.html +32 -0
- data/documentacion/fr_file_index.html +36 -0
- data/documentacion/fr_method_index.html +68 -0
- data/documentacion/index.html +24 -0
- data/documentacion/rdoc-style.css +208 -0
- data/lib/modai_prct12.rb +26 -0
- data/lib/modai_prct12/gcd.rb +9 -0
- data/lib/modai_prct12/matrizAbstracta.rb +30 -0
- data/lib/modai_prct12/matrizDSL.rb +120 -0
- data/lib/modai_prct12/matrizDensa.rb +232 -0
- data/lib/modai_prct12/matrizDispersa.rb +280 -0
- data/lib/modai_prct12/racional.rb +121 -0
- data/lib/modai_prct12/version.rb +3 -0
- data/modai_prct12.gemspec +23 -0
- data/spec/modai_prct12_spec.rb +251 -0
- data/spec/spec_helper.rb +17 -0
- metadata +157 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>abs (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 44</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abs</span>
|
|
15
|
+
<span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">num</span>.<span class="ruby-identifier">abs</span>, <span class="ruby-identifier">denom</span>.<span class="ruby-identifier">abs</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>reciprocal (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 49</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reciprocal</span>
|
|
15
|
+
<span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">denom</span>, <span class="ruby-identifier">num</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>-@ (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 54</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">-@</span>
|
|
15
|
+
<span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">-</span><span class="ruby-identifier">denom</span>, <span class="ruby-identifier">num</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>+ (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 59</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">+</span>(<span class="ruby-identifier">o</span>)
|
|
15
|
+
|
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span>
|
|
17
|
+
<span class="ruby-identifier">o</span> = <span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">o</span>,<span class="ruby-value">1</span>)
|
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
|
+
<span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">num</span><span class="ruby-operator">*</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">denom</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">num</span><span class="ruby-operator">*</span><span class="ruby-identifier">denom</span>, <span class="ruby-identifier">denom</span><span class="ruby-operator">*</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">denom</span>)
|
|
20
|
+
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>- (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 69</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">-</span>(<span class="ruby-identifier">o</span>)
|
|
15
|
+
|
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span>
|
|
17
|
+
<span class="ruby-identifier">o</span> = <span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">o</span>,<span class="ruby-value">1</span>)
|
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
|
+
<span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">num</span><span class="ruby-operator">*</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">denom</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">num</span><span class="ruby-operator">*</span><span class="ruby-identifier">denom</span>, <span class="ruby-identifier">denom</span><span class="ruby-operator">*</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">denom</span>)
|
|
20
|
+
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>* (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 79</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">*</span>(<span class="ruby-identifier">o</span>)
|
|
15
|
+
|
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span>
|
|
17
|
+
<span class="ruby-identifier">o</span> = <span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">o</span>,<span class="ruby-value">1</span>)
|
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
|
+
<span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">num</span><span class="ruby-operator">*</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">num</span>,<span class="ruby-identifier">denom</span><span class="ruby-operator">*</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">denom</span>)
|
|
20
|
+
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>/ (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 89</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">/</span>(<span class="ruby-identifier">o</span>)
|
|
15
|
+
|
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span>
|
|
17
|
+
<span class="ruby-identifier">o</span> = <span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">o</span>,<span class="ruby-value">1</span>)
|
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
|
+
<span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">num</span><span class="ruby-operator">*</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">denom</span>,<span class="ruby-identifier">denom</span><span class="ruby-operator">*</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">num</span>)
|
|
20
|
+
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>% (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 99</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">%</span>(<span class="ruby-identifier">o</span>)
|
|
15
|
+
|
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span>
|
|
17
|
+
<span class="ruby-identifier">o</span> = <span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">o</span>,<span class="ruby-value">1</span>)
|
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
|
+
<span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">num</span><span class="ruby-operator">%</span><span class="ruby-identifier">denom</span>, <span class="ruby-identifier">o</span>.<span class="ruby-identifier">num</span><span class="ruby-operator">%</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">denom</span>)
|
|
20
|
+
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title><=> (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 109</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">o</span>)
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Racional</span>
|
|
16
|
+
(<span class="ruby-identifier">num</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">denom</span>) <span class="ruby-operator"><=></span> (<span class="ruby-identifier">o</span>.<span class="ruby-identifier">num</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">denom</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>coerce (Racional)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/racional.rb, line 115</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">Racional</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">other</span>,<span class="ruby-value">1</span>), <span class="ruby-keyword kw">self</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Wed, 11 Dec 2013 10:33:42 +0000
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: gcd.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>gcd.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/modai_prct12/gcd.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Dec 11 10:19:44 +0000 2013</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
<div id="description">
|
|
72
|
+
<h1>Calcula el maximo comun divisor de dos números</h1>
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div id="method-list">
|
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
|
81
|
+
|
|
82
|
+
<div class="name-list">
|
|
83
|
+
<a href="#M000001">gcd</a>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
<!-- if includes -->
|
|
91
|
+
|
|
92
|
+
<div id="section">
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<!-- if method_list -->
|
|
102
|
+
<div id="methods">
|
|
103
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
104
|
+
|
|
105
|
+
<div id="method-M000001" class="method-detail">
|
|
106
|
+
<a name="M000001"></a>
|
|
107
|
+
|
|
108
|
+
<div class="method-heading">
|
|
109
|
+
<a href="gcd_rb.src/M000001.html" target="Code" class="method-signature"
|
|
110
|
+
onclick="popupCode('gcd_rb.src/M000001.html');return false;">
|
|
111
|
+
<span class="method-name">gcd</span><span class="method-args">(u, v)</span>
|
|
112
|
+
</a>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div class="method-description">
|
|
116
|
+
<h1>Calcula el maximo comun divisor de dos números</h1>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<div id="validator-badges">
|
|
128
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
</body>
|
|
132
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>gcd (lib/modai_prct12/gcd.rb)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/modai_prct12/gcd.rb, line 3</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gcd</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">v</span>)
|
|
15
|
+
<span class="ruby-identifier">u</span>, <span class="ruby-identifier">v</span> = <span class="ruby-identifier">u</span>.<span class="ruby-identifier">abs</span>, <span class="ruby-identifier">v</span>.<span class="ruby-identifier">abs</span>
|
|
16
|
+
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
|
17
|
+
<span class="ruby-identifier">u</span>, <span class="ruby-identifier">v</span> = <span class="ruby-identifier">v</span>, <span class="ruby-identifier">u</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">v</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
|
+
<span class="ruby-identifier">u</span>
|
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: matrizAbstracta.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>matrizAbstracta.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/modai_prct12/matrizAbstracta.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Dec 11 10:19:44 +0000 2013</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<div id="requires-list">
|
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
|
74
|
+
|
|
75
|
+
<div class="name-list">
|
|
76
|
+
./lib/modai_prct12/racional.rb
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
<!-- if includes -->
|
|
87
|
+
|
|
88
|
+
<div id="section">
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<!-- if method_list -->
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<div id="validator-badges">
|
|
104
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
</body>
|
|
108
|
+
</html>
|