mdarray 0.4.3.pre-java → 0.5.0-java

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.
Files changed (111) hide show
  1. data/README.md +82 -14
  2. data/Rakefile +8 -2
  3. data/doc/BinaryOperator.html +227 -0
  4. data/doc/BitwiseOperators.html +135 -0
  5. data/doc/BooleanFunctions.html +135 -0
  6. data/doc/BooleanMDArray.html +193 -0
  7. data/doc/ByteMDArray.html +271 -0
  8. data/doc/Colt.html +269 -0
  9. data/doc/ComparisonOperators.html +135 -0
  10. data/doc/Const.html +490 -0
  11. data/doc/Csv.html +589 -0
  12. data/doc/DDescriptive.html +4373 -0
  13. data/doc/DoubleMDArray.html +555 -0
  14. data/doc/DoubleStatList.html +256 -0
  15. data/doc/FastBinaryOperator.html +743 -0
  16. data/doc/FastBoolean.html +512 -0
  17. data/doc/FastUnaryOperator.html +583 -0
  18. data/doc/FloatMDArray.html +237 -0
  19. data/doc/FunctionCreation.html +520 -0
  20. data/doc/FunctionMap.html +813 -0
  21. data/doc/GenericFunctions.html +135 -0
  22. data/doc/IntMDArray.html +259 -0
  23. data/doc/LongMDArray.html +257 -0
  24. data/doc/MDArray.html +9639 -0
  25. data/doc/MDArray/Counter.html +2767 -0
  26. data/doc/MDArray/IteratorFast.html +872 -0
  27. data/doc/MDArray/IteratorFastBoolean.html +384 -0
  28. data/doc/MDArray/IteratorFastByte.html +373 -0
  29. data/doc/MDArray/IteratorFastChar.html +384 -0
  30. data/doc/MDArray/IteratorFastDouble.html +384 -0
  31. data/doc/MDArray/IteratorFastFloat.html +384 -0
  32. data/doc/MDArray/IteratorFastInt.html +384 -0
  33. data/doc/MDArray/IteratorFastLong.html +384 -0
  34. data/doc/MDArray/IteratorFastShort.html +384 -0
  35. data/doc/MDArrayTest.html +125 -0
  36. data/doc/NonNumericalMDArray.html +177 -0
  37. data/doc/NumericFunctions.html +297 -0
  38. data/doc/NumericalMDArray.html +278 -0
  39. data/doc/Operator.html +826 -0
  40. data/doc/Proc.html +1097 -0
  41. data/doc/RubyBinaryOperator.html +526 -0
  42. data/doc/RubyFunctions.html +232 -0
  43. data/doc/RubyMath.html +135 -0
  44. data/doc/RubyStats.html +135 -0
  45. data/doc/RubyUnaryOperator.html +510 -0
  46. data/doc/ShortMDArray.html +267 -0
  47. data/doc/StatList.html +1176 -0
  48. data/doc/StringMDArray.html +181 -0
  49. data/doc/StructureMDArray.html +181 -0
  50. data/doc/UnaryOperator.html +227 -0
  51. data/doc/UserFunction.html +297 -0
  52. data/doc/_index.html +467 -0
  53. data/doc/class_list.html +53 -0
  54. data/doc/css/common.css +1 -0
  55. data/doc/css/full_list.css +57 -0
  56. data/doc/css/style.css +338 -0
  57. data/doc/file.README.html +173 -0
  58. data/doc/file_list.html +55 -0
  59. data/doc/frames.html +28 -0
  60. data/doc/index.html +173 -0
  61. data/doc/js/app.js +214 -0
  62. data/doc/js/full_list.js +173 -0
  63. data/doc/js/jquery.js +4 -0
  64. data/doc/method_list.html +2524 -0
  65. data/doc/top-level-namespace.html +114 -0
  66. data/lib/colt/colt.rb +56 -0
  67. data/lib/colt/colt_mdarray.rb +95 -0
  68. data/lib/colt/double_descriptive.rb +636 -0
  69. data/lib/colt/probability.rb +12 -0
  70. data/lib/colt/stat_list.rb +192 -0
  71. data/lib/env.rb +5 -1
  72. data/lib/mdarray.rb +5 -0
  73. data/lib/mdarray/access.rb +2 -2
  74. data/lib/mdarray/creation.rb +34 -19
  75. data/lib/mdarray/csv.rb +61 -0
  76. data/lib/mdarray/fast_operators.rb +241 -0
  77. data/lib/mdarray/operators.rb +18 -0
  78. data/lib/mdarray/ruby_operators.rb +2 -18
  79. data/lib/mdarray/ruby_stats.rb +1 -1
  80. data/lib/mdarray/views.rb +8 -8
  81. data/target/helper.jar +0 -0
  82. data/test/colt/VALE3.csv +3437 -0
  83. data/test/colt/VALE3.xlsx +0 -0
  84. data/test/colt/VALE3_short-err.csv +20 -0
  85. data/test/colt/VALE3_short.csv +20 -0
  86. data/test/colt/VALE3_short.xlsx +0 -0
  87. data/test/colt/test_complete.rb +25 -0
  88. data/test/colt/test_stat_list.rb +128 -0
  89. data/test/colt/test_statistics.rb +114 -0
  90. data/test/complete.rb +25 -0
  91. data/test/env.rb +54 -30
  92. data/test/{arithmetic_casting.rb → mdarray/arithmetic_casting.rb} +0 -0
  93. data/test/{test_access.rb → mdarray/test_access.rb} +0 -0
  94. data/test/{test_boolean.rb → mdarray/test_boolean.rb} +0 -2
  95. data/test/{test_comparison.rb → mdarray/test_comparison.rb} +0 -0
  96. data/test/{test_complete.rb → mdarray/test_complete.rb} +3 -14
  97. data/test/{test_counter.rb → mdarray/test_counter.rb} +0 -0
  98. data/test/{test_creation.rb → mdarray/test_creation.rb} +0 -0
  99. data/test/{test_error.rb → mdarray/test_error.rb} +8 -5
  100. data/test/{test_operator.rb → mdarray/test_operator.rb} +6 -2
  101. data/test/{test_speed.rb → mdarray/test_performance.rb} +74 -39
  102. data/test/{test_printing.rb → mdarray/test_printing.rb} +0 -1
  103. data/test/{test_shape.rb → mdarray/test_shape.rb} +0 -0
  104. data/test/mdarray/test_statistics.rb +80 -0
  105. data/test/{test_trigonometry.rb → mdarray/test_trigonometry.rb} +0 -0
  106. data/test/{test_views.rb → mdarray/test_views.rb} +0 -0
  107. data/vendor/parallelcolt-0.10.0.jar +0 -0
  108. data/version.rb +1 -1
  109. metadata +122 -39
  110. data/test/test_lazy.rb +0 -52
  111. data/test/test_statistics.rb +0 -38
