prct09 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +0 -0
- data/Gemfile +0 -0
- data/Guarfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/bin/prct09 +0 -0
- data/doc/classes/Fraccion.html +365 -0
- data/doc/classes/Fraccion.src/M000024.html +19 -0
- data/doc/classes/Fraccion.src/M000025.html +18 -0
- data/doc/classes/Fraccion.src/M000026.html +18 -0
- data/doc/classes/Fraccion.src/M000027.html +20 -0
- data/doc/classes/Fraccion.src/M000028.html +18 -0
- data/doc/classes/Fraccion.src/M000029.html +18 -0
- data/doc/classes/Fraccion.src/M000030.html +18 -0
- data/doc/classes/Fraccion.src/M000031.html +18 -0
- data/doc/classes/Fraccion.src/M000032.html +18 -0
- data/doc/classes/Fraccion.src/M000033.html +18 -0
- data/doc/classes/Fraccion.src/M000034.html +30 -0
- data/doc/classes/Fraccion.src/M000035.html +18 -0
- data/doc/classes/Fraccion.src/M000036.html +18 -0
- data/doc/classes/Matriz.html +282 -0
- data/doc/classes/Matriz.src/M000015.html +20 -0
- data/doc/classes/Matriz.src/M000016.html +20 -0
- data/doc/classes/Matriz.src/M000017.html +17 -0
- data/doc/classes/Matriz.src/M000018.html +17 -0
- data/doc/classes/Matriz.src/M000019.html +17 -0
- data/doc/classes/Matriz.src/M000020.html +25 -0
- data/doc/classes/Matriz.src/M000021.html +32 -0
- data/doc/classes/Matriz.src/M000022.html +17 -0
- data/doc/classes/Matriz.src/M000023.html +17 -0
- data/doc/classes/Matriz_densa.html +199 -0
- data/doc/classes/Matriz_densa.src/M000010.html +42 -0
- data/doc/classes/Matriz_densa.src/M000011.html +42 -0
- data/doc/classes/Matriz_densa.src/M000012.html +44 -0
- data/doc/classes/Matriz_densa.src/M000013.html +29 -0
- data/doc/classes/Matriz_densa.src/M000014.html +29 -0
- data/doc/classes/Matriz_dispersa.html +269 -0
- data/doc/classes/Matriz_dispersa.src/M000002.html +29 -0
- data/doc/classes/Matriz_dispersa.src/M000003.html +34 -0
- data/doc/classes/Matriz_dispersa.src/M000004.html +52 -0
- data/doc/classes/Matriz_dispersa.src/M000005.html +52 -0
- data/doc/classes/Matriz_dispersa.src/M000006.html +48 -0
- data/doc/classes/Matriz_dispersa.src/M000007.html +29 -0
- data/doc/classes/Matriz_dispersa.src/M000008.html +31 -0
- data/doc/classes/Matriz_dispersa.src/M000009.html +31 -0
- data/doc/classes/Prct09.html +122 -0
- data/doc/classes/Test_Matriz.html +191 -0
- data/doc/classes/Test_Matriz.src/M000037.html +21 -0
- data/doc/classes/Test_Matriz.src/M000038.html +30 -0
- data/doc/classes/Test_Matriz.src/M000039.html +24 -0
- data/doc/classes/Test_Matriz.src/M000040.html +32 -0
- data/doc/created.rid +14 -0
- data/doc/files/lib/Fraccion_rb.html +101 -0
- data/doc/files/lib/Matriz_densa_rb.html +109 -0
- data/doc/files/lib/Matriz_dispersa_rb.html +109 -0
- data/doc/files/lib/Matriz_rb.html +108 -0
- data/doc/files/lib/mcd_rb.html +136 -0
- data/doc/files/lib/mcd_rb.src/M000001.html +22 -0
- data/doc/files/lib/prct09/version_rb.html +101 -0
- data/doc/files/lib/prct09_rb.html +108 -0
- data/doc/files/spec/Matriz_spec_rb.html +117 -0
- data/doc/files/test/tc_matriz_rb.html +112 -0
- data/doc/fr_class_index.html +32 -0
- data/doc/fr_file_index.html +35 -0
- data/doc/fr_method_index.html +66 -0
- data/doc/index.html +150 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/Fraccion.rb +20 -14
- data/lib/Matriz.rb +13 -45
- data/lib/Matriz_densa.rb +30 -25
- data/lib/Matriz_dispersa.rb +40 -32
- data/lib/prct09/version.rb +1 -1
- data/lib/prct09.rb +0 -0
- data/prct09-0.0.1.gem +0 -0
- data/prct09.gemspec +0 -0
- data/spec/Matriz_spec.rb +21 -9
- data/test/tc_matriz.rb +5 -4
- metadata +64 -4
- data/.gitignore +0 -18
- data/lib/mcd.rb +0 -9
@@ -0,0 +1,31 @@
|
|
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>min (Matriz_dispersa)</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/Matriz_dispersa.rb, line 184</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">min</span>()
|
15
|
+
|
16
|
+
<span class="ruby-identifier">aux_min</span> = <span class="ruby-keyword kw">nil</span>
|
17
|
+
|
18
|
+
<span class="ruby-ivar">@filas</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
19
|
+
<span class="ruby-ivar">@cols</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">j</span><span class="ruby-operator">|</span>
|
20
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@matriz</span>[<span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-value str">"_"</span><span class="ruby-operator">+</span><span class="ruby-identifier">j</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">aux_min</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
21
|
+
<span class="ruby-identifier">aux_min</span> = <span class="ruby-value">0</span>
|
22
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@matriz</span>[<span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-value str">"_"</span><span class="ruby-operator">+</span><span class="ruby-identifier">j</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">aux_min</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@matriz</span>[<span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-value str">"_"</span><span class="ruby-operator">+</span><span class="ruby-identifier">j</span>.<span class="ruby-identifier">to_s</span>]
|
23
|
+
<span class="ruby-identifier">aux_min</span> = <span class="ruby-ivar">@matriz</span>[<span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-value str">"_"</span><span class="ruby-operator">+</span><span class="ruby-identifier">j</span>.<span class="ruby-identifier">to_s</span>]
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
25
|
+
<span class="ruby-keyword kw">end</span>
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
27
|
+
|
28
|
+
<span class="ruby-identifier">aux_min</span>
|
29
|
+
<span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,122 @@
|
|
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>Module: Prct09</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="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Prct09</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/prct09_rb.html">
|
59
|
+
lib/prct09.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../files/lib/prct09/version_rb.html">
|
63
|
+
lib/prct09/version.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
|
69
|
+
</table>
|
70
|
+
</div>
|
71
|
+
<!-- banner header -->
|
72
|
+
|
73
|
+
<div id="bodyContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
<div id="contextContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
<!-- if includes -->
|
88
|
+
|
89
|
+
<div id="section">
|
90
|
+
|
91
|
+
|
92
|
+
<div id="constants-list">
|
93
|
+
<h3 class="section-bar">Constants</h3>
|
94
|
+
|
95
|
+
<div class="name-list">
|
96
|
+
<table summary="Constants">
|
97
|
+
<tr class="top-aligned-row context-row">
|
98
|
+
<td class="context-item-name">VERSION</td>
|
99
|
+
<td>=</td>
|
100
|
+
<td class="context-item-value">"0.0.1"</td>
|
101
|
+
</tr>
|
102
|
+
</table>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<!-- if method_list -->
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
<div id="validator-badges">
|
118
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
</body>
|
122
|
+
</html>
|
@@ -0,0 +1,191 @@
|
|
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>Class: Test_Matriz</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="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Test_Matriz</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/test/tc_matriz_rb.html">
|
59
|
+
test/tc_matriz.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Test::Unit::TestCase
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000037">setup</a>
|
90
|
+
<a href="#M000038">test_Comprobacion</a>
|
91
|
+
<a href="#M000040">test_Operacion</a>
|
92
|
+
<a href="#M000039">test_Tipo</a>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
|
98
|
+
|
99
|
+
<!-- if includes -->
|
100
|
+
|
101
|
+
<div id="section">
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<!-- if method_list -->
|
111
|
+
<div id="methods">
|
112
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
113
|
+
|
114
|
+
<div id="method-M000037" class="method-detail">
|
115
|
+
<a name="M000037"></a>
|
116
|
+
|
117
|
+
<div class="method-heading">
|
118
|
+
<a href="Test_Matriz.src/M000037.html" target="Code" class="method-signature"
|
119
|
+
onclick="popupCode('Test_Matriz.src/M000037.html');return false;">
|
120
|
+
<span class="method-name">setup</span><span class="method-args">()</span>
|
121
|
+
</a>
|
122
|
+
</div>
|
123
|
+
|
124
|
+
<div class="method-description">
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div id="method-M000038" class="method-detail">
|
129
|
+
<a name="M000038"></a>
|
130
|
+
|
131
|
+
<div class="method-heading">
|
132
|
+
<a href="Test_Matriz.src/M000038.html" target="Code" class="method-signature"
|
133
|
+
onclick="popupCode('Test_Matriz.src/M000038.html');return false;">
|
134
|
+
<span class="method-name">test_Comprobacion</span><span class="method-args">()</span>
|
135
|
+
</a>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<div class="method-description">
|
139
|
+
<p>
|
140
|
+
comprobacion que se crean bien las matrices
|
141
|
+
</p>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
<div id="method-M000040" class="method-detail">
|
146
|
+
<a name="M000040"></a>
|
147
|
+
|
148
|
+
<div class="method-heading">
|
149
|
+
<a href="Test_Matriz.src/M000040.html" target="Code" class="method-signature"
|
150
|
+
onclick="popupCode('Test_Matriz.src/M000040.html');return false;">
|
151
|
+
<span class="method-name">test_Operacion</span><span class="method-args">()</span>
|
152
|
+
</a>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<div class="method-description">
|
156
|
+
<p>
|
157
|
+
comprobar operaciones
|
158
|
+
</p>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<div id="method-M000039" class="method-detail">
|
163
|
+
<a name="M000039"></a>
|
164
|
+
|
165
|
+
<div class="method-heading">
|
166
|
+
<a href="Test_Matriz.src/M000039.html" target="Code" class="method-signature"
|
167
|
+
onclick="popupCode('Test_Matriz.src/M000039.html');return false;">
|
168
|
+
<span class="method-name">test_Tipo</span><span class="method-args">()</span>
|
169
|
+
</a>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
<div class="method-description">
|
173
|
+
<p>
|
174
|
+
comprobar tipo de matrices
|
175
|
+
</p>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
|
180
|
+
</div>
|
181
|
+
|
182
|
+
|
183
|
+
</div>
|
184
|
+
|
185
|
+
|
186
|
+
<div id="validator-badges">
|
187
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
</body>
|
191
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
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>setup (Test_Matriz)</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 test/tc_matriz.rb, line 9</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
15
|
+
<span class="ruby-ivar">@m1</span>=<span class="ruby-constant">Matriz_dispersa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">1</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">0</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>]]) <span class="ruby-comment cmt">#dispersa</span>
|
16
|
+
<span class="ruby-ivar">@m2</span>=<span class="ruby-constant">Matriz_densa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">1</span>],[<span class="ruby-value">2</span>,<span class="ruby-value">1</span>,<span class="ruby-value">3</span>],[<span class="ruby-value">3</span>,<span class="ruby-value">5</span>,<span class="ruby-value">4</span>]]) <span class="ruby-comment cmt">#densa</span>
|
17
|
+
<span class="ruby-ivar">@m3</span>=<span class="ruby-constant">Matriz_dispersa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">1</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">0</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">1</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>]]) <span class="ruby-comment cmt">#dispersa</span>
|
18
|
+
<span class="ruby-ivar">@m4</span>=<span class="ruby-constant">Matriz_densa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">2</span>,<span class="ruby-value">3</span>,<span class="ruby-value">1</span>],[<span class="ruby-value">9</span>,<span class="ruby-value">3</span>,<span class="ruby-value">4</span>],[<span class="ruby-value">2</span>,<span class="ruby-value">7</span>,<span class="ruby-value">5</span>]]) <span class="ruby-comment cmt">#densa</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
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>test_Comprobacion (Test_Matriz)</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 test/tc_matriz.rb, line 19</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_Comprobacion</span>
|
15
|
+
|
16
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@m1</span>.<span class="ruby-identifier">filas</span>,<span class="ruby-value">3</span>)
|
17
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@m1</span>.<span class="ruby-identifier">cols</span>,<span class="ruby-value">3</span>)
|
18
|
+
|
19
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@m2</span>.<span class="ruby-identifier">filas</span>,<span class="ruby-value">3</span>)
|
20
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@m2</span>.<span class="ruby-identifier">cols</span>,<span class="ruby-value">3</span>)
|
21
|
+
|
22
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@m3</span>.<span class="ruby-identifier">filas</span>,<span class="ruby-value">3</span>)
|
23
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@m3</span>.<span class="ruby-identifier">cols</span>,<span class="ruby-value">3</span>)
|
24
|
+
|
25
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@m4</span>.<span class="ruby-identifier">filas</span>,<span class="ruby-value">3</span>)
|
26
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@m4</span>.<span class="ruby-identifier">cols</span>,<span class="ruby-value">3</span>)
|
27
|
+
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
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>test_Tipo (Test_Matriz)</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 test/tc_matriz.rb, line 38</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_Tipo</span>
|
15
|
+
|
16
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@m1</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Matriz_dispersa</span>))
|
17
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@m2</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Matriz_densa</span>))
|
18
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@m3</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Matriz_dispersa</span>))
|
19
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@m4</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Matriz_densa</span>))
|
20
|
+
|
21
|
+
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,32 @@
|
|
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>test_Operacion (Test_Matriz)</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 test/tc_matriz.rb, line 50</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_Operacion</span>
|
15
|
+
|
16
|
+
<span class="ruby-comment cmt">#suma</span>
|
17
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">Matriz_dispersa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">2</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">1</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>]]).<span class="ruby-identifier">matriz</span>, (<span class="ruby-ivar">@m1</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@m3</span>).<span class="ruby-identifier">matriz</span>)
|
18
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">Matriz_densa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">2</span>,<span class="ruby-value">2</span>,<span class="ruby-value">1</span>],[<span class="ruby-value">2</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>],[<span class="ruby-value">3</span>,<span class="ruby-value">5</span>,<span class="ruby-value">4</span>]]).<span class="ruby-identifier">matriz</span>,(<span class="ruby-ivar">@m1</span><span class="ruby-operator">+</span><span class="ruby-ivar">@m2</span>).<span class="ruby-identifier">matriz</span>)
|
19
|
+
|
20
|
+
<span class="ruby-comment cmt">#resta</span>
|
21
|
+
|
22
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">Matriz_densa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">0</span>,<span class="ruby-value">-2</span>,<span class="ruby-value">-1</span>],[<span class="ruby-value">-2</span>,<span class="ruby-value">0</span>,<span class="ruby-value">-3</span>],[<span class="ruby-value">-3</span>,<span class="ruby-value">-5</span>,<span class="ruby-value">-4</span>]]).<span class="ruby-identifier">matriz</span>,(<span class="ruby-ivar">@m1</span><span class="ruby-operator">-</span><span class="ruby-ivar">@m2</span>).<span class="ruby-identifier">matriz</span>)
|
23
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">Matriz_dispersa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">0</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">-1</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>]]).<span class="ruby-identifier">matriz</span>,(<span class="ruby-ivar">@m1</span><span class="ruby-operator">-</span><span class="ruby-ivar">@m3</span>).<span class="ruby-identifier">matriz</span>)
|
24
|
+
|
25
|
+
<span class="ruby-comment cmt">#multiplicacion</span>
|
26
|
+
|
27
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">Matriz_densa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">2</span>,<span class="ruby-value">3</span>,<span class="ruby-value">1</span>],[<span class="ruby-value">0</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>],[<span class="ruby-value">2</span>,<span class="ruby-value">3</span>,<span class="ruby-value">1</span>]]).<span class="ruby-identifier">matriz</span>,(<span class="ruby-ivar">@m3</span><span class="ruby-operator">*</span><span class="ruby-ivar">@m4</span>).<span class="ruby-identifier">matriz</span>)
|
28
|
+
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">Matriz_densa</span>.<span class="ruby-identifier">new</span>([[<span class="ruby-value">22</span>,<span class="ruby-value">16</span>,<span class="ruby-value">14</span>],[<span class="ruby-value">19</span>,<span class="ruby-value">30</span>,<span class="ruby-value">21</span>],[<span class="ruby-value">59</span>,<span class="ruby-value">52</span>,<span class="ruby-value">43</span>]]).<span class="ruby-identifier">matriz</span>,(<span class="ruby-ivar">@m2</span><span class="ruby-operator">*</span><span class="ruby-ivar">@m4</span>).<span class="ruby-identifier">matriz</span>)
|
29
|
+
|
30
|
+
<span class="ruby-keyword kw">end</span></pre>
|
31
|
+
</body>
|
32
|
+
</html>
|
data/doc/created.rid
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
Tue, 26 Nov 2013 00:36:04 +0000
|
2
|
+
./bin/prct09 Wed, 20 Nov 2013 16:00:44 +0000
|
3
|
+
./test/tc_matriz.rb Tue, 26 Nov 2013 00:25:56 +0000
|
4
|
+
./lib/Matriz_dispersa.rb Tue, 26 Nov 2013 00:22:49 +0000
|
5
|
+
./lib/Fraccion.rb Tue, 26 Nov 2013 00:18:26 +0000
|
6
|
+
./lib/Matriz.rb Tue, 26 Nov 2013 00:18:01 +0000
|
7
|
+
./lib/prct09.rb Wed, 20 Nov 2013 16:00:44 +0000
|
8
|
+
./lib/prct09/version.rb Tue, 26 Nov 2013 00:12:46 +0000
|
9
|
+
./lib/Matriz_densa.rb Tue, 26 Nov 2013 00:21:45 +0000
|
10
|
+
./Guarfile Wed, 20 Nov 2013 16:00:44 +0000
|
11
|
+
./Rakefile Wed, 20 Nov 2013 16:00:44 +0000
|
12
|
+
./spec/Matriz_spec.rb Tue, 26 Nov 2013 00:28:22 +0000
|
13
|
+
./Gemfile Wed, 20 Nov 2013 16:00:44 +0000
|
14
|
+
./LICENSE.txt Wed, 20 Nov 2013 16:00:44 +0000
|
@@ -0,0 +1,101 @@
|
|
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: Fraccion.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>Fraccion.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/Fraccion.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Mon Nov 25 18:12:37 +0100 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
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if method_list -->
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="validator-badges">
|
97
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</body>
|
101
|
+
</html>
|