cartesian 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/History.txt +6 -0
  2. data/Manifest.txt +13 -35
  3. data/Rakefile +19 -3
  4. data/{lib → etc}/recursive.rb +0 -0
  5. data/index.html +7 -0
  6. data/lib/cartesian.rb +1 -1
  7. data/script/txt2html +4 -2
  8. data/website/doc/Array.html +172 -0
  9. data/website/doc/Cartesian.html +638 -0
  10. data/website/doc/CartesianIterator.html +672 -0
  11. data/website/doc/Enumerable.html +158 -0
  12. data/website/doc/GridSearch.html +292 -0
  13. data/website/doc/Iterable.html +306 -0
  14. data/website/doc/README_rdoc.html +220 -0
  15. data/website/doc/created.rid +4 -4
  16. data/website/doc/lib/cartesian_iterator_rb.html +52 -0
  17. data/website/doc/lib/cartesian_rb.html +56 -0
  18. data/website/doc/lib/grid_search_rb.html +52 -0
  19. data/website/doc/rdoc.css +706 -0
  20. data/website/index.html +3 -3
  21. data/website/template.html.erb +1 -1
  22. metadata +15 -37
  23. data/website/doc/classes/Array.html +0 -128
  24. data/website/doc/classes/Cartesian.html +0 -398
  25. data/website/doc/classes/Cartesian.src/M000020.html +0 -18
  26. data/website/doc/classes/Cartesian.src/M000021.html +0 -18
  27. data/website/doc/classes/Cartesian.src/M000022.html +0 -18
  28. data/website/doc/classes/Cartesian.src/M000023.html +0 -23
  29. data/website/doc/classes/Cartesian.src/M000026.html +0 -23
  30. data/website/doc/classes/Cartesian.src/M000027.html +0 -30
  31. data/website/doc/classes/CartesianIterator.html +0 -326
  32. data/website/doc/classes/CartesianIterator.src/M000001.html +0 -21
  33. data/website/doc/classes/CartesianIterator.src/M000002.html +0 -18
  34. data/website/doc/classes/CartesianIterator.src/M000003.html +0 -21
  35. data/website/doc/classes/CartesianIterator.src/M000005.html +0 -20
  36. data/website/doc/classes/CartesianIterator.src/M000008.html +0 -20
  37. data/website/doc/classes/CartesianIterator.src/M000009.html +0 -19
  38. data/website/doc/classes/CartesianIterator.src/M000012.html +0 -19
  39. data/website/doc/classes/CartesianIterator.src/M000013.html +0 -39
  40. data/website/doc/classes/Enumerable.html +0 -112
  41. data/website/doc/classes/GridSearch.html +0 -160
  42. data/website/doc/classes/GridSearch.src/M000014.html +0 -18
  43. data/website/doc/classes/GridSearch.src/M000015.html +0 -18
  44. data/website/doc/classes/Iterable.html +0 -176
  45. data/website/doc/classes/Iterable.src/M000016.html +0 -19
  46. data/website/doc/classes/Iterable.src/M000017.html +0 -19
  47. data/website/doc/classes/Iterable.src/M000018.html +0 -18
  48. data/website/doc/classes/Iterable.src/M000019.html +0 -18
  49. data/website/doc/classes/Range.html +0 -118
  50. data/website/doc/files/cartesian_iterator_rb.html +0 -101
  51. data/website/doc/files/cartesian_rb.html +0 -108
  52. data/website/doc/files/grid_search_rb.html +0 -101
  53. data/website/doc/fr_class_index.html +0 -33
  54. data/website/doc/fr_file_index.html +0 -29
  55. data/website/doc/fr_method_index.html +0 -54
  56. data/website/doc/rdoc-style.css +0 -208