@@ -0,0 +1,1097 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Proc
8
+
9
+ &mdash; Documentation by YARD 0.8.5.2
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (P)</a> &raquo;
35
+
36
+
37
+ <span class="title">Proc</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Proc
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Proc</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/mdarray/proc_util.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <h89></h89>
106
+
107
+ <p>Proc methods</p>
108
+
109
+ <h89></h89>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h2>
126
+ Class Method Summary
127
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
128
+ </h2>
129
+
130
+ <ul class="summary">
131
+
132
+ <li class="public ">
133
+ <span class="summary_signature">
134
+
135
+ <a href="#clipped-class_method" title="clipped (class method)">+ (Object) <strong>clipped</strong>(predicate, method) </a>
136
+
137
+
138
+
139
+ </span>
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
150
+
151
+ <p>This class verifies a condition and if true, returns the evaluation of a
152
+ function, otherwise returns NaN.</p>
153
+ </div></span>
154
+
155
+ </li>
156
+
157
+
158
+ <li class="public ">
159
+ <span class="summary_signature">
160
+
161
+ <a href="#complement-class_method" title="complement (class method)">+ (Object) <strong>complement</strong>(f) </a>
162
+
163
+
164
+
165
+ </span>
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
176
+
177
+ <p>Builds a function that returns true when 'f' returns false, and vice versa.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#compose-class_method" title="compose (class method)">+ (Object) <strong>compose</strong>(f, g) </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>????????????????????????????.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#conjoin-class_method" title="conjoin (class method)">+ (Object) <strong>conjoin</strong>(*predicates) </a>
211
+
212
+
213
+
214
+ </span>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
225
+
226
+ <p>Builds a function which returns true whenever <em>every</em> function in
227
+ 'predicates' returns true.</p>
228
+ </div></span>
229
+
230
+ </li>
231
+
232
+
233
+ <li class="public ">
234
+ <span class="summary_signature">
235
+
236
+ <a href="#constant-class_method" title="constant (class method)">+ (Object) <strong>constant</strong>(val) </a>
237
+
238
+
239
+
240
+ </span>
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
251
+
252
+ <p>Returns a constant value ????????????????????????????.</p>
253
+ </div></span>
254
+
255
+ </li>
256
+
257
+
258
+ <li class="public ">
259
+ <span class="summary_signature">
260
+
261
+ <a href="#disjoin-class_method" title="disjoin (class method)">+ (Object) <strong>disjoin</strong>(*predicates) </a>
262
+
263
+
264
+
265
+ </span>
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
276
+
277
+ <p>Builds a function which returns true whenever <em>any</em> function in
278
+ 'predicates' returns true.</p>
279
+ </div></span>
280
+
281
+ </li>
282
+
283
+
284
+ <li class="public ">
285
+ <span class="summary_signature">
286
+
287
+ <a href="#everywhere-class_method" title="everywhere (class method)">+ (Object) <strong>everywhere</strong> </a>
288
+
289
+
290
+
291
+ </span>
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
302
+
303
+ <p>Always returns true ????????????????????????????.</p>
304
+ </div></span>
305
+
306
+ </li>
307
+
308
+
309
+ <li class="public ">
310
+ <span class="summary_signature">
311
+
312
+ <a href="#identity-class_method" title="identity (class method)">+ (Object) <strong>identity</strong> </a>
313
+
314
+
315
+
316
+ </span>
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
327
+
328
+ <p>The identity function ????????????????????????????.</p>
329
+ </div></span>
330
+
331
+ </li>
332
+
333
+
334
+ <li class="public ">
335
+ <span class="summary_signature">
336
+
337
+ <a href="#nowhere-class_method" title="nowhere (class method)">+ (Object) <strong>nowhere</strong> </a>
338
+
339
+
340
+
341
+ </span>
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
352
+
353
+ <p>Always returns false ????????????????????????????.</p>
354
+ </div></span>
355
+
356
+ </li>
357
+
358
+
359
+ </ul>
360
+
361
+ <h2>
362
+ Instance Method Summary
363
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
364
+ </h2>
365
+
366
+ <ul class="summary">
367
+
368
+ <li class="public ">
369
+ <span class="summary_signature">
370
+
371
+ <a href="#%2A-instance_method" title="#* (instance method)">- (Object) <strong>*</strong>(g) </a>
372
+
373
+
374
+
375
+ </span>
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+ <span class="summary_desc"><div class='inline'>
386
+ <p>????????????????????????????.</p>
387
+ </div></span>
388
+
389
+ </li>
390
+
391
+
392
+ <li class="public ">
393
+ <span class="summary_signature">
394
+
395
+ <a href="#bind1st-instance_method" title="#bind1st (instance method)">- (Object) <strong>bind1st</strong>(val) </a>
396
+
397
+
398
+
399
+ </span>
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
410
+
411
+ <p>This method binds the 1st argument of a binary function to a scalar value,
412
+ effectively enabling a binary function to be called in a context intended
413
+ for a unary function.</p>
414
+ </div></span>
415
+
416
+ </li>
417
+
418
+
419
+ <li class="public ">
420
+ <span class="summary_signature">
421
+
422
+ <a href="#bind2nd-instance_method" title="#bind2nd (instance method)">- (Object) <strong>bind2nd</strong>(val) </a>
423
+
424
+
425
+
426
+ </span>
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+ <span class="summary_desc"><div class='inline'><hr style="height: 10px">
437
+
438
+ <p>This method binds the 2nd argument of a binary function to a scalar value,
439
+ effectively enabling a binary function to be called in a context intended
440
+ for a unary function.</p>
441
+ </div></span>
442
+
443
+ </li>
444
+
445
+
446
+ <li class="public ">
447
+ <span class="summary_signature">
448
+
449
+ <a href="#neg-instance_method" title="#neg (instance method)">- (Object) <strong>neg</strong> </a>
450
+
451
+
452
+
453
+ </span>
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+ <span class="summary_desc"><div class='inline'>
464
+ <p>????????????????????????????.</p>
465
+ </div></span>
466
+
467
+ </li>
468
+
469
+
470
+ </ul>
471
+
472
+
473
+
474
+
475
+ <div id="class_method_details" class="method_details_list">
476
+ <h2>Class Method Details</h2>
477
+
478
+
479
+ <div class="method_details first">
480
+ <h3 class="signature first" id="clipped-class_method">
481
+
482
+ + (<tt>Object</tt>) <strong>clipped</strong>(predicate, method)
483
+
484
+
485
+
486
+
487
+
488
+ </h3><div class="docstring">
489
+ <div class="discussion">
490
+ <hr style="height: 10px">
491
+
492
+ <p>This class verifies a condition and if true, returns the evaluation of a
493
+ function, otherwise returns NaN.</p>
494
+ <hr style="height: 10px">
495
+
496
+
497
+ </div>
498
+ </div>
499
+ <div class="tags">
500
+
501
+
502
+ </div><table class="source_code">
503
+ <tr>
504
+ <td>
505
+ <pre class="lines">
506
+
507
+
508
+ 121
509
+ 122
510
+ 123</pre>
511
+ </td>
512
+ <td>
513
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 121</span>
514
+
515
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_clipped identifier id'>clipped</span><span class='lparen token'>(</span><span class='rubyid_predicate identifier id'>predicate</span><span class='comma token'>,</span> <span class='rubyid_method identifier id'>method</span><span class='rparen token'>)</span>
516
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='bitor op'>|</span> <span class='rubyid_predicate identifier id'>predicate</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span><span class='question op'>?</span> <span class='rubyid_method identifier id'>method</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_Float constant id'>Float</span><span class='colon2 op'>::</span><span class='rubyid_NAN constant id'>NAN</span> <span class='rbrace token'>}</span>
517
+ <span class='rubyid_end end kw'>end</span>
518
+ </pre>
519
+ </td>
520
+ </tr>
521
+ </table>
522
+ </div>
523
+
524
+ <div class="method_details ">
525
+ <h3 class="signature " id="complement-class_method">
526
+
527
+ + (<tt>Object</tt>) <strong>complement</strong>(f)
528
+
529
+
530
+
531
+
532
+
533
+ </h3><div class="docstring">
534
+ <div class="discussion">
535
+ <hr style="height: 10px">
536
+
537
+ <p>Builds a function that returns true when 'f' returns false, and vice versa.</p>
538
+ <hr style="height: 10px">
539
+
540
+
541
+ </div>
542
+ </div>
543
+ <div class="tags">
544
+
545
+
546
+ </div><table class="source_code">
547
+ <tr>
548
+ <td>
549
+ <pre class="lines">
550
+
551
+
552
+ 50
553
+ 51
554
+ 52</pre>
555
+ </td>
556
+ <td>
557
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 50</span>
558
+
559
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_complement identifier id'>complement</span> <span class='rubyid_f identifier id'>f</span>
560
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='bitor op'>|</span> <span class='rubyid_not not kw'>not</span> <span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
561
+ <span class='rubyid_end end kw'>end</span>
562
+ </pre>
563
+ </td>
564
+ </tr>
565
+ </table>
566
+ </div>
567
+
568
+ <div class="method_details ">
569
+ <h3 class="signature " id="compose-class_method">
570
+
571
+ + (<tt>Object</tt>) <strong>compose</strong>(f, g)
572
+
573
+
574
+
575
+
576
+
577
+ </h3><div class="docstring">
578
+ <div class="discussion">
579
+ <hr style="height: 10px">
580
+ <hr style="height: 10px">
581
+
582
+
583
+ </div>
584
+ </div>
585
+ <div class="tags">
586
+
587
+
588
+ </div><table class="source_code">
589
+ <tr>
590
+ <td>
591
+ <pre class="lines">
592
+
593
+
594
+ 33
595
+ 34
596
+ 35</pre>
597
+ </td>
598
+ <td>
599
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 33</span>
600
+
601
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_compose identifier id'>compose</span><span class='lparen token'>(</span><span class='rubyid_f identifier id'>f</span><span class='comma token'>,</span> <span class='rubyid_g identifier id'>g</span><span class='rparen token'>)</span>
602
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='bitor op'>|</span> <span class='rubyid_f identifier id'>f</span><span class='lbrack token'>[</span><span class='rubyid_g identifier id'>g</span><span class='lbrack token'>[</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rbrack token'>]</span><span class='rbrack token'>]</span> <span class='rbrace token'>}</span>
603
+ <span class='rubyid_end end kw'>end</span>
604
+ </pre>
605
+ </td>
606
+ </tr>
607
+ </table>
608
+ </div>
609
+
610
+ <div class="method_details ">
611
+ <h3 class="signature " id="conjoin-class_method">
612
+
613
+ + (<tt>Object</tt>) <strong>conjoin</strong>(*predicates)
614
+
615
+
616
+
617
+
618
+
619
+ </h3><div class="docstring">
620
+ <div class="discussion">
621
+ <hr style="height: 10px">
622
+
623
+ <p>Builds a function which returns true whenever <em>every</em> function in
624
+ 'predicates' returns true.</p>
625
+ <hr style="height: 10px">
626
+
627
+
628
+ </div>
629
+ </div>
630
+ <div class="tags">
631
+
632
+
633
+ </div><table class="source_code">
634
+ <tr>
635
+ <td>
636
+ <pre class="lines">
637
+
638
+
639
+ 68
640
+ 69
641
+ 70
642
+ 71
643
+ 72
644
+ 73
645
+ 74
646
+ 75
647
+ 76
648
+ 77</pre>
649
+ </td>
650
+ <td>
651
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 68</span>
652
+
653
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_conjoin identifier id'>conjoin</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_predicates identifier id'>predicates</span><span class='rparen token'>)</span>
654
+
655
+ <span class='rubyid_base identifier id'>base</span> <span class='assign token'>=</span> <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='bitor op'>|</span> <span class='rubyid_true true kw'>true</span> <span class='rbrace token'>}</span>
656
+ <span class='rubyid_predicates identifier id'>predicates</span><span class='dot token'>.</span><span class='rubyid_inject identifier id'>inject</span><span class='lparen token'>(</span><span class='rubyid_base identifier id'>base</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_built identifier id'>built</span><span class='comma token'>,</span> <span class='rubyid_pred identifier id'>pred</span><span class='bitor op'>|</span>
657
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='bitor op'>|</span>
658
+ <span class='rubyid_built identifier id'>built</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_pred identifier id'>pred</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
659
+ <span class='rubyid_end end kw'>end</span>
660
+ <span class='rubyid_end end kw'>end</span>
661
+
662
+ <span class='rubyid_end end kw'>end</span>
663
+ </pre>
664
+ </td>
665
+ </tr>
666
+ </table>
667
+ </div>
668
+
669
+ <div class="method_details ">
670
+ <h3 class="signature " id="constant-class_method">
671
+
672
+ + (<tt>Object</tt>) <strong>constant</strong>(val)
673
+
674
+
675
+
676
+
677
+
678
+ </h3><div class="docstring">
679
+ <div class="discussion">
680
+ <hr style="height: 10px">
681
+
682
+ <p>Returns a constant value</p>
683
+ <hr style="height: 10px">
684
+
685
+
686
+ </div>
687
+ </div>
688
+ <div class="tags">
689
+
690
+
691
+ </div><table class="source_code">
692
+ <tr>
693
+ <td>
694
+ <pre class="lines">
695
+
696
+
697
+ 129
698
+ 130
699
+ 131</pre>
700
+ </td>
701
+ <td>
702
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 129</span>
703
+
704
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_constant identifier id'>constant</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
705
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_arg identifier id'>arg</span><span class='bitor op'>|</span> <span class='rubyid_return return kw'>return</span> <span class='rubyid_val identifier id'>val</span> <span class='rbrace token'>}</span>
706
+ <span class='rubyid_end end kw'>end</span>
707
+ </pre>
708
+ </td>
709
+ </tr>
710
+ </table>
711
+ </div>
712
+
713
+ <div class="method_details ">
714
+ <h3 class="signature " id="disjoin-class_method">
715
+
716
+ + (<tt>Object</tt>) <strong>disjoin</strong>(*predicates)
717
+
718
+
719
+
720
+
721
+
722
+ </h3><div class="docstring">
723
+ <div class="discussion">
724
+ <hr style="height: 10px">
725
+
726
+ <p>Builds a function which returns true whenever <em>any</em> function in
727
+ 'predicates' returns true.</p>
728
+ <hr style="height: 10px">
729
+
730
+
731
+ </div>
732
+ </div>
733
+ <div class="tags">
734
+
735
+
736
+ </div><table class="source_code">
737
+ <tr>
738
+ <td>
739
+ <pre class="lines">
740
+
741
+
742
+ 85
743
+ 86
744
+ 87
745
+ 88
746
+ 89
747
+ 90
748
+ 91
749
+ 92
750
+ 93
751
+ 94</pre>
752
+ </td>
753
+ <td>
754
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 85</span>
755
+
756
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_disjoin identifier id'>disjoin</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_predicates identifier id'>predicates</span><span class='rparen token'>)</span>
757
+
758
+ <span class='rubyid_base identifier id'>base</span> <span class='assign token'>=</span> <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='bitor op'>|</span> <span class='rubyid_false false kw'>false</span> <span class='rbrace token'>}</span>
759
+ <span class='rubyid_predicates identifier id'>predicates</span><span class='dot token'>.</span><span class='rubyid_inject identifier id'>inject</span><span class='lparen token'>(</span><span class='rubyid_base identifier id'>base</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_built identifier id'>built</span><span class='comma token'>,</span> <span class='rubyid_pred identifier id'>pred</span><span class='bitor op'>|</span>
760
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='bitor op'>|</span>
761
+ <span class='rubyid_built identifier id'>built</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='rubyid_pred identifier id'>pred</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
762
+ <span class='rubyid_end end kw'>end</span>
763
+ <span class='rubyid_end end kw'>end</span>
764
+
765
+ <span class='rubyid_end end kw'>end</span>
766
+ </pre>
767
+ </td>
768
+ </tr>
769
+ </table>
770
+ </div>
771
+
772
+ <div class="method_details ">
773
+ <h3 class="signature " id="everywhere-class_method">
774
+
775
+ + (<tt>Object</tt>) <strong>everywhere</strong>
776
+
777
+
778
+
779
+
780
+
781
+ </h3><div class="docstring">
782
+ <div class="discussion">
783
+ <hr style="height: 10px">
784
+
785
+ <p>Always returns true</p>
786
+ <hr style="height: 10px">
787
+
788
+
789
+ </div>
790
+ </div>
791
+ <div class="tags">
792
+
793
+
794
+ </div><table class="source_code">
795
+ <tr>
796
+ <td>
797
+ <pre class="lines">
798
+
799
+
800
+ 137
801
+ 138
802
+ 139</pre>
803
+ </td>
804
+ <td>
805
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 137</span>
806
+
807
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_everywhere identifier id'>everywhere</span>
808
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_arg identifier id'>arg</span><span class='bitor op'>|</span> <span class='rubyid_return return kw'>return</span> <span class='rubyid_true true kw'>true</span><span class='rbrace token'>}</span>
809
+ <span class='rubyid_end end kw'>end</span>
810
+ </pre>
811
+ </td>
812
+ </tr>
813
+ </table>
814
+ </div>
815
+
816
+ <div class="method_details ">
817
+ <h3 class="signature " id="identity-class_method">
818
+
819
+ + (<tt>Object</tt>) <strong>identity</strong>
820
+
821
+
822
+
823
+
824
+
825
+ </h3><div class="docstring">
826
+ <div class="discussion">
827
+ <hr style="height: 10px">
828
+
829
+ <p>The identity function</p>
830
+ <hr style="height: 10px">
831
+
832
+
833
+ </div>
834
+ </div>
835
+ <div class="tags">
836
+
837
+
838
+ </div><table class="source_code">
839
+ <tr>
840
+ <td>
841
+ <pre class="lines">
842
+
843
+
844
+ 153
845
+ 154
846
+ 155</pre>
847
+ </td>
848
+ <td>
849
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 153</span>
850
+
851
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_identity identifier id'>identity</span>
852
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_arg identifier id'>arg</span><span class='bitor op'>|</span> <span class='rubyid_return return kw'>return</span> <span class='rubyid_arg identifier id'>arg</span> <span class='rbrace token'>}</span>
853
+ <span class='rubyid_end end kw'>end</span>
854
+ </pre>
855
+ </td>
856
+ </tr>
857
+ </table>
858
+ </div>
859
+
860
+ <div class="method_details ">
861
+ <h3 class="signature " id="nowhere-class_method">
862
+
863
+ + (<tt>Object</tt>) <strong>nowhere</strong>
864
+
865
+
866
+
867
+
868
+
869
+ </h3><div class="docstring">
870
+ <div class="discussion">
871
+ <hr style="height: 10px">
872
+
873
+ <p>Always returns false</p>
874
+ <hr style="height: 10px">
875
+
876
+
877
+ </div>
878
+ </div>
879
+ <div class="tags">
880
+
881
+
882
+ </div><table class="source_code">
883
+ <tr>
884
+ <td>
885
+ <pre class="lines">
886
+
887
+
888
+ 145
889
+ 146
890
+ 147</pre>
891
+ </td>
892
+ <td>
893
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 145</span>
894
+
895
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_nowhere identifier id'>nowhere</span>
896
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_arg identifier id'>arg</span><span class='bitor op'>|</span> <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span><span class='rbrace token'>}</span>
897
+ <span class='rubyid_end end kw'>end</span>
898
+ </pre>
899
+ </td>
900
+ </tr>
901
+ </table>
902
+ </div>
903
+
904
+ </div>
905
+
906
+ <div id="instance_method_details" class="method_details_list">
907
+ <h2>Instance Method Details</h2>
908
+
909
+
910
+ <div class="method_details first">
911
+ <h3 class="signature first" id="*-instance_method">
912
+
913
+ - (<tt>Object</tt>) <strong>*</strong>(g)
914
+
915
+
916
+
917
+
918
+
919
+ </h3><div class="docstring">
920
+ <div class="discussion">
921
+ <hr style="height: 10px">
922
+ <hr style="height: 10px">
923
+
924
+
925
+ </div>
926
+ </div>
927
+ <div class="tags">
928
+
929
+
930
+ </div><table class="source_code">
931
+ <tr>
932
+ <td>
933
+ <pre class="lines">
934
+
935
+
936
+ 41
937
+ 42
938
+ 43</pre>
939
+ </td>
940
+ <td>
941
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 41</span>
942
+
943
+ <span class='rubyid_def def kw'>def</span> <span class='mult op'>*</span><span class='lparen token'>(</span><span class='rubyid_g identifier id'>g</span><span class='rparen token'>)</span>
944
+ <span class='rubyid_Proc constant id'>Proc</span><span class='dot token'>.</span><span class='rubyid_compose identifier id'>compose</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='comma token'>,</span> <span class='rubyid_g identifier id'>g</span><span class='rparen token'>)</span>
945
+ <span class='rubyid_end end kw'>end</span>
946
+ </pre>
947
+ </td>
948
+ </tr>
949
+ </table>
950
+ </div>
951
+
952
+ <div class="method_details ">
953
+ <h3 class="signature " id="bind1st-instance_method">
954
+
955
+ - (<tt>Object</tt>) <strong>bind1st</strong>(val)
956
+
957
+
958
+
959
+
960
+
961
+ </h3><div class="docstring">
962
+ <div class="discussion">
963
+ <hr style="height: 10px">
964
+
965
+ <p>This method binds the 1st argument of a binary function to a scalar value,
966
+ effectively enabling a binary function to be called in a context intended
967
+ for a unary function.</p>
968
+ <hr style="height: 10px">
969
+
970
+
971
+ </div>
972
+ </div>
973
+ <div class="tags">
974
+
975
+
976
+ </div><table class="source_code">
977
+ <tr>
978
+ <td>
979
+ <pre class="lines">
980
+
981
+
982
+ 102
983
+ 103
984
+ 104</pre>
985
+ </td>
986
+ <td>
987
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 102</span>
988
+
989
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_bind1st identifier id'>bind1st</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
990
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_arg identifier id'>arg</span><span class='bitor op'>|</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='comma token'>,</span> <span class='rubyid_arg identifier id'>arg</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
991
+ <span class='rubyid_end end kw'>end</span>
992
+ </pre>
993
+ </td>
994
+ </tr>
995
+ </table>
996
+ </div>
997
+
998
+ <div class="method_details ">
999
+ <h3 class="signature " id="bind2nd-instance_method">
1000
+
1001
+ - (<tt>Object</tt>) <strong>bind2nd</strong>(val)
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+ </h3><div class="docstring">
1008
+ <div class="discussion">
1009
+ <hr style="height: 10px">
1010
+
1011
+ <p>This method binds the 2nd argument of a binary function to a scalar value,
1012
+ effectively enabling a binary function to be called in a context intended
1013
+ for a unary function.</p>
1014
+ <hr style="height: 10px">
1015
+
1016
+
1017
+ </div>
1018
+ </div>
1019
+ <div class="tags">
1020
+
1021
+
1022
+ </div><table class="source_code">
1023
+ <tr>
1024
+ <td>
1025
+ <pre class="lines">
1026
+
1027
+
1028
+ 112
1029
+ 113
1030
+ 114</pre>
1031
+ </td>
1032
+ <td>
1033
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 112</span>
1034
+
1035
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_bind2nd identifier id'>bind2nd</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
1036
+ <span class='rubyid_lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_arg identifier id'>arg</span><span class='bitor op'>|</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_arg identifier id'>arg</span><span class='comma token'>,</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
1037
+ <span class='rubyid_end end kw'>end</span>
1038
+ </pre>
1039
+ </td>
1040
+ </tr>
1041
+ </table>
1042
+ </div>
1043
+
1044
+ <div class="method_details ">
1045
+ <h3 class="signature " id="neg-instance_method">
1046
+
1047
+ - (<tt>Object</tt>) <strong>neg</strong>
1048
+
1049
+
1050
+
1051
+
1052
+
1053
+ </h3><div class="docstring">
1054
+ <div class="discussion">
1055
+ <hr style="height: 10px">
1056
+ <hr style="height: 10px">
1057
+
1058
+
1059
+ </div>
1060
+ </div>
1061
+ <div class="tags">
1062
+
1063
+
1064
+ </div><table class="source_code">
1065
+ <tr>
1066
+ <td>
1067
+ <pre class="lines">
1068
+
1069
+
1070
+ 58
1071
+ 59
1072
+ 60</pre>
1073
+ </td>
1074
+ <td>
1075
+ <pre class="code"><span class="info file"># File 'lib/mdarray/proc_util.rb', line 58</span>
1076
+
1077
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_neg identifier id'>neg</span>
1078
+ <span class='rubyid_Proc constant id'>Proc</span><span class='dot token'>.</span><span class='rubyid_complement identifier id'>complement</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span>
1079
+ <span class='rubyid_end end kw'>end</span>
1080
+ </pre>
1081
+ </td>
1082
+ </tr>
1083
+ </table>
1084
+ </div>
1085
+
1086
+ </div>
1087
+
1088
+ </div>
1089
+
1090
+ <div id="footer">
1091
+ Generated on Thu May 16 12:48:41 2013 by
1092
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1093
+ 0.8.5.2 (ruby-1.9.3).
1094
+ </div>
1095
+
1096
+ </body>
1097
+ </html>