@@ -1,18 +0,0 @@
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>product (Cartesian)</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 cartesian.rb, line 50</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Cartesian</span>.<span class="ruby-identifier">product</span>(<span class="ruby-identifier">first</span>, <span class="ruby-identifier">second</span>)
15
- <span class="ruby-identifier">first</span>.<span class="ruby-identifier">x</span>(<span class="ruby-identifier">second</span>).<span class="ruby-identifier">to_a</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
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>joined_product (Cartesian)</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 cartesian.rb, line 62</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Cartesian</span>.<span class="ruby-identifier">joined_product</span>(<span class="ruby-identifier">first</span>, <span class="ruby-identifier">second</span>)
15
- <span class="ruby-identifier">product</span>(<span class="ruby-identifier">first</span>, <span class="ruby-identifier">second</span>).<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">pair</span><span class="ruby-operator">|</span> <span class="ruby-identifier">pair</span>.<span class="ruby-identifier">join</span> }
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
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>joined_cartesian (Cartesian)</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 cartesian.rb, line 68</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">joined_cartesian</span>(<span class="ruby-identifier">other</span>)
15
- <span class="ruby-constant">Cartesian</span>.<span class="ruby-identifier">joined_product</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">other</span>)
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,23 +0,0 @@
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>x (Cartesian)</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 cartesian.rb, line 98</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">x</span>(<span class="ruby-identifier">other</span>)
15
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">other</span>
16
- <span class="ruby-keyword kw">when</span> <span class="ruby-constant">CartesianIterator</span>
17
- <span class="ruby-identifier">other</span>.<span class="ruby-identifier">left_product</span>(<span class="ruby-keyword kw">self</span>)
18
- <span class="ruby-keyword kw">else</span>
19
- <span class="ruby-constant">CartesianIterator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">other</span>)
20
- <span class="ruby-keyword kw">end</span>
21
- <span class="ruby-keyword kw">end</span></pre>
22
- </body>
23
- </html>
@@ -1,23 +0,0 @@
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>left_product (Cartesian)</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 cartesian.rb, line 109</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">left_product</span>(<span class="ruby-identifier">other</span>)
15
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">other</span>
16
- <span class="ruby-keyword kw">when</span> <span class="ruby-constant">CartesianIterator</span>
17
- <span class="ruby-identifier">other</span>.<span class="ruby-identifier">right_product</span>(<span class="ruby-keyword kw">self</span>)
18
- <span class="ruby-keyword kw">else</span>
19
- <span class="ruby-constant">CartesianIterator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">other</span>, <span class="ruby-keyword kw">self</span>)
20
- <span class="ruby-keyword kw">end</span>
21
- <span class="ruby-keyword kw">end</span></pre>
22
- </body>
23
- </html>
@@ -1,30 +0,0 @@
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>** (Cartesian)</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 cartesian.rb, line 140</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-operator">**</span>(<span class="ruby-identifier">fixnum</span>)
15
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixnum</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span>
16
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;negative power&quot;</span>
17
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">fixnum</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
18
- <span class="ruby-keyword kw">return</span> []
19
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">fixnum</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
20
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
21
- <span class="ruby-keyword kw">else</span>
22
- <span class="ruby-identifier">iter</span> = <span class="ruby-constant">CartesianIterator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-keyword kw">self</span>)
23
- (<span class="ruby-identifier">fixnum</span><span class="ruby-operator">-</span><span class="ruby-value">2</span>).<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
24
- <span class="ruby-identifier">iter</span>.<span class="ruby-identifier">product!</span>(<span class="ruby-keyword kw">self</span>)
25
- <span class="ruby-keyword kw">end</span>
26
- <span class="ruby-identifier">iter</span>
27
- <span class="ruby-keyword kw">end</span>
28
- <span class="ruby-keyword kw">end</span></pre>
29
- </body>
30
- </html>
@@ -1,326 +0,0 @@
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: CartesianIterator</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">CartesianIterator</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/cartesian_iterator_rb.html">
59
- cartesian_iterator.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
- Object
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="#M000004">==</a>&nbsp;&nbsp;
90
- <a href="#M000002">dup</a>&nbsp;&nbsp;
91
- <a href="#M000013">each</a>&nbsp;&nbsp;
92
- <a href="#M000003">equal</a>&nbsp;&nbsp;
93
- <a href="#M000012">left_product</a>&nbsp;&nbsp;
94
- <a href="#M000008">left_product!</a>&nbsp;&nbsp;
95
- <a href="#M000001">new</a>&nbsp;&nbsp;
96
- <a href="#M000009">product</a>&nbsp;&nbsp;
97
- <a href="#M000005">product!</a>&nbsp;&nbsp;
98
- <a href="#M000010">right_product</a>&nbsp;&nbsp;
99
- <a href="#M000006">right_product!</a>&nbsp;&nbsp;
100
- <a href="#M000011">x</a>&nbsp;&nbsp;
101
- <a href="#M000007">x!</a>&nbsp;&nbsp;
102
- </div>
103
- </div>
104
-
105
- </div>
106
-
107
-
108
- <!-- if includes -->
109
- <div id="includes">
110
- <h3 class="section-bar">Included Modules</h3>
111
-
112
- <div id="includes-list">
113
- <span class="include-name"><a href="Enumerable.html">Enumerable</a></span>
114
- </div>
115
- </div>
116
-
117
- <div id="section">
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
- <!-- if method_list -->
127
- <div id="methods">
128
- <h3 class="section-bar">Public Class methods</h3>
129
-
130
- <div id="method-M000001" class="method-detail">
131
- <a name="M000001"></a>
132
-
133
- <div class="method-heading">
134
- <a href="CartesianIterator.src/M000001.html" target="Code" class="method-signature"
135
- onclick="popupCode('CartesianIterator.src/M000001.html');return false;">
136
- <span class="method-name">new</span><span class="method-args">(foo, bar)</span>
137
- </a>
138
- </div>
139
-
140
- <div class="method-description">
141
- </div>
142
- </div>
143
-
144
- <h3 class="section-bar">Public Instance methods</h3>
145
-
146
- <div id="method-M000004" class="method-detail">
147
- <a name="M000004"></a>
148
-
149
- <div class="method-heading">
150
- <span class="method-name">==</span><span class="method-args">(other)</span>
151
- </div>
152
-
153
- <div class="method-description">
154
- <p>
155
- Alias for <a href="CartesianIterator.html#M000003">equal</a>
156
- </p>
157
- </div>
158
- </div>
159
-
160
- <div id="method-M000002" class="method-detail">
161
- <a name="M000002"></a>
162
-
163
- <div class="method-heading">
164
- <a href="CartesianIterator.src/M000002.html" target="Code" class="method-signature"
165
- onclick="popupCode('CartesianIterator.src/M000002.html');return false;">
166
- <span class="method-name">dup</span><span class="method-args">()</span>
167
- </a>
168
- </div>
169
-
170
- <div class="method-description">
171
- </div>
172
- </div>
173
-
174
- <div id="method-M000013" class="method-detail">
175
- <a name="M000013"></a>
176
-
177
- <div class="method-heading">
178
- <a href="CartesianIterator.src/M000013.html" target="Code" class="method-signature"
179
- onclick="popupCode('CartesianIterator.src/M000013.html');return false;">
180
- <span class="method-name">each</span><span class="method-args">() {|*elems.map {|x| x| ...}</span>
181
- </a>
182
- </div>
183
-
184
- <div class="method-description">
185
- </div>
186
- </div>
187
-
188
- <div id="method-M000003" class="method-detail">
189
- <a name="M000003"></a>
190
-
191
- <div class="method-heading">
192
- <a href="CartesianIterator.src/M000003.html" target="Code" class="method-signature"
193
- onclick="popupCode('CartesianIterator.src/M000003.html');return false;">
194
- <span class="method-name">equal</span><span class="method-args">(other)</span>
195
- </a>
196
- </div>
197
-
198
- <div class="method-description">
199
- </div>
200
- </div>
201
-
202
- <div id="method-M000012" class="method-detail">
203
- <a name="M000012"></a>
204
-
205
- <div class="method-heading">
206
- <a href="CartesianIterator.src/M000012.html" target="Code" class="method-signature"
207
- onclick="popupCode('CartesianIterator.src/M000012.html');return false;">
208
- <span class="method-name">left_product</span><span class="method-args">(other)</span>
209
- </a>
210
- </div>
211
-
212
- <div class="method-description">
213
- </div>
214
- </div>
215
-
216
- <div id="method-M000008" class="method-detail">
217
- <a name="M000008"></a>
218
-
219
- <div class="method-heading">
220
- <a href="CartesianIterator.src/M000008.html" target="Code" class="method-signature"
221
- onclick="popupCode('CartesianIterator.src/M000008.html');return false;">
222
- <span class="method-name">left_product!</span><span class="method-args">(other)</span>
223
- </a>
224
- </div>
225
-
226
- <div class="method-description">
227
- </div>
228
- </div>
229
-
230
- <div id="method-M000009" class="method-detail">
231
- <a name="M000009"></a>
232
-
233
- <div class="method-heading">
234
- <a href="CartesianIterator.src/M000009.html" target="Code" class="method-signature"
235
- onclick="popupCode('CartesianIterator.src/M000009.html');return false;">
236
- <span class="method-name">product</span><span class="method-args">(other)</span>
237
- </a>
238
- </div>
239
-
240
- <div class="method-description">
241
- </div>
242
- </div>
243
-
244
- <div id="method-M000005" class="method-detail">
245
- <a name="M000005"></a>
246
-
247
- <div class="method-heading">
248
- <a href="CartesianIterator.src/M000005.html" target="Code" class="method-signature"
249
- onclick="popupCode('CartesianIterator.src/M000005.html');return false;">
250
- <span class="method-name">product!</span><span class="method-args">(other)</span>
251
- </a>
252
- </div>
253
-
254
- <div class="method-description">
255
- </div>
256
- </div>
257
-
258
- <div id="method-M000010" class="method-detail">
259
- <a name="M000010"></a>
260
-
261
- <div class="method-heading">
262
- <span class="method-name">right_product</span><span class="method-args">(other)</span>
263
- </div>
264
-
265
- <div class="method-description">
266
- <p>
267
- Alias for <a href="CartesianIterator.html#M000009">product</a>
268
- </p>
269
- </div>
270
- </div>
271
-
272
- <div id="method-M000006" class="method-detail">
273
- <a name="M000006"></a>
274
-
275
- <div class="method-heading">
276
- <span class="method-name">right_product!</span><span class="method-args">(other)</span>
277
- </div>
278
-
279
- <div class="method-description">
280
- <p>
281
- Alias for <a href="CartesianIterator.html#M000009">product</a>!
282
- </p>
283
- </div>
284
- </div>
285
-
286
- <div id="method-M000011" class="method-detail">
287
- <a name="M000011"></a>
288
-
289
- <div class="method-heading">
290
- <span class="method-name">x</span><span class="method-args">(other)</span>
291
- </div>
292
-
293
- <div class="method-description">
294
- <p>
295
- Alias for <a href="CartesianIterator.html#M000009">product</a>
296
- </p>
297
- </div>
298
- </div>
299
-
300
- <div id="method-M000007" class="method-detail">
301
- <a name="M000007"></a>
302
-
303
- <div class="method-heading">
304
- <span class="method-name">x!</span><span class="method-args">(other)</span>
305
- </div>
306
-
307
- <div class="method-description">
308
- <p>
309
- Alias for <a href="CartesianIterator.html#M000009">product</a>!
310
- </p>
311
- </div>
312
- </div>
313
-
314
-
315
- </div>
316
-
317
-
318
- </div>
319
-
320
-
321
- <div id="validator-badges">
322
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
323
- </div>
324
-
325
- </body>
326
- </html>