mdarray 0.5.5.2-java → 0.5.6-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 (209) hide show
  1. checksums.yaml +4 -4
  2. data/config.rb +29 -95
  3. data/doc/BinaryOperator.html +20 -21
  4. data/doc/BitwiseOperators.html +18 -8
  5. data/doc/BitwiseOperators/BinaryAnd.html +189 -0
  6. data/doc/BitwiseOperators/BinaryLeftShift.html +189 -0
  7. data/doc/BitwiseOperators/BinaryOnesComplement.html +189 -0
  8. data/doc/BitwiseOperators/BinaryOr.html +189 -0
  9. data/doc/BitwiseOperators/BinaryRightShift.html +189 -0
  10. data/doc/BitwiseOperators/BinaryXor.html +189 -0
  11. data/doc/BooleanFunctions.html +18 -8
  12. data/doc/BooleanFunctions/And.html +189 -0
  13. data/doc/BooleanFunctions/Not.html +189 -0
  14. data/doc/BooleanFunctions/Or.html +189 -0
  15. data/doc/BooleanMDArray.html +10 -10
  16. data/doc/ByteMDArray.html +73 -14
  17. data/doc/CernDoubleFunctions.html +208 -0
  18. data/doc/CernFloatFunctions.html +208 -0
  19. data/doc/CernFunctions.html +828 -0
  20. data/doc/CernIntFunctions.html +208 -0
  21. data/doc/CernLongFunctions.html +208 -0
  22. data/doc/CharMDArray.html +181 -0
  23. data/doc/Colt.html +18 -20
  24. data/doc/ComparisonOperators.html +18 -8
  25. data/doc/ComparisonOperators/Eq.html +189 -0
  26. data/doc/ComparisonOperators/Ge.html +189 -0
  27. data/doc/ComparisonOperators/Gt.html +189 -0
  28. data/doc/ComparisonOperators/Le.html +189 -0
  29. data/doc/ComparisonOperators/Lt.html +189 -0
  30. data/doc/Const.html +107 -47
  31. data/doc/Csv.html +325 -113
  32. data/doc/Csv/Dimension.html +771 -0
  33. data/doc/Csv/Dimensions.html +654 -0
  34. data/doc/DDescriptive.html +573 -625
  35. data/doc/DoubleMDArray.html +40 -172
  36. data/doc/DoubleStatList.html +19 -20
  37. data/doc/FastBinaryOperator.html +166 -148
  38. data/doc/FastUnaryOperator.html +104 -109
  39. data/doc/FloatMDArray.html +55 -16
  40. data/doc/FunctionCreation.html +53 -273
  41. data/doc/FunctionMap.html +381 -93
  42. data/doc/GenericFunctions.html +18 -8
  43. data/doc/GenericFunctions/Null.html +187 -0
  44. data/doc/IntMDArray.html +77 -16
  45. data/doc/Java/CernJetMathTdouble/DoubleFunctions.html +120 -0
  46. data/doc/Java/CernJetMathTfloat/FloatFunctions.html +120 -0
  47. data/doc/Java/CernJetMathTint/IntFunctions.html +120 -0
  48. data/doc/Java/CernJetMathTlong/LongFunctions.html +120 -0
  49. data/doc/LazyBinaryOperator.html +714 -0
  50. data/doc/LazyMDArray.html +990 -0
  51. data/doc/LazyMDArray/BinaryComp.html +282 -0
  52. data/doc/LazyMDArray/UnaryComp.html +280 -0
  53. data/doc/LazyUnaryOperator.html +537 -0
  54. data/doc/LongMDArray.html +59 -15
  55. data/doc/MDArray.html +3223 -2181
  56. data/doc/MDArray/Counter.html +321 -1233
  57. data/doc/MDArray/IteratorFast.html +177 -116
  58. data/doc/MDArray/IteratorFastBoolean.html +37 -41
  59. data/doc/MDArray/IteratorFastByte.html +46 -39
  60. data/doc/MDArray/IteratorFastChar.html +37 -41
  61. data/doc/MDArray/IteratorFastDouble.html +37 -41
  62. data/doc/MDArray/IteratorFastFloat.html +37 -41
  63. data/doc/MDArray/IteratorFastInt.html +37 -41
  64. data/doc/MDArray/IteratorFastLong.html +37 -41
  65. data/doc/MDArray/IteratorFastShort.html +37 -41
  66. data/doc/MDArray/Section.html +561 -0
  67. data/doc/Nashorn.html +1407 -0
  68. data/doc/NetCDF.html +749 -0
  69. data/doc/NetCDF/Attribute.html +875 -0
  70. data/doc/NetCDF/AttributeWriter.html +286 -0
  71. data/doc/NetCDF/CDMNode.html +460 -0
  72. data/doc/NetCDF/Dimension.html +559 -0
  73. data/doc/NetCDF/DimensionWriter.html +642 -0
  74. data/doc/NetCDF/File.html +1593 -0
  75. data/doc/NetCDF/FileParent.html +674 -0
  76. data/doc/NetCDF/FileWriter.html +2875 -0
  77. data/doc/NetCDF/Group.html +685 -0
  78. data/doc/NetCDF/GroupWriter.html +851 -0
  79. data/doc/NetCDF/TimeVariable.html +646 -0
  80. data/doc/NetCDF/Variable.html +2994 -0
  81. data/doc/NetCDF/VariableWriter.html +420 -0
  82. data/doc/NonNumericalMDArray.html +11 -11
  83. data/doc/NumericFunctions.html +38 -30
  84. data/doc/NumericFunctions/Abs.html +189 -0
  85. data/doc/NumericFunctions/Add.html +189 -0
  86. data/doc/NumericFunctions/Ceil.html +189 -0
  87. data/doc/NumericFunctions/Cube.html +189 -0
  88. data/doc/NumericFunctions/Div.html +189 -0
  89. data/doc/NumericFunctions/Floor.html +189 -0
  90. data/doc/NumericFunctions/Fourth.html +189 -0
  91. data/doc/NumericFunctions/IsZero.html +189 -0
  92. data/doc/NumericFunctions/Max.html +189 -0
  93. data/doc/NumericFunctions/Min.html +189 -0
  94. data/doc/NumericFunctions/Mul.html +189 -0
  95. data/doc/NumericFunctions/Power.html +189 -0
  96. data/doc/NumericFunctions/Square.html +189 -0
  97. data/doc/NumericFunctions/Sub.html +189 -0
  98. data/doc/NumericFunctions/Truncate.html +189 -0
  99. data/doc/NumericalMDArray.html +14 -15
  100. data/doc/Operator.html +318 -109
  101. data/doc/Proc.html +120 -129
  102. data/doc/RubyBinaryOperator.html +66 -70
  103. data/doc/RubyFunctions.html +572 -27
  104. data/doc/RubyMath.html +18 -8
  105. data/doc/RubyMath/Acos.html +189 -0
  106. data/doc/RubyMath/Acosh.html +189 -0
  107. data/doc/RubyMath/Asin.html +189 -0
  108. data/doc/RubyMath/Asinh.html +189 -0
  109. data/doc/RubyMath/Atan.html +189 -0
  110. data/doc/RubyMath/Atan2.html +189 -0
  111. data/doc/RubyMath/Atanh.html +189 -0
  112. data/doc/RubyMath/Cbrt.html +189 -0
  113. data/doc/RubyMath/Cos.html +189 -0
  114. data/doc/RubyMath/Cosh.html +189 -0
  115. data/doc/RubyMath/Erf.html +189 -0
  116. data/doc/RubyMath/Erfc.html +189 -0
  117. data/doc/RubyMath/Exp.html +189 -0
  118. data/doc/RubyMath/Gamma.html +189 -0
  119. data/doc/RubyMath/Hypot.html +189 -0
  120. data/doc/RubyMath/Ldexp.html +189 -0
  121. data/doc/RubyMath/Log.html +189 -0
  122. data/doc/RubyMath/Log10.html +189 -0
  123. data/doc/RubyMath/Log2.html +189 -0
  124. data/doc/RubyMath/Neg.html +189 -0
  125. data/doc/RubyMath/Sin.html +189 -0
  126. data/doc/RubyMath/Sinh.html +189 -0
  127. data/doc/RubyMath/Sqrt.html +189 -0
  128. data/doc/RubyMath/Tan.html +189 -0
  129. data/doc/RubyMath/Tanh.html +189 -0
  130. data/doc/RubyStats.html +8 -8
  131. data/doc/RubyUnaryOperator.html +61 -65
  132. data/doc/ShortMDArray.html +69 -14
  133. data/doc/Sol.html +700 -0
  134. data/doc/Sol/BarChart.html +181 -0
  135. data/doc/Sol/BaseChart.html +800 -0
  136. data/doc/Sol/Bootstrap.html +1137 -0
  137. data/doc/Sol/Bridge.html +586 -0
  138. data/doc/Sol/Chart.html +1162 -0
  139. data/doc/Sol/CoordinateChart.html +679 -0
  140. data/doc/Sol/Dashboard.html +2094 -0
  141. data/doc/Sol/Dashboard/DCFX.html +786 -0
  142. data/doc/Sol/Dashboard/MyHandle.html +338 -0
  143. data/doc/Sol/Dashboard/MyService.html +202 -0
  144. data/doc/Sol/Dashboard/MyTask.html +291 -0
  145. data/doc/Sol/Interval.html +1213 -0
  146. data/doc/Sol/LineChart.html +346 -0
  147. data/doc/Sol/LinearScale.html +334 -0
  148. data/doc/Sol/Margins.html +219 -0
  149. data/doc/Sol/OrdinalScale.html +263 -0
  150. data/doc/Sol/Scale.html +462 -0
  151. data/doc/Sol/Stack.html +199 -0
  152. data/doc/Sol/TimeScale.html +397 -0
  153. data/doc/StatList.html +110 -125
  154. data/doc/StringMDArray.html +10 -10
  155. data/doc/StructureMDArray.html +10 -10
  156. data/doc/UnaryOperator.html +20 -21
  157. data/doc/UserFunction.html +51 -49
  158. data/doc/_index.html +881 -106
  159. data/doc/class_list.html +8 -3
  160. data/doc/css/style.css +2 -1
  161. data/doc/file.README.html +455 -104
  162. data/doc/file_list.html +7 -2
  163. data/doc/frames.html +5 -7
  164. data/doc/index.html +455 -104
  165. data/doc/js/app.js +7 -2
  166. data/doc/js/full_list.js +11 -3
  167. data/doc/method_list.html +3170 -1233
  168. data/doc/top-level-namespace.html +31 -8
  169. data/lib/colt/matrix/algebra.rb +5 -5
  170. data/lib/mdarray.rb +6 -3
  171. data/lib/mdarray/csv.rb +25 -5
  172. data/lib/mdarray/fast_operators.rb +1 -1
  173. data/lib/mdarray/function_creation.rb +3 -1
  174. data/lib/mdarray/hierarchy.rb +2 -0
  175. data/lib/mdarray/operators.rb +1 -1
  176. data/lib/mdarray/ruby_functions.rb +8 -4
  177. data/lib/mdarray/ruby_math.rb +0 -28
  178. data/test/colt/matrix/test_matrix2d_floatingalgebra.rb +31 -7
  179. data/test/complete.rb +4 -4
  180. data/test/mdarray/PETR4_2014.csv +249 -0
  181. data/test/mdarray/VALE_2014.csv +253 -0
  182. data/test/mdarray/VALE_PETR4.csv +501 -0
  183. data/test/mdarray/arithmetic_casting.rb +1 -0
  184. data/test/mdarray/test_access.rb +1 -0
  185. data/test/mdarray/test_boolean.rb +1 -0
  186. data/test/mdarray/test_comparison.rb +1 -0
  187. data/test/mdarray/test_complete.rb +2 -5
  188. data/test/mdarray/test_counter.rb +1 -0
  189. data/test/mdarray/test_creation.rb +1 -0
  190. data/test/mdarray/test_csv.rb +51 -0
  191. data/test/mdarray/test_error.rb +1 -0
  192. data/test/mdarray/test_non_numeric.rb +1 -1
  193. data/test/mdarray/test_operator.rb +31 -14
  194. data/test/mdarray/test_performance.rb +2 -1
  195. data/test/mdarray/test_printing.rb +1 -0
  196. data/test/mdarray/test_sections.rb +1 -0
  197. data/test/mdarray/test_shape.rb +1 -0
  198. data/test/mdarray/test_trigonometry.rb +1 -0
  199. data/test/mdarray/test_views.rb +1 -0
  200. data/vendor/mdarray.jar +0 -0
  201. data/vendor/{netcdfAll-4.5_0.jar → netcdfAll-4.6.jar} +0 -0
  202. data/vendor/slf4j-jdk14-1.7.12.jar +0 -0
  203. data/version.rb +1 -1
  204. metadata +247 -139
  205. data/lib/env.rb +0 -12
  206. data/lib/mdarray/lazy_mdarray.rb +0 -315
  207. data/lib/mdarray/lazy_operators.rb +0 -174
  208. data/test/env.rb +0 -8
  209. data/test/mdarray/test_lazy.rb +0 -306
@@ -6,18 +6,18 @@
6
6
  <title>
7
7
  Class: MDArray::Counter
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
19
19
  relpath = '../';
20
- framesUrl = "../frames.html#!" + escape(window.location.href);
20
+ framesUrl = "../frames.html#!MDArray/Counter.html";
21
21
  </script>
22
22
 
23
23
 
@@ -105,11 +105,11 @@
105
105
 
106
106
  <h2>Overview</h2><div class="docstring">
107
107
  <div class="discussion">
108
- <hr style="height: 10px">
108
+ <hr>
109
109
 
110
110
  <p>Counters for Multidimensional arrays. A Counter refers to a particular
111
111
  element of an array. This is a generalization of index as int[].</p>
112
- <hr style="height: 10px">
112
+ <hr>
113
113
 
114
114
 
115
115
  </div>
@@ -291,9 +291,9 @@ element of an array. This is a generalization of index as int[].</p>
291
291
 
292
292
 
293
293
 
294
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
295
-
296
- <p>Accessor methods for start, finish and position.</p>
294
+ <span class="summary_desc"><div class='inline'>
295
+ <p>-------------------------------------------------------------------------------------
296
+ Accessor methods for start, finish and position.</p>
297
297
  </div></span>
298
298
 
299
299
  </li>
@@ -329,9 +329,9 @@ element of an array. This is a generalization of index as int[].</p>
329
329
 
330
330
 
331
331
 
332
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
333
-
334
- <p>Gets the element at the given counter.</p>
332
+ <span class="summary_desc"><div class='inline'>
333
+ <p>------------------------------------------------------------------------------------
334
+ Gets the element at the given counter.</p>
335
335
  </div></span>
336
336
 
337
337
  </li>
@@ -354,34 +354,9 @@ element of an array. This is a generalization of index as int[].</p>
354
354
 
355
355
 
356
356
 
357
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
358
-
359
- <p>Sets the value of counter.</p>
360
- </div></span>
361
-
362
- </li>
363
-
364
-
365
- <li class="public ">
366
- <span class="summary_signature">
367
-
368
- <a href="#compute_size-instance_method" title="#compute_size (instance method)">- (Object) <strong>compute_size</strong> </a>
369
-
370
-
371
-
372
- </span>
373
-
374
-
375
-
376
-
377
-
378
-
379
-
380
-
381
-
382
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
383
-
384
- <p>Compute total number of elements in the array.</p>
357
+ <span class="summary_desc"><div class='inline'>
358
+ <p>------------------------------------------------------------------------------------
359
+ Sets the value of counter.</p>
385
360
  </div></span>
386
361
 
387
362
  </li>
@@ -405,7 +380,7 @@ element of an array. This is a generalization of index as int[].</p>
405
380
 
406
381
 
407
382
  <span class="summary_desc"><div class='inline'>
408
- <p>????????????????????????????-.</p>
383
+ <p>-------------------------------------------------------------------------------------.</p>
409
384
  </div></span>
410
385
 
411
386
  </li>
@@ -428,9 +403,9 @@ element of an array. This is a generalization of index as int[].</p>
428
403
 
429
404
 
430
405
 
431
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
432
-
433
- <p>Walks the counter along each of the axes.</p>
406
+ <span class="summary_desc"><div class='inline'>
407
+ <p>-------------------------------------------------------------------------------------
408
+ Walks the counter along each of the axes.</p>
434
409
  </div></span>
435
410
 
436
411
  </li>
@@ -453,9 +428,9 @@ element of an array. This is a generalization of index as int[].</p>
453
428
 
454
429
 
455
430
 
456
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
457
-
458
- <p>Gets the element at the given counter.</p>
431
+ <span class="summary_desc"><div class='inline'>
432
+ <p>------------------------------------------------------------------------------------
433
+ Gets the element at the given counter.</p>
459
434
  </div></span>
460
435
 
461
436
  </li>
@@ -464,7 +439,7 @@ element of an array. This is a generalization of index as int[].</p>
464
439
  <li class="public ">
465
440
  <span class="summary_signature">
466
441
 
467
- <a href="#get_at_counter-instance_method" title="#get_at_counter (instance method)">- (Object) <strong>get_at_counter</strong> </a>
442
+ <a href="#get_as-instance_method" title="#get_as (instance method)">- (Object) <strong>get_as</strong>(type, count = nil) </a>
468
443
 
469
444
 
470
445
 
@@ -479,7 +454,9 @@ element of an array. This is a generalization of index as int[].</p>
479
454
 
480
455
 
481
456
  <span class="summary_desc"><div class='inline'>
482
- <p>????????????????????????????.</p>
457
+ <p>------------------------------------------------------------------------------------
458
+ Gets the element at the courrent counter with the given type
459
+ ------------------------------------------------------------------------------------.</p>
483
460
  </div></span>
484
461
 
485
462
  </li>
@@ -502,85 +479,9 @@ element of an array. This is a generalization of index as int[].</p>
502
479
 
503
480
 
504
481
 
505
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
506
-
507
- <p>Gets element at current counter.</p>
508
- </div></span>
509
-
510
- </li>
511
-
512
-
513
- <li class="public ">
514
- <span class="summary_signature">
515
-
516
- <a href="#get_current_counter-instance_method" title="#get_current_counter (instance method)">- (Object) <strong>get_current_counter</strong> </a>
517
-
518
-
519
-
520
- </span>
521
-
522
-
523
-
524
-
525
-
526
-
527
-
528
-
529
-
530
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
531
-
532
- <p>Gets the current counter from the underlining storage.</p>
533
- </div></span>
534
-
535
- </li>
536
-
537
-
538
- <li class="public ">
539
- <span class="summary_signature">
540
-
541
- <a href="#get_next_counter-instance_method" title="#get_next_counter (instance method)">- (Object) <strong>get_next_counter</strong> </a>
542
-
543
-
544
-
545
- </span>
546
-
547
-
548
-
549
-
550
-
551
-
552
-
553
-
554
-
555
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
556
-
557
- <p>Returns next counter if no overflow, otherwise returns nil
558
- ????????????????????????????-.</p>
559
- </div></span>
560
-
561
- </li>
562
-
563
-
564
- <li class="public ">
565
- <span class="summary_signature">
566
-
567
- <a href="#get_shape-instance_method" title="#get_shape (instance method)">- (Object) <strong>get_shape</strong>(dim_i) </a>
568
-
569
-
570
-
571
- </span>
572
-
573
-
574
-
575
-
576
-
577
-
578
-
579
-
580
-
581
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
582
-
583
- <p>Get the length of the ith dimension.</p>
482
+ <span class="summary_desc"><div class='inline'>
483
+ <p>------------------------------------------------------------------------------------
484
+ Gets element at current counter.</p>
584
485
  </div></span>
585
486
 
586
487
  </li>
@@ -589,7 +490,7 @@ element of an array. This is a generalization of index as int[].</p>
589
490
  <li class="public ">
590
491
  <span class="summary_signature">
591
492
 
592
- <a href="#incr-instance_method" title="#incr (instance method)">- (Object) <strong>incr</strong> </a>
493
+ <a href="#get_scalar-instance_method" title="#get_scalar (instance method)">- (Object) <strong>get_scalar</strong> </a>
593
494
 
594
495
 
595
496
 
@@ -603,9 +504,8 @@ element of an array. This is a generalization of index as int[].</p>
603
504
 
604
505
 
605
506
 
606
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
607
-
608
- <p>Increment the current element by 1.</p>
507
+ <span class="summary_desc"><div class='inline'>
508
+ <p>---------------------------------------------------------------------------------------.</p>
609
509
  </div></span>
610
510
 
611
511
  </li>
@@ -631,7 +531,7 @@ element of an array. This is a generalization of index as int[].</p>
631
531
 
632
532
 
633
533
  <span class="summary_desc"><div class='inline'>
634
- <p>????????????????????????????.</p>
534
+ <p>------------------------------------------------------------------------------------.</p>
635
535
  </div></span>
636
536
 
637
537
  </li>
@@ -640,7 +540,7 @@ element of an array. This is a generalization of index as int[].</p>
640
540
  <li class="public ">
641
541
  <span class="summary_signature">
642
542
 
643
- <a href="#reset_counter-instance_method" title="#reset_counter (instance method)">- (Object) <strong>reset_counter</strong> </a>
543
+ <a href="#jget-instance_method" title="#jget (instance method)">- (Object) <strong>jget</strong>(counter) </a>
644
544
 
645
545
 
646
546
 
@@ -654,9 +554,9 @@ element of an array. This is a generalization of index as int[].</p>
654
554
 
655
555
 
656
556
 
657
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
658
-
659
- <p>Reset the counter to the defined start value ????????????????????????????.</p>
557
+ <span class="summary_desc"><div class='inline'>
558
+ <p>------------------------------------------------------------------------------------
559
+ Gets the element at the given counter.</p>
660
560
  </div></span>
661
561
 
662
562
  </li>
@@ -665,7 +565,7 @@ element of an array. This is a generalization of index as int[].</p>
665
565
  <li class="public ">
666
566
  <span class="summary_signature">
667
567
 
668
- <a href="#reshape-instance_method" title="#reshape (instance method)">- (Object) <strong>reshape</strong>(counter) </a>
568
+ <a href="#reset_counter-instance_method" title="#reset_counter (instance method)">- (Object) <strong>reset_counter</strong> </a>
669
569
 
670
570
 
671
571
 
@@ -679,10 +579,10 @@ element of an array. This is a generalization of index as int[].</p>
679
579
 
680
580
 
681
581
 
682
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
683
-
684
- <p>If given index has negative values, then reshape it so that it only has
685
- positive values.</p>
582
+ <span class="summary_desc"><div class='inline'>
583
+ <p>------------------------------------------------------------------------------------
584
+ Reset the counter to the defined start value
585
+ ------------------------------------------------------------------------------------.</p>
686
586
  </div></span>
687
587
 
688
588
  </li>
@@ -705,84 +605,9 @@ positive values.</p>
705
605
 
706
606
 
707
607
 
708
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
709
-
710
- <p>Sets the value of counter.</p>
711
- </div></span>
712
-
713
- </li>
714
-
715
-
716
- <li class="public ">
717
- <span class="summary_signature">
718
-
719
- <a href="#set_at_counter-instance_method" title="#set_at_counter (instance method)">- (Object) <strong>set_at_counter</strong>(value) </a>
720
-
721
-
722
-
723
- </span>
724
-
725
-
726
-
727
-
728
-
729
-
730
-
731
-
732
-
733
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
734
-
735
- <p>Sets the value of the array at counter with value.</p>
736
- </div></span>
737
-
738
- </li>
739
-
740
-
741
- <li class="public ">
742
- <span class="summary_signature">
743
-
744
- <a href="#set_counter-instance_method" title="#set_counter (instance method)">- (Object) <strong>set_counter</strong>(counter) </a>
745
-
746
-
747
-
748
- </span>
749
-
750
-
751
-
752
-
753
-
754
-
755
-
756
-
757
-
758
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
759
-
760
- <p>Sets this index to point to the given counter.</p>
761
- </div></span>
762
-
763
- </li>
764
-
765
-
766
- <li class="public ">
767
- <span class="summary_signature">
768
-
769
- <a href="#set_counter_fast-instance_method" title="#set_counter_fast (instance method)">- (Object) <strong>set_counter_fast</strong>(counter) </a>
770
-
771
-
772
-
773
- </span>
774
-
775
-
776
-
777
-
778
-
779
-
780
-
781
-
782
-
783
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
784
-
785
- <p>Sets this index to point to the given counter.</p>
608
+ <span class="summary_desc"><div class='inline'>
609
+ <p>------------------------------------------------------------------------------------
610
+ Sets the value of counter.</p>
786
611
  </div></span>
787
612
 
788
613
  </li>
@@ -805,9 +630,9 @@ positive values.</p>
805
630
 
806
631
 
807
632
 
808
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
809
-
810
- <p>Sets value of current counter.</p>
633
+ <span class="summary_desc"><div class='inline'>
634
+ <p>------------------------------------------------------------------------------------
635
+ Sets value of current counter.</p>
811
636
  </div></span>
812
637
 
813
638
  </li>
@@ -830,33 +655,10 @@ positive values.</p>
830
655
 
831
656
 
832
657
 
833
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
834
-
835
- <p>Sets the finishing position of the index ????????????????????????????-.</p>
836
- </div></span>
837
-
838
- </li>
839
-
840
-
841
- <li class="public ">
842
- <span class="summary_signature">
843
-
844
- <a href="#set_i-instance_method" title="#set_i (instance method)">- (Object) <strong>set_i</strong>(dim, index) </a>
845
-
846
-
847
-
848
- </span>
849
-
850
-
851
-
852
-
853
-
854
-
855
-
856
-
857
-
858
658
  <span class="summary_desc"><div class='inline'>
859
- <p>????????????????????????????.</p>
659
+ <p>-------------------------------------------------------------------------------------
660
+ Sets the finishing position of the index
661
+ -------------------------------------------------------------------------------------.</p>
860
662
  </div></span>
861
663
 
862
664
  </li>
@@ -865,7 +667,7 @@ positive values.</p>
865
667
  <li class="public ">
866
668
  <span class="summary_signature">
867
669
 
868
- <a href="#set_i_fast-instance_method" title="#set_i_fast (instance method)">- (Object) <strong>set_i_fast</strong>(dim, index) </a>
670
+ <a href="#set_scalar-instance_method" title="#set_scalar (instance method)">- (Object) <strong>set_scalar</strong>(value) </a>
869
671
 
870
672
 
871
673
 
@@ -880,7 +682,7 @@ positive values.</p>
880
682
 
881
683
 
882
684
  <span class="summary_desc"><div class='inline'>
883
- <p>????????????????????????????.</p>
685
+ <p>---------------------------------------------------------------------------------------.</p>
884
686
  </div></span>
885
687
 
886
688
  </li>
@@ -903,33 +705,10 @@ positive values.</p>
903
705
 
904
706
 
905
707
 
906
- <span class="summary_desc"><div class='inline'><hr style="height: 10px">
907
-
908
- <p>Sets the starting position of the index ????????????????????????????-.</p>
909
- </div></span>
910
-
911
- </li>
912
-
913
-
914
- <li class="public ">
915
- <span class="summary_signature">
916
-
917
- <a href="#walk_along_axes-instance_method" title="#walk_along_axes (instance method)">- (Object) <strong>walk_along_axes</strong> </a>
918
-
919
-
920
-
921
- </span>
922
-
923
-
924
-
925
-
926
-
927
-
928
-
929
-
930
-
931
708
  <span class="summary_desc"><div class='inline'>
932
- <p>????????????????????????????-.</p>
709
+ <p>-------------------------------------------------------------------------------------
710
+ Sets the starting position of the index
711
+ -------------------------------------------------------------------------------------.</p>
933
712
  </div></span>
934
713
 
935
714
  </li>
@@ -953,8 +732,8 @@ positive values.</p>
953
732
 
954
733
  </h3><div class="docstring">
955
734
  <div class="discussion">
956
- <hr style="height: 10px">
957
- <hr style="height: 10px">
735
+ <hr>
736
+ <hr>
958
737
 
959
738
 
960
739
  </div>
@@ -990,25 +769,24 @@ positive values.</p>
990
769
  <td>
991
770
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 56</span>
992
771
 
993
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_mdarray identifier id'>mdarray</span><span class='rparen token'>)</span>
772
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_mdarray'>mdarray</span><span class='rparen'>)</span>
994
773
 
995
- <span class='rubyid_@mdarray ivar id'>@mdarray</span> <span class='assign token'>=</span> <span class='rubyid_mdarray identifier id'>mdarray</span>
996
- <span class='rubyid_@nc_index ivar id'>@nc_index</span> <span class='assign token'>=</span> <span class='rubyid_mdarray identifier id'>mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getIndex identifier id'>getIndex</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
997
- <span class='rubyid_@shape ivar id'>@shape</span> <span class='assign token'>=</span> <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_getShape identifier id'>getShape</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span>
774
+ <span class='ivar'>@mdarray</span> <span class='op'>=</span> <span class='id identifier rubyid_mdarray'>mdarray</span>
775
+ <span class='ivar'>@nc_index</span> <span class='op'>=</span> <span class='id identifier rubyid_mdarray'>mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getIndex'>getIndex</span><span class='lparen'>(</span><span class='rparen'>)</span>
776
+ <span class='ivar'>@shape</span> <span class='op'>=</span> <span class='ivar'>@nc_index</span><span class='period'>.</span><span class='id identifier rubyid_getShape'>getShape</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
998
777
 
999
- <span class='comment val'># by default the starting index is the [0] index (first element)</span>
1000
- <span class='rubyid_shape identifier id'>shape</span> <span class='assign token'>=</span> <span class='rubyid_@shape ivar id'>@shape</span><span class='dot token'>.</span><span class='rubyid_dup identifier id'>dup</span>
1001
- <span class='rubyid_set_start identifier id'>set_start</span><span class='lparen token'>(</span><span class='rubyid_shape identifier id'>shape</span><span class='dot token'>.</span><span class='rubyid_fill identifier id'>fill</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
1002
- <span class='comment val'># by default the finish index is the last element of the array</span>
1003
- <span class='rubyid_finish identifier id'>finish</span> <span class='assign token'>=</span> <span class='rubyid_Array constant id'>Array</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
1004
- <span class='rubyid_@shape ivar id'>@shape</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_val identifier id'>val</span><span class='bitor op'>|</span>
1005
- <span class='rubyid_finish identifier id'>finish</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_val identifier id'>val</span> <span class='minus op'>-</span> <span class='integer val'>1</span>
1006
- <span class='rubyid_end end kw'>end</span>
778
+ <span class='comment'># by default the starting index is the [0] index (first element)
779
+ </span> <span class='id identifier rubyid_shape'>shape</span> <span class='op'>=</span> <span class='ivar'>@shape</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
780
+ <span class='id identifier rubyid_set_start'>set_start</span><span class='lparen'>(</span><span class='id identifier rubyid_shape'>shape</span><span class='period'>.</span><span class='id identifier rubyid_fill'>fill</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span><span class='rparen'>)</span>
781
+ <span class='comment'># by default the finish index is the last element of the array
782
+ </span> <span class='id identifier rubyid_finish'>finish</span> <span class='op'>=</span> <span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
783
+ <span class='ivar'>@shape</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_val'>val</span><span class='op'>|</span>
784
+ <span class='id identifier rubyid_finish'>finish</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_val'>val</span> <span class='op'>-</span> <span class='int'>1</span>
785
+ <span class='kw'>end</span>
1007
786
 
1008
- <span class='rubyid_set_finish identifier id'>set_finish</span><span class='lparen token'>(</span><span class='rubyid_finish identifier id'>finish</span><span class='rparen token'>)</span>
787
+ <span class='id identifier rubyid_set_finish'>set_finish</span><span class='lparen'>(</span><span class='id identifier rubyid_finish'>finish</span><span class='rparen'>)</span>
1009
788
 
1010
- <span class='rubyid_end end kw'>end</span>
1011
- </pre>
789
+ <span class='kw'>end</span></pre>
1012
790
  </td>
1013
791
  </tr>
1014
792
  </table>
@@ -1054,10 +832,9 @@ positive values.</p>
1054
832
  <td>
1055
833
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 50</span>
1056
834
 
1057
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_counter identifier id'>counter</span>
1058
- <span class='rubyid_@counter ivar id'>@counter</span>
1059
- <span class='rubyid_end end kw'>end</span>
1060
- </pre>
835
+ <span class='kw'>def</span> <span class='id identifier rubyid_counter'>counter</span>
836
+ <span class='ivar'>@counter</span>
837
+ <span class='kw'>end</span></pre>
1061
838
  </td>
1062
839
  </tr>
1063
840
  </table>
@@ -1098,10 +875,9 @@ positive values.</p>
1098
875
  <td>
1099
876
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 49</span>
1100
877
 
1101
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_finish identifier id'>finish</span>
1102
- <span class='rubyid_@finish ivar id'>@finish</span>
1103
- <span class='rubyid_end end kw'>end</span>
1104
- </pre>
878
+ <span class='kw'>def</span> <span class='id identifier rubyid_finish'>finish</span>
879
+ <span class='ivar'>@finish</span>
880
+ <span class='kw'>end</span></pre>
1105
881
  </td>
1106
882
  </tr>
1107
883
  </table>
@@ -1142,10 +918,9 @@ positive values.</p>
1142
918
  <td>
1143
919
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 45</span>
1144
920
 
1145
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_mdarray identifier id'>mdarray</span>
1146
- <span class='rubyid_@mdarray ivar id'>@mdarray</span>
1147
- <span class='rubyid_end end kw'>end</span>
1148
- </pre>
921
+ <span class='kw'>def</span> <span class='id identifier rubyid_mdarray'>mdarray</span>
922
+ <span class='ivar'>@mdarray</span>
923
+ <span class='kw'>end</span></pre>
1149
924
  </td>
1150
925
  </tr>
1151
926
  </table>
@@ -1186,10 +961,9 @@ positive values.</p>
1186
961
  <td>
1187
962
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 46</span>
1188
963
 
1189
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_nc_index identifier id'>nc_index</span>
1190
- <span class='rubyid_@nc_index ivar id'>@nc_index</span>
1191
- <span class='rubyid_end end kw'>end</span>
1192
- </pre>
964
+ <span class='kw'>def</span> <span class='id identifier rubyid_nc_index'>nc_index</span>
965
+ <span class='ivar'>@nc_index</span>
966
+ <span class='kw'>end</span></pre>
1193
967
  </td>
1194
968
  </tr>
1195
969
  </table>
@@ -1230,10 +1004,9 @@ positive values.</p>
1230
1004
  <td>
1231
1005
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 47</span>
1232
1006
 
1233
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_shape identifier id'>shape</span>
1234
- <span class='rubyid_@shape ivar id'>@shape</span>
1235
- <span class='rubyid_end end kw'>end</span>
1236
- </pre>
1007
+ <span class='kw'>def</span> <span class='id identifier rubyid_shape'>shape</span>
1008
+ <span class='ivar'>@shape</span>
1009
+ <span class='kw'>end</span></pre>
1237
1010
  </td>
1238
1011
  </tr>
1239
1012
  </table>
@@ -1252,10 +1025,10 @@ positive values.</p>
1252
1025
 
1253
1026
  </h3><div class="docstring">
1254
1027
  <div class="discussion">
1255
- <hr style="height: 10px">
1028
+ <hr>
1256
1029
 
1257
1030
  <p>Accessor methods for start, finish and position.</p>
1258
- <hr style="height: 10px">
1031
+ <hr>
1259
1032
 
1260
1033
 
1261
1034
  </div>
@@ -1276,10 +1049,9 @@ positive values.</p>
1276
1049
  <td>
1277
1050
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 110</span>
1278
1051
 
1279
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_start identifier id'>start</span>
1280
- <span class='rubyid_@start ivar id'>@start</span>
1281
- <span class='rubyid_end end kw'>end</span>
1282
- </pre>
1052
+ <span class='kw'>def</span> <span class='id identifier rubyid_start'>start</span>
1053
+ <span class='ivar'>@start</span>
1054
+ <span class='kw'>end</span></pre>
1283
1055
  </td>
1284
1056
  </tr>
1285
1057
  </table>
@@ -1303,11 +1075,11 @@ positive values.</p>
1303
1075
 
1304
1076
  </h3><div class="docstring">
1305
1077
  <div class="discussion">
1306
- <hr style="height: 10px">
1078
+ <hr>
1307
1079
 
1308
1080
  <p>Gets the element at the given counter. If counter is not basic, try to fix
1309
1081
  it to its basic form.</p>
1310
- <hr style="height: 10px">
1082
+ <hr>
1311
1083
 
1312
1084
 
1313
1085
  </div>
@@ -1329,11 +1101,10 @@ it to its basic form.</p>
1329
1101
  <td>
1330
1102
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 166</span>
1331
1103
 
1332
- <span class='rubyid_def def kw'>def</span> <span class='aref op'>[]</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
1333
- <span class='rubyid_set_counter identifier id'>set_counter</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
1334
- <span class='rubyid_get_at_counter identifier id'>get_at_counter</span>
1335
- <span class='rubyid_end end kw'>end</span>
1336
- </pre>
1104
+ <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1105
+ <span class='id identifier rubyid_set_counter'>set_counter</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1106
+ <span class='id identifier rubyid_get_at_counter'>get_at_counter</span>
1107
+ <span class='kw'>end</span></pre>
1337
1108
  </td>
1338
1109
  </tr>
1339
1110
  </table>
@@ -1350,11 +1121,11 @@ it to its basic form.</p>
1350
1121
 
1351
1122
  </h3><div class="docstring">
1352
1123
  <div class="discussion">
1353
- <hr style="height: 10px">
1124
+ <hr>
1354
1125
 
1355
1126
  <p>Sets the value of counter. If counter is not basic, try to fix it to its
1356
1127
  basic form.</p>
1357
- <hr style="height: 10px">
1128
+ <hr>
1358
1129
 
1359
1130
 
1360
1131
  </div>
@@ -1368,28 +1139,27 @@ basic form.</p>
1368
1139
  <pre class="lines">
1369
1140
 
1370
1141
 
1371
- 196
1372
- 197
1373
- 198
1374
- 199</pre>
1142
+ 251
1143
+ 252
1144
+ 253
1145
+ 254</pre>
1375
1146
  </td>
1376
1147
  <td>
1377
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 196</span>
1148
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 251</span>
1378
1149
 
1379
- <span class='rubyid_def def kw'>def</span> <span class='aset op'>[]=</span> <span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
1380
- <span class='rubyid_set_counter identifier id'>set_counter</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
1381
- <span class='rubyid_set_at_counter identifier id'>set_at_counter</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
1382
- <span class='rubyid_end end kw'>end</span>
1383
- </pre>
1150
+ <span class='kw'>def</span> <span class='op'>[]=</span> <span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1151
+ <span class='id identifier rubyid_set_counter'>set_counter</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1152
+ <span class='id identifier rubyid_set_at_counter'>set_at_counter</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1153
+ <span class='kw'>end</span></pre>
1384
1154
  </td>
1385
1155
  </tr>
1386
1156
  </table>
1387
1157
  </div>
1388
1158
 
1389
1159
  <div class="method_details ">
1390
- <h3 class="signature " id="compute_size-instance_method">
1160
+ <h3 class="signature " id="each-instance_method">
1391
1161
 
1392
- - (<tt>Object</tt>) <strong>compute_size</strong>
1162
+ - (<tt>Object</tt>) <strong>each</strong>
1393
1163
 
1394
1164
 
1395
1165
 
@@ -1397,10 +1167,8 @@ basic form.</p>
1397
1167
 
1398
1168
  </h3><div class="docstring">
1399
1169
  <div class="discussion">
1400
- <hr style="height: 10px">
1401
-
1402
- <p>Compute total number of elements in the array.</p>
1403
- <hr style="height: 10px">
1170
+ <hr>
1171
+ <hr>
1404
1172
 
1405
1173
 
1406
1174
  </div>
@@ -1414,26 +1182,35 @@ basic form.</p>
1414
1182
  <pre class="lines">
1415
1183
 
1416
1184
 
1417
- 490
1418
- 491
1419
- 492</pre>
1185
+ 134
1186
+ 135
1187
+ 136
1188
+ 137
1189
+ 138
1190
+ 139
1191
+ 140
1192
+ 141</pre>
1420
1193
  </td>
1421
1194
  <td>
1422
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 490</span>
1195
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 134</span>
1196
+
1197
+ <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span>
1198
+
1199
+ <span class='id identifier rubyid_reset_counter'>reset_counter</span>
1200
+ <span class='kw'>begin</span>
1201
+ <span class='kw'>yield</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_counter'>counter</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1202
+ <span class='kw'>end</span> <span class='kw'>while</span><span class='lparen'>(</span><span class='id identifier rubyid_get_next_counter'>get_next_counter</span><span class='rparen'>)</span>
1423
1203
 
1424
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_compute_size identifier id'>compute_size</span>
1425
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_computeSize identifier id'>computeSize</span><span class='lparen token'>(</span><span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getShape identifier id'>getShape</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
1426
- <span class='rubyid_end end kw'>end</span>
1427
- </pre>
1204
+ <span class='kw'>end</span></pre>
1428
1205
  </td>
1429
1206
  </tr>
1430
1207
  </table>
1431
1208
  </div>
1432
1209
 
1433
1210
  <div class="method_details ">
1434
- <h3 class="signature " id="each-instance_method">
1211
+ <h3 class="signature " id="each_along_axes-instance_method">
1435
1212
 
1436
- - (<tt>Object</tt>) <strong>each</strong>
1213
+ - (<tt>Object</tt>) <strong>each_along_axes</strong>(axes)
1437
1214
 
1438
1215
 
1439
1216
 
@@ -1441,66 +1218,14 @@ basic form.</p>
1441
1218
 
1442
1219
  </h3><div class="docstring">
1443
1220
  <div class="discussion">
1444
- <hr style="height: 10px">
1445
- <hr style="height: 10px">
1446
-
1447
-
1448
- </div>
1449
- </div>
1450
- <div class="tags">
1451
-
1452
-
1453
- </div><table class="source_code">
1454
- <tr>
1455
- <td>
1456
- <pre class="lines">
1457
-
1458
-
1459
- 134
1460
- 135
1461
- 136
1462
- 137
1463
- 138
1464
- 139
1465
- 140
1466
- 141</pre>
1467
- </td>
1468
- <td>
1469
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 134</span>
1470
-
1471
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_each identifier id'>each</span>
1472
-
1473
- <span class='rubyid_reset_counter identifier id'>reset_counter</span>
1474
- <span class='rubyid_begin begin kw'>begin</span>
1475
- <span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_counter identifier id'>counter</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_block_given? fid id'>block_given?</span>
1476
- <span class='rubyid_end end kw'>end</span> <span class='rubyid_while while_mod kw'>while</span><span class='lparen token'>(</span><span class='rubyid_get_next_counter identifier id'>get_next_counter</span><span class='rparen token'>)</span>
1477
-
1478
- <span class='rubyid_end end kw'>end</span>
1479
- </pre>
1480
- </td>
1481
- </tr>
1482
- </table>
1483
- </div>
1484
-
1485
- <div class="method_details ">
1486
- <h3 class="signature " id="each_along_axes-instance_method">
1487
-
1488
- - (<tt>Object</tt>) <strong>each_along_axes</strong>(axes)
1489
-
1490
-
1491
-
1492
-
1493
-
1494
- </h3><div class="docstring">
1495
- <div class="discussion">
1496
- <hr style="height: 10px">
1497
-
1498
- <p>Walks the counter along each of the axes. For instance if given axes [0,
1499
- 2] and the array shape is [4, 3, 2], then the counter will be [0, 0, 0],
1500
- [0, 0, 1],</p>
1501
- <dl class="rdoc-list"><dt>1, 0, 1], [1, 0, 1], [2, 0, 0], ? [3, 0, 1</dt>
1502
- <dd><hr style="height: 10px">
1503
- </dd></dl>
1221
+ <hr>
1222
+
1223
+ <p>Walks the counter along each of the axes. For instance if given axes [0,
1224
+ 2] and the array shape is [4, 3, 2], then the counter will be [0, 0, 0],
1225
+ [0, 0, 1],</p>
1226
+ <dl class="rdoc-list label-list"><dt>1, 0, 1], [1, 0, 1], [2, 0, 0], ... [3, 0, 1
1227
+ <dd><hr>
1228
+ </dd></dl>
1504
1229
 
1505
1230
 
1506
1231
  </div>
@@ -1529,18 +1254,17 @@ basic form.</p>
1529
1254
  <td>
1530
1255
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 149</span>
1531
1256
 
1532
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_each_along_axes identifier id'>each_along_axes</span><span class='lparen token'>(</span><span class='rubyid_axes identifier id'>axes</span><span class='rparen token'>)</span>
1257
+ <span class='kw'>def</span> <span class='id identifier rubyid_each_along_axes'>each_along_axes</span><span class='lparen'>(</span><span class='id identifier rubyid_axes'>axes</span><span class='rparen'>)</span>
1533
1258
 
1534
- <span class='rubyid_reset_counter identifier id'>reset_counter</span>
1535
- <span class='rubyid_@axes ivar id'>@axes</span> <span class='assign token'>=</span> <span class='rubyid_axes identifier id'>axes</span>
1259
+ <span class='id identifier rubyid_reset_counter'>reset_counter</span>
1260
+ <span class='ivar'>@axes</span> <span class='op'>=</span> <span class='id identifier rubyid_axes'>axes</span>
1536
1261
 
1537
- <span class='rubyid_axis identifier id'>axis</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_counter identifier id'>counter</span><span class='dot token'>.</span><span class='rubyid_size identifier id'>size</span> <span class='minus op'>-</span> <span class='integer val'>2</span><span class='rbrack token'>]</span>
1538
- <span class='rubyid_begin begin kw'>begin</span>
1539
- <span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_counter identifier id'>counter</span><span class='comma token'>,</span> <span class='rubyid_axis identifier id'>axis</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_block_given? fid id'>block_given?</span>
1540
- <span class='rubyid_end end kw'>end</span> <span class='rubyid_while while_mod kw'>while</span> <span class='lparen token'>(</span><span class='rubyid_axis identifier id'>axis</span> <span class='assign token'>=</span> <span class='rubyid_walk_along_axes identifier id'>walk_along_axes</span><span class='rparen token'>)</span>
1262
+ <span class='id identifier rubyid_axis'>axis</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_counter'>counter</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>-</span> <span class='int'>2</span><span class='rbracket'>]</span>
1263
+ <span class='kw'>begin</span>
1264
+ <span class='kw'>yield</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_counter'>counter</span><span class='comma'>,</span> <span class='id identifier rubyid_axis'>axis</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1265
+ <span class='kw'>end</span> <span class='kw'>while</span> <span class='lparen'>(</span><span class='id identifier rubyid_axis'>axis</span> <span class='op'>=</span> <span class='id identifier rubyid_walk_along_axes'>walk_along_axes</span><span class='rparen'>)</span>
1541
1266
 
1542
- <span class='rubyid_end end kw'>end</span>
1543
- </pre>
1267
+ <span class='kw'>end</span></pre>
1544
1268
  </td>
1545
1269
  </tr>
1546
1270
  </table>
@@ -1557,11 +1281,11 @@ basic form.</p>
1557
1281
 
1558
1282
  </h3><div class="docstring">
1559
1283
  <div class="discussion">
1560
- <hr style="height: 10px">
1284
+ <hr>
1561
1285
 
1562
1286
  <p>Gets the element at the given counter. Assumes that the counter is of the
1563
1287
  proper shape.</p>
1564
- <hr style="height: 10px">
1288
+ <hr>
1565
1289
 
1566
1290
 
1567
1291
  </div>
@@ -1583,108 +1307,19 @@ proper shape.</p>
1583
1307
  <td>
1584
1308
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 176</span>
1585
1309
 
1586
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_get identifier id'>get</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
1587
- <span class='rubyid_set_counter_fast identifier id'>set_counter_fast</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
1588
- <span class='rubyid_get_at_counter identifier id'>get_at_counter</span>
1589
- <span class='rubyid_end end kw'>end</span>
1590
- </pre>
1591
- </td>
1592
- </tr>
1593
- </table>
1594
- </div>
1595
-
1596
- <div class="method_details ">
1597
- <h3 class="signature " id="get_at_counter-instance_method">
1598
-
1599
- - (<tt>Object</tt>) <strong>get_at_counter</strong>
1600
-
1601
-
1602
-
1603
-
1604
-
1605
- </h3><div class="docstring">
1606
- <div class="discussion">
1607
- <hr style="height: 10px">
1608
- <hr style="height: 10px">
1609
-
1610
-
1611
- </div>
1612
- </div>
1613
- <div class="tags">
1614
-
1615
-
1616
- </div><table class="source_code">
1617
- <tr>
1618
- <td>
1619
- <pre class="lines">
1620
-
1621
-
1622
- 387
1623
- 388
1624
- 389
1625
- 390
1626
- 391
1627
- 392
1628
- 393
1629
- 394
1630
- 395
1631
- 396
1632
- 397
1633
- 398
1634
- 399
1635
- 400
1636
- 401
1637
- 402
1638
- 403
1639
- 404
1640
- 405
1641
- 406
1642
- 407
1643
- 408
1644
- 409
1645
- 410
1646
- 411
1647
- 412</pre>
1648
- </td>
1649
- <td>
1650
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 387</span>
1651
-
1652
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_get_at_counter identifier id'>get_at_counter</span>
1653
-
1654
- <span class='rubyid_case case kw'>case</span> <span class='rubyid_@type ivar id'>@type</span>
1655
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;boolean&quot;</span>
1656
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getBoolean identifier id'>getBoolean</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1657
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;byte&quot;</span>
1658
- <span class='rubyid_@mdarra ivar id'>@mdarra</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getByte identifier id'>getByte</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1659
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;char&quot;</span>
1660
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getChar identifier id'>getChar</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1661
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;double&quot;</span>
1662
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getDouble identifier id'>getDouble</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1663
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;float&quot;</span>
1664
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getFloat identifier id'>getFloat</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1665
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;int&quot;</span>
1666
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getInt identifier id'>getInt</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1667
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;long&quot;</span>
1668
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getLong identifier id'>getLong</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1669
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;short&quot;</span>
1670
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getShort identifier id'>getShort</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1671
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;unsigned&quot;</span>
1672
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getUnsigned identifier id'>getUnsigned</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1673
- <span class='rubyid_else else kw'>else</span>
1674
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_getObject identifier id'>getObject</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='rparen token'>)</span>
1675
- <span class='rubyid_end end kw'>end</span>
1676
-
1677
- <span class='rubyid_end end kw'>end</span>
1678
- </pre>
1310
+ <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1311
+ <span class='id identifier rubyid_set_counter_fast'>set_counter_fast</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1312
+ <span class='id identifier rubyid_get_at_counter'>get_at_counter</span>
1313
+ <span class='kw'>end</span></pre>
1679
1314
  </td>
1680
1315
  </tr>
1681
1316
  </table>
1682
1317
  </div>
1683
1318
 
1684
1319
  <div class="method_details ">
1685
- <h3 class="signature " id="get_current-instance_method">
1320
+ <h3 class="signature " id="get_as-instance_method">
1686
1321
 
1687
- - (<tt>Object</tt>) <strong>get_current</strong>
1322
+ - (<tt>Object</tt>) <strong>get_as</strong>(type, count = nil)
1688
1323
 
1689
1324
 
1690
1325
 
@@ -1692,11 +1327,10 @@ proper shape.</p>
1692
1327
 
1693
1328
  </h3><div class="docstring">
1694
1329
  <div class="discussion">
1695
- <hr style="height: 10px">
1330
+ <hr>
1696
1331
 
1697
- <p>Gets element at current counter. Can be done fast, as counter is always of
1698
- the proper shape.</p>
1699
- <hr style="height: 10px">
1332
+ <p>Gets the element at the courrent counter with the given type</p>
1333
+ <hr>
1700
1334
 
1701
1335
 
1702
1336
  </div>
@@ -1710,73 +1344,83 @@ the proper shape.</p>
1710
1344
  <pre class="lines">
1711
1345
 
1712
1346
 
1347
+ 185
1713
1348
  186
1714
1349
  187
1715
1350
  188
1716
- 189</pre>
1717
- </td>
1718
- <td>
1719
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 186</span>
1720
-
1721
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_get_current identifier id'>get_current</span>
1722
- <span class='rubyid_set_counter_fast identifier id'>set_counter_fast</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
1723
- <span class='rubyid_get_at_counter identifier id'>get_at_counter</span>
1724
- <span class='rubyid_end end kw'>end</span>
1725
- </pre>
1726
- </td>
1727
- </tr>
1728
- </table>
1729
- </div>
1730
-
1731
- <div class="method_details ">
1732
- <h3 class="signature " id="get_current_counter-instance_method">
1733
-
1734
- - (<tt>Object</tt>) <strong>get_current_counter</strong>
1735
-
1736
-
1737
-
1738
-
1739
-
1740
- </h3><div class="docstring">
1741
- <div class="discussion">
1742
- <hr style="height: 10px">
1743
-
1744
- <p>Gets the current counter from the underlining storage. Should be the same
1745
- as</p>
1746
- <hr style="height: 10px">
1747
-
1748
-
1749
- </div>
1750
- </div>
1751
- <div class="tags">
1752
-
1753
-
1754
- </div><table class="source_code">
1755
- <tr>
1756
- <td>
1757
- <pre class="lines">
1758
-
1759
-
1760
- 499
1761
- 500
1762
- 501</pre>
1351
+ 189
1352
+ 190
1353
+ 191
1354
+ 192
1355
+ 193
1356
+ 194
1357
+ 195
1358
+ 196
1359
+ 197
1360
+ 198
1361
+ 199
1362
+ 200
1363
+ 201
1364
+ 202
1365
+ 203
1366
+ 204
1367
+ 205
1368
+ 206
1369
+ 207
1370
+ 208
1371
+ 209
1372
+ 210
1373
+ 211
1374
+ 212
1375
+ 213
1376
+ 214
1377
+ 215
1378
+ 216</pre>
1763
1379
  </td>
1764
1380
  <td>
1765
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 499</span>
1766
-
1767
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_get_current_counter identifier id'>get_current_counter</span>
1768
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_getCurrentCounter identifier id'>getCurrentCounter</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span>
1769
- <span class='rubyid_end end kw'>end</span>
1770
- </pre>
1381
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 185</span>
1382
+
1383
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_as'>get_as</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1384
+
1385
+ <span class='id identifier rubyid_count'>count</span> <span class='op'>?</span> <span class='id identifier rubyid_set_counter_fast'>set_counter_fast</span><span class='lparen'>(</span><span class='id identifier rubyid_count'>count</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_set_counter_fast'>set_counter_fast</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1386
+
1387
+ <span class='kw'>begin</span>
1388
+ <span class='kw'>case</span> <span class='id identifier rubyid_type'>type</span>
1389
+ <span class='kw'>when</span> <span class='symbol'>:boolean</span>
1390
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getBoolean'>getBoolean</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1391
+ <span class='kw'>when</span> <span class='symbol'>:byte</span>
1392
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getByte'>getByte</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1393
+ <span class='kw'>when</span> <span class='symbol'>:char</span>
1394
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getChar'>getChar</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1395
+ <span class='kw'>when</span> <span class='symbol'>:short</span>
1396
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getShort'>getShort</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1397
+ <span class='kw'>when</span> <span class='symbol'>:int</span>
1398
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getInt'>getInt</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1399
+ <span class='kw'>when</span> <span class='symbol'>:long</span>
1400
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getLong'>getLong</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1401
+ <span class='kw'>when</span> <span class='symbol'>:float</span>
1402
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getFloat'>getFloat</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1403
+ <span class='kw'>when</span> <span class='symbol'>:double</span>
1404
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getDouble'>getDouble</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1405
+ <span class='kw'>when</span> <span class='symbol'>:string</span>
1406
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getObject'>getObject</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
1407
+ <span class='kw'>else</span>
1408
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_getObject'>getObject</span><span class='lparen'>(</span><span class='ivar'>@nc_index</span><span class='rparen'>)</span>
1409
+ <span class='kw'>end</span>
1410
+ <span class='kw'>rescue</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>UcarMa2</span><span class='op'>::</span><span class='const'>ForbiddenConversionException</span>
1411
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cannot convert to type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1412
+ <span class='kw'>end</span>
1413
+
1414
+ <span class='kw'>end</span></pre>
1771
1415
  </td>
1772
1416
  </tr>
1773
1417
  </table>
1774
1418
  </div>
1775
1419
 
1776
1420
  <div class="method_details ">
1777
- <h3 class="signature " id="get_next_counter-instance_method">
1421
+ <h3 class="signature " id="get_current-instance_method">
1778
1422
 
1779
- - (<tt>Object</tt>) <strong>get_next_counter</strong>
1423
+ - (<tt>Object</tt>) <strong>get_current</strong>
1780
1424
 
1781
1425
 
1782
1426
 
@@ -1784,10 +1428,11 @@ as</p>
1784
1428
 
1785
1429
  </h3><div class="docstring">
1786
1430
  <div class="discussion">
1787
- <hr style="height: 10px">
1431
+ <hr>
1788
1432
 
1789
- <p>Returns next counter if no overflow, otherwise returns nil</p>
1790
- <hr style="height: 10px">
1433
+ <p>Gets element at current counter. Can be done fast, as counter is always of
1434
+ the proper shape.</p>
1435
+ <hr>
1791
1436
 
1792
1437
 
1793
1438
  </div>
@@ -1801,58 +1446,27 @@ as</p>
1801
1446
  <pre class="lines">
1802
1447
 
1803
1448
 
1804
- 230
1805
- 231
1806
- 232
1807
- 233
1808
- 234
1809
- 235
1810
- 236
1811
- 237
1812
- 238
1813
- 239
1814
- 240
1815
1449
  241
1816
1450
  242
1817
1451
  243
1818
- 244
1819
- 245
1820
- 246
1821
- 247
1822
- 248</pre>
1452
+ 244</pre>
1823
1453
  </td>
1824
1454
  <td>
1825
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 230</span>
1826
-
1827
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_get_next_counter identifier id'>get_next_counter</span>
1828
-
1829
- <span class='comment val'># gets the next counter</span>
1830
- <span class='rubyid_shape identifier id'>shape</span> <span class='assign token'>=</span> <span class='rubyid_@shape ivar id'>@shape</span><span class='dot token'>.</span><span class='rubyid_dup identifier id'>dup</span><span class='dot token'>.</span><span class='rubyid_reverse identifier id'>reverse</span>
1831
-
1832
- <span class='rubyid_@counter ivar id'>@counter</span><span class='dot token'>.</span><span class='rubyid_each_with_index identifier id'>each_with_index</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_val identifier id'>val</span><span class='comma token'>,</span> <span class='rubyid_index identifier id'>index</span><span class='bitor op'>|</span>
1833
-
1834
- <span class='rubyid_if if kw'>if</span> <span class='rubyid_val identifier id'>val</span> <span class='lt op'>&lt;</span> <span class='rubyid_shape identifier id'>shape</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span> <span class='minus op'>-</span> <span class='integer val'>1</span>
1835
- <span class='rubyid_@counter ivar id'>@counter</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_val identifier id'>val</span> <span class='plus op'>+</span> <span class='integer val'>1</span>
1836
- <span class='rubyid_return return kw'>return</span> <span class='rubyid_counter identifier id'>counter</span>
1837
- <span class='rubyid_else else kw'>else</span>
1838
- <span class='rubyid_@counter ivar id'>@counter</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
1839
- <span class='rubyid_end end kw'>end</span>
1455
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 241</span>
1840
1456
 
1841
- <span class='rubyid_end end kw'>end</span>
1842
-
1843
- <span class='rubyid_return return kw'>return</span> <span class='rubyid_nil nil kw'>nil</span>
1844
-
1845
- <span class='rubyid_end end kw'>end</span>
1846
- </pre>
1457
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_current'>get_current</span>
1458
+ <span class='id identifier rubyid_set_counter_fast'>set_counter_fast</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1459
+ <span class='id identifier rubyid_get_at_counter'>get_at_counter</span>
1460
+ <span class='kw'>end</span></pre>
1847
1461
  </td>
1848
1462
  </tr>
1849
1463
  </table>
1850
1464
  </div>
1851
1465
 
1852
1466
  <div class="method_details ">
1853
- <h3 class="signature " id="get_shape-instance_method">
1467
+ <h3 class="signature " id="get_scalar-instance_method">
1854
1468
 
1855
- - (<tt>Object</tt>) <strong>get_shape</strong>(dim_i)
1469
+ - (<tt>Object</tt>) <strong>get_scalar</strong>
1856
1470
 
1857
1471
 
1858
1472
 
@@ -1860,10 +1474,8 @@ as</p>
1860
1474
 
1861
1475
  </h3><div class="docstring">
1862
1476
  <div class="discussion">
1863
- <hr style="height: 10px">
1864
-
1865
- <p>Get the length of the ith dimension.</p>
1866
- <hr style="height: 10px">
1477
+ <hr>
1478
+ <hr>
1867
1479
 
1868
1480
 
1869
1481
  </div>
@@ -1877,26 +1489,25 @@ as</p>
1877
1489
  <pre class="lines">
1878
1490
 
1879
1491
 
1880
- 482
1881
- 483
1882
- 484</pre>
1492
+ 222
1493
+ 223
1494
+ 224</pre>
1883
1495
  </td>
1884
1496
  <td>
1885
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 482</span>
1497
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 222</span>
1886
1498
 
1887
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_get_shape identifier id'>get_shape</span><span class='lparen token'>(</span><span class='rubyid_dim_i identifier id'>dim_i</span><span class='rparen token'>)</span>
1888
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_getShape identifier id'>getShape</span><span class='lparen token'>(</span><span class='rubyid_dim_i identifier id'>dim_i</span><span class='rparen token'>)</span>
1889
- <span class='rubyid_end end kw'>end</span>
1890
- </pre>
1499
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_scalar'>get_scalar</span>
1500
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
1501
+ <span class='kw'>end</span></pre>
1891
1502
  </td>
1892
1503
  </tr>
1893
1504
  </table>
1894
1505
  </div>
1895
1506
 
1896
1507
  <div class="method_details ">
1897
- <h3 class="signature " id="incr-instance_method">
1508
+ <h3 class="signature " id="jget-instance_method">
1898
1509
 
1899
- - (<tt>Object</tt>) <strong>incr</strong>
1510
+ - (<tt>Object</tt>) <strong>jget</strong>(counter)
1900
1511
 
1901
1512
 
1902
1513
 
@@ -1904,10 +1515,11 @@ as</p>
1904
1515
 
1905
1516
  </h3><div class="docstring">
1906
1517
  <div class="discussion">
1907
- <hr style="height: 10px">
1518
+ <hr>
1908
1519
 
1909
- <p>Increment the current element by 1.</p>
1910
- <hr style="height: 10px">
1520
+ <p>Gets the element at the given counter. Assumes that the counter is of the
1521
+ proper shape. Also, counter should be an int java array</p>
1522
+ <hr>
1911
1523
 
1912
1524
 
1913
1525
  </div>
@@ -1921,17 +1533,18 @@ as</p>
1921
1533
  <pre class="lines">
1922
1534
 
1923
1535
 
1924
- 474
1925
- 475
1926
- 476</pre>
1536
+ 231
1537
+ 232
1538
+ 233
1539
+ 234</pre>
1927
1540
  </td>
1928
1541
  <td>
1929
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 474</span>
1542
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 231</span>
1930
1543
 
1931
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_incr identifier id'>incr</span>
1932
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_incr identifier id'>incr</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
1933
- <span class='rubyid_end end kw'>end</span>
1934
- </pre>
1544
+ <span class='kw'>def</span> <span class='id identifier rubyid_jget'>jget</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1545
+ <span class='id identifier rubyid_jset_counter_fast'>jset_counter_fast</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1546
+ <span class='id identifier rubyid_get_at_counter'>get_at_counter</span>
1547
+ <span class='kw'>end</span></pre>
1935
1548
  </td>
1936
1549
  </tr>
1937
1550
  </table>
@@ -1948,10 +1561,10 @@ as</p>
1948
1561
 
1949
1562
  </h3><div class="docstring">
1950
1563
  <div class="discussion">
1951
- <hr style="height: 10px">
1564
+ <hr>
1952
1565
 
1953
1566
  <p>Reset the counter to the defined start value</p>
1954
- <hr style="height: 10px">
1567
+ <hr>
1955
1568
 
1956
1569
 
1957
1570
  </div>
@@ -1972,120 +1585,9 @@ as</p>
1972
1585
  <td>
1973
1586
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 126</span>
1974
1587
 
1975
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_reset_counter identifier id'>reset_counter</span>
1976
- <span class='rubyid_@counter ivar id'>@counter</span> <span class='assign token'>=</span> <span class='rubyid_@start ivar id'>@start</span><span class='dot token'>.</span><span class='rubyid_dup identifier id'>dup</span>
1977
- <span class='rubyid_end end kw'>end</span>
1978
- </pre>
1979
- </td>
1980
- </tr>
1981
- </table>
1982
- </div>
1983
-
1984
- <div class="method_details ">
1985
- <h3 class="signature " id="reshape-instance_method">
1986
-
1987
- - (<tt>Object</tt>) <strong>reshape</strong>(counter)
1988
-
1989
-
1990
-
1991
-
1992
-
1993
- </h3><div class="docstring">
1994
- <div class="discussion">
1995
- <hr style="height: 10px">
1996
-
1997
- <p>If given index has negative values, then reshape it so that it only has
1998
- positive values. check if it is a range: regex of the form /x/ or /x:y/ or
1999
- /x:y:z/</p>
2000
- <hr style="height: 10px">
2001
-
2002
-
2003
- </div>
2004
- </div>
2005
- <div class="tags">
2006
-
2007
-
2008
- </div><table class="source_code">
2009
- <tr>
2010
- <td>
2011
- <pre class="lines">
2012
-
2013
-
2014
- 280
2015
- 281
2016
- 282
2017
- 283
2018
- 284
2019
- 285
2020
- 286
2021
- 287
2022
- 288
2023
- 289
2024
- 290
2025
- 291
2026
- 292
2027
- 293
2028
- 294
2029
- 295
2030
- 296
2031
- 297
2032
- 298
2033
- 299
2034
- 300
2035
- 301
2036
- 302
2037
- 303
2038
- 304
2039
- 305
2040
- 306
2041
- 307
2042
- 308
2043
- 309
2044
- 310
2045
- 311
2046
- 312
2047
- 313
2048
- 314</pre>
2049
- </td>
2050
- <td>
2051
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 280</span>
2052
-
2053
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_reshape identifier id'>reshape</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
2054
-
2055
- <span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='dot token'>.</span><span class='rubyid_size identifier id'>size</span> <span class='neq op'>!=</span> <span class='rubyid_@shape ivar id'>@shape</span><span class='dot token'>.</span><span class='rubyid_size identifier id'>size</span><span class='rparen token'>)</span>
2056
- <span class='rubyid_raise identifier id'>raise</span> <span class='dstring node'>&quot;Counter shape #{counter} is not compatible with iterator shape #{@shape}&quot;</span>
2057
- <span class='rubyid_end end kw'>end</span>
2058
-
2059
- <span class='rubyid_reshaped_counter identifier id'>reshaped_counter</span> <span class='assign token'>=</span> <span class='rubyid_Array constant id'>Array</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
2060
- <span class='rubyid_section identifier id'>section</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span>
2061
-
2062
- <span class='rubyid_counter identifier id'>counter</span><span class='dot token'>.</span><span class='rubyid_each_with_index identifier id'>each_with_index</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_val identifier id'>val</span><span class='comma token'>,</span> <span class='rubyid_ind identifier id'>ind</span><span class='bitor op'>|</span>
2063
-
2064
- <span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Integer constant id'>Integer</span><span class='rparen token'>)</span>
2065
- <span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span> <span class='lt op'>&lt;</span> <span class='integer val'>0</span><span class='rparen token'>)</span>
2066
- <span class='rubyid_new_ind identifier id'>new_ind</span> <span class='assign token'>=</span> <span class='rubyid_@shape ivar id'>@shape</span><span class='lbrack token'>[</span><span class='rubyid_ind identifier id'>ind</span><span class='rbrack token'>]</span> <span class='plus op'>+</span> <span class='rubyid_val identifier id'>val</span>
2067
- <span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_new_ind identifier id'>new_ind</span> <span class='lt op'>&lt;</span> <span class='integer val'>0</span><span class='rparen token'>)</span>
2068
- <span class='rubyid_raise identifier id'>raise</span> <span class='dstring node'>&quot;Counter shape #{counter} is not compatible with iterator shape #{@shape}&quot;</span>
2069
- <span class='rubyid_end end kw'>end</span>
2070
- <span class='rubyid_reshaped_counter identifier id'>reshaped_counter</span><span class='lbrack token'>[</span><span class='rubyid_ind identifier id'>ind</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_new_ind identifier id'>new_ind</span>
2071
- <span class='rubyid_elsif elsif kw'>elsif</span> <span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span> <span class='geq op'>&gt;=</span> <span class='rubyid_@shape ivar id'>@shape</span><span class='lbrack token'>[</span><span class='rubyid_ind identifier id'>ind</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
2072
- <span class='rubyid_raise identifier id'>raise</span> <span class='dstring node'>&quot;Counter shape #{counter} is not compatible with iterator shape #{@shape}&quot;</span>
2073
- <span class='rubyid_else else kw'>else</span>
2074
- <span class='rubyid_reshaped_counter identifier id'>reshaped_counter</span><span class='lbrack token'>[</span><span class='rubyid_ind identifier id'>ind</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_counter identifier id'>counter</span><span class='lbrack token'>[</span><span class='rubyid_ind identifier id'>ind</span><span class='rbrack token'>]</span>
2075
- <span class='rubyid_end end kw'>end</span>
2076
-
2077
- <span class='rubyid_elsif elsif kw'>elsif</span> <span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Regexp constant id'>Regexp</span><span class='rparen token'>)</span>
2078
- <span class='rubyid_section identifier id'>section</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span>
2079
- <span class='rubyid_else else kw'>else</span>
2080
- <span class='rubyid_raise identifier id'>raise</span> <span class='dstring node'>&quot;Invalid index format: #{val}&quot;</span>
2081
- <span class='rubyid_end end kw'>end</span>
2082
-
2083
- <span class='rubyid_end end kw'>end</span>
2084
-
2085
- <span class='lbrack token'>[</span><span class='rubyid_section identifier id'>section</span><span class='comma token'>,</span> <span class='rubyid_reshaped_counter identifier id'>reshaped_counter</span><span class='rbrack token'>]</span>
2086
-
2087
- <span class='rubyid_end end kw'>end</span>
2088
- </pre>
1588
+ <span class='kw'>def</span> <span class='id identifier rubyid_reset_counter'>reset_counter</span>
1589
+ <span class='ivar'>@counter</span> <span class='op'>=</span> <span class='ivar'>@start</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
1590
+ <span class='kw'>end</span></pre>
2089
1591
  </td>
2090
1592
  </tr>
2091
1593
  </table>
@@ -2102,10 +1604,10 @@ positive values. check if it is a range: regex of the form /x/ or /x:y/ or
2102
1604
 
2103
1605
  </h3><div class="docstring">
2104
1606
  <div class="discussion">
2105
- <hr style="height: 10px">
1607
+ <hr>
2106
1608
 
2107
1609
  <p>Sets the value of counter. Assume that counter is on its basic form.</p>
2108
- <hr style="height: 10px">
1610
+ <hr>
2109
1611
 
2110
1612
 
2111
1613
  </div>
@@ -2119,232 +1621,18 @@ positive values. check if it is a range: regex of the form /x/ or /x:y/ or
2119
1621
  <pre class="lines">
2120
1622
 
2121
1623
 
2122
- 205
2123
- 206
2124
- 207
2125
- 208</pre>
2126
- </td>
2127
- <td>
2128
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 205</span>
2129
-
2130
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set identifier id'>set</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2131
- <span class='rubyid_set_counter_fast identifier id'>set_counter_fast</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
2132
- <span class='rubyid_set_at_counter identifier id'>set_at_counter</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2133
- <span class='rubyid_end end kw'>end</span>
2134
- </pre>
2135
- </td>
2136
- </tr>
2137
- </table>
2138
- </div>
2139
-
2140
- <div class="method_details ">
2141
- <h3 class="signature " id="set_at_counter-instance_method">
2142
-
2143
- - (<tt>Object</tt>) <strong>set_at_counter</strong>(value)
2144
-
2145
-
2146
-
2147
-
2148
-
2149
- </h3><div class="docstring">
2150
- <div class="discussion">
2151
- <hr style="height: 10px">
2152
-
2153
- <p>Sets the value of the array at counter with value. If type is given, cast
2154
- the value to type before assignment</p>
2155
- <hr style="height: 10px">
2156
-
2157
-
2158
- </div>
2159
- </div>
2160
- <div class="tags">
2161
-
2162
-
2163
- </div><table class="source_code">
2164
- <tr>
2165
- <td>
2166
- <pre class="lines">
2167
-
2168
-
2169
- 350
2170
- 351
2171
- 352
2172
- 353
2173
- 354
2174
- 355
2175
- 356
2176
- 357
2177
- 358
2178
- 359
2179
- 360
2180
- 361
2181
- 362
2182
- 363
2183
- 364
2184
- 365
2185
- 366
2186
- 367
2187
- 368
2188
- 369
2189
- 370
2190
- 371
2191
- 372
2192
- 373
2193
- 374
2194
- 375
2195
- 376
2196
- 377
2197
- 378
2198
- 379
2199
- 380
2200
- 381</pre>
2201
- </td>
2202
- <td>
2203
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 350</span>
2204
-
2205
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_at_counter identifier id'>set_at_counter</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2206
-
2207
- <span class='rubyid_begin begin kw'>begin</span>
2208
-
2209
- <span class='rubyid_case case kw'>case</span> <span class='rubyid_@type ivar id'>@type</span>
2210
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;boolean&quot;</span>
2211
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setBoolean identifier id'>setBoolean</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2212
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;byte&quot;</span>
2213
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setByte identifier id'>setByte</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2214
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;char&quot;</span>
2215
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setChar identifier id'>setChar</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2216
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;short&quot;</span>
2217
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setShort identifier id'>setShort</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2218
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;unsigned&quot;</span>
2219
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setUnsigned identifier id'>setUnsigned</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2220
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;int&quot;</span>
2221
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setInt identifier id'>setInt</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2222
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;long&quot;</span>
2223
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setLong identifier id'>setLong</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2224
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;float&quot;</span>
2225
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setFloat identifier id'>setFloat</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2226
- <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;double&quot;</span>
2227
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setDouble identifier id'>setDouble</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2228
- <span class='rubyid_else else kw'>else</span>
2229
- <span class='rubyid_@mdarray ivar id'>@mdarray</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='dot token'>.</span><span class='rubyid_setObject identifier id'>setObject</span><span class='lparen token'>(</span><span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2230
- <span class='rubyid_end end kw'>end</span>
2231
-
2232
- <span class='rubyid_rescue rescue kw'>rescue</span> <span class='rubyid_ClassCastException constant id'>ClassCastException</span>
2233
- <span class='rubyid_raise identifier id'>raise</span> <span class='string val'>&quot;Cannot cast element to array type&quot;</span>
2234
- <span class='rubyid_end end kw'>end</span>
2235
-
2236
- <span class='rubyid_end end kw'>end</span>
2237
- </pre>
2238
- </td>
2239
- </tr>
2240
- </table>
2241
- </div>
2242
-
2243
- <div class="method_details ">
2244
- <h3 class="signature " id="set_counter-instance_method">
2245
-
2246
- - (<tt>Object</tt>) <strong>set_counter</strong>(counter)
2247
-
2248
-
2249
-
2250
-
2251
-
2252
- </h3><div class="docstring">
2253
- <div class="discussion">
2254
- <hr style="height: 10px">
2255
-
2256
- <p>Sets this index to point to the given counter. If given counter has
2257
- negative values then convert them to positive values, making sure that the
2258
- counter respects the shape constraints. The given counter is a list of
2259
- elements as (2, 3, 3) and not and array.</p>
2260
- <hr style="height: 10px">
2261
-
2262
-
2263
- </div>
2264
- </div>
2265
- <div class="tags">
2266
-
2267
-
2268
- </div><table class="source_code">
2269
- <tr>
2270
- <td>
2271
- <pre class="lines">
2272
-
2273
-
2274
- 338
2275
- 339
2276
- 340
2277
- 341
2278
- 342
2279
- 343</pre>
2280
- </td>
2281
- <td>
2282
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 338</span>
2283
-
2284
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_counter identifier id'>set_counter</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
2285
-
2286
- <span class='rubyid_counter identifier id'>counter</span> <span class='assign token'>=</span> <span class='rubyid_reshape identifier id'>reshape</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
2287
- <span class='rubyid_set_counter_fast identifier id'>set_counter_fast</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
2288
-
2289
- <span class='rubyid_end end kw'>end</span>
2290
- </pre>
2291
- </td>
2292
- </tr>
2293
- </table>
2294
- </div>
2295
-
2296
- <div class="method_details ">
2297
- <h3 class="signature " id="set_counter_fast-instance_method">
2298
-
2299
- - (<tt>Object</tt>) <strong>set_counter_fast</strong>(counter)
2300
-
2301
-
2302
-
2303
-
2304
-
2305
- </h3><div class="docstring">
2306
- <div class="discussion">
2307
- <hr style="height: 10px">
2308
-
2309
- <p>Sets this index to point to the given counter. assumes that the counter
2310
- respects the shape constraints.</p>
2311
- <hr style="height: 10px">
2312
-
2313
-
2314
- </div>
2315
- </div>
2316
- <div class="tags">
2317
-
2318
-
2319
- </div><table class="source_code">
2320
- <tr>
2321
- <td>
2322
- <pre class="lines">
2323
-
2324
-
2325
- 321
2326
- 322
2327
- 323
2328
- 324
2329
- 325
2330
- 326
2331
- 327
2332
- 328
2333
- 329</pre>
1624
+ 260
1625
+ 261
1626
+ 262
1627
+ 263</pre>
2334
1628
  </td>
2335
1629
  <td>
2336
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 321</span>
2337
-
2338
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_counter_fast identifier id'>set_counter_fast</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
1630
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 260</span>
2339
1631
 
2340
- <span class='rubyid_begin begin kw'>begin</span>
2341
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set identifier id'>set</span><span class='lparen token'>(</span><span class='rubyid_counter identifier id'>counter</span><span class='dot token'>.</span><span class='rubyid_to_java identifier id'>to_java</span> <span class='symbol val'>:int</span><span class='rparen token'>)</span>
2342
- <span class='rubyid_rescue rescue kw'>rescue</span> <span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_lang identifier id'>lang</span><span class='dot token'>.</span><span class='rubyid_ArrayIndexOutOfBoundsException constant id'>ArrayIndexOutOfBoundsException</span>
2343
- <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_RangeError constant id'>RangeError</span><span class='comma token'>,</span> <span class='dstring node'>&quot;Invalid counter: #{counter}&quot;</span>
2344
- <span class='rubyid_end end kw'>end</span>
2345
-
2346
- <span class='rubyid_end end kw'>end</span>
2347
- </pre>
1632
+ <span class='kw'>def</span> <span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1633
+ <span class='id identifier rubyid_set_counter_fast'>set_counter_fast</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1634
+ <span class='id identifier rubyid_set_at_counter'>set_at_counter</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1635
+ <span class='kw'>end</span></pre>
2348
1636
  </td>
2349
1637
  </tr>
2350
1638
  </table>
@@ -2361,11 +1649,11 @@ respects the shape constraints.</p>
2361
1649
 
2362
1650
  </h3><div class="docstring">
2363
1651
  <div class="discussion">
2364
- <hr style="height: 10px">
1652
+ <hr>
2365
1653
 
2366
1654
  <p>Sets value of current counter. Can be done fast, as the current counter is
2367
1655
  always in its basic shape.</p>
2368
- <hr style="height: 10px">
1656
+ <hr>
2369
1657
 
2370
1658
 
2371
1659
  </div>
@@ -2379,19 +1667,18 @@ always in its basic shape.</p>
2379
1667
  <pre class="lines">
2380
1668
 
2381
1669
 
2382
- 215
2383
- 216
2384
- 217
2385
- 218</pre>
1670
+ 278
1671
+ 279
1672
+ 280
1673
+ 281</pre>
2386
1674
  </td>
2387
1675
  <td>
2388
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 215</span>
1676
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 278</span>
2389
1677
 
2390
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_current identifier id'>set_current</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2391
- <span class='rubyid_set_counter_fast identifier id'>set_counter_fast</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_counter identifier id'>counter</span><span class='rparen token'>)</span>
2392
- <span class='rubyid_set_at_counter identifier id'>set_at_counter</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
2393
- <span class='rubyid_end end kw'>end</span>
2394
- </pre>
1678
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_current'>set_current</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1679
+ <span class='id identifier rubyid_set_counter_fast'>set_counter_fast</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span>
1680
+ <span class='id identifier rubyid_set_at_counter'>set_at_counter</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1681
+ <span class='kw'>end</span></pre>
2395
1682
  </td>
2396
1683
  </tr>
2397
1684
  </table>
@@ -2408,10 +1695,10 @@ always in its basic shape.</p>
2408
1695
 
2409
1696
  </h3><div class="docstring">
2410
1697
  <div class="discussion">
2411
- <hr style="height: 10px">
1698
+ <hr>
2412
1699
 
2413
1700
  <p>Sets the finishing position of the index</p>
2414
- <hr style="height: 10px">
1701
+ <hr>
2415
1702
 
2416
1703
 
2417
1704
  </div>
@@ -2439,26 +1726,25 @@ always in its basic shape.</p>
2439
1726
  <td>
2440
1727
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 95</span>
2441
1728
 
2442
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_finish identifier id'>set_finish</span><span class='lparen token'>(</span><span class='rubyid_finish identifier id'>finish</span><span class='rparen token'>)</span>
1729
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_finish'>set_finish</span><span class='lparen'>(</span><span class='id identifier rubyid_finish'>finish</span><span class='rparen'>)</span>
2443
1730
 
2444
- <span class='rubyid_finish identifier id'>finish</span> <span class='assign token'>=</span> <span class='rubyid_reshape identifier id'>reshape</span><span class='lparen token'>(</span><span class='rubyid_finish identifier id'>finish</span><span class='rparen token'>)</span>
2445
- <span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_finish identifier id'>finish</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
2446
- <span class='rubyid_raise identifier id'>raise</span> <span class='string val'>&quot;Cannot set index finish position to an array section&quot;</span>
2447
- <span class='rubyid_else else kw'>else</span>
2448
- <span class='rubyid_@finish ivar id'>@finish</span> <span class='assign token'>=</span> <span class='rubyid_finish identifier id'>finish</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_reverse identifier id'>reverse</span>
2449
- <span class='rubyid_end end kw'>end</span>
1731
+ <span class='id identifier rubyid_finish'>finish</span> <span class='op'>=</span> <span class='id identifier rubyid_reshape'>reshape</span><span class='lparen'>(</span><span class='id identifier rubyid_finish'>finish</span><span class='rparen'>)</span>
1732
+ <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_finish'>finish</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1733
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot set index finish position to an array section</span><span class='tstring_end'>&quot;</span></span>
1734
+ <span class='kw'>else</span>
1735
+ <span class='ivar'>@finish</span> <span class='op'>=</span> <span class='id identifier rubyid_finish'>finish</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</span>
1736
+ <span class='kw'>end</span>
2450
1737
 
2451
- <span class='rubyid_end end kw'>end</span>
2452
- </pre>
1738
+ <span class='kw'>end</span></pre>
2453
1739
  </td>
2454
1740
  </tr>
2455
1741
  </table>
2456
1742
  </div>
2457
1743
 
2458
1744
  <div class="method_details ">
2459
- <h3 class="signature " id="set_i-instance_method">
1745
+ <h3 class="signature " id="set_scalar-instance_method">
2460
1746
 
2461
- - (<tt>Object</tt>) <strong>set_i</strong>(dim, index)
1747
+ - (<tt>Object</tt>) <strong>set_scalar</strong>(value)
2462
1748
 
2463
1749
 
2464
1750
 
@@ -2466,8 +1752,8 @@ always in its basic shape.</p>
2466
1752
 
2467
1753
  </h3><div class="docstring">
2468
1754
  <div class="discussion">
2469
- <hr style="height: 10px">
2470
- <hr style="height: 10px">
1755
+ <hr>
1756
+ <hr>
2471
1757
 
2472
1758
 
2473
1759
  </div>
@@ -2481,139 +1767,16 @@ always in its basic shape.</p>
2481
1767
  <pre class="lines">
2482
1768
 
2483
1769
 
2484
- 418
2485
- 419
2486
- 420
2487
- 421
2488
- 422
2489
- 423
2490
- 424
2491
- 425
2492
- 426
2493
- 427
2494
- 428
2495
- 429
2496
- 430
2497
- 431
2498
- 432
2499
- 433
2500
- 434
2501
- 435
2502
- 436
2503
- 437
2504
- 438
2505
- 439
2506
- 440
2507
- 441</pre>
1770
+ 269
1771
+ 270
1772
+ 271</pre>
2508
1773
  </td>
2509
1774
  <td>
2510
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 418</span>
2511
-
2512
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_i identifier id'>set_i</span><span class='lparen token'>(</span><span class='rubyid_dim identifier id'>dim</span><span class='comma token'>,</span> <span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2513
-
2514
- <span class='rubyid_index identifier id'>index</span> <span class='assign token'>=</span> <span class='rubyid_reshape identifier id'>reshape</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2515
-
2516
- <span class='rubyid_case case kw'>case</span> <span class='rubyid_dim identifier id'>dim</span>
2517
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>0</span>
2518
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set0 identifier id'>set0</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2519
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>1</span>
2520
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set1 identifier id'>set1</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2521
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>2</span>
2522
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set2 identifier id'>set2</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2523
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>3</span>
2524
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set3 identifier id'>set3</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2525
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>4</span>
2526
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set4 identifier id'>set4</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2527
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>5</span>
2528
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set5 identifier id'>set5</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2529
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>6</span>
2530
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set6 identifier id'>set6</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2531
- <span class='rubyid_else else kw'>else</span>
2532
- <span class='rubyid_raise identifier id'>raise</span> <span class='string val'>&quot;Maximum allowed dimension is 6. Please, use method set to set this index&quot;</span>
2533
- <span class='rubyid_end end kw'>end</span>
2534
-
2535
- <span class='rubyid_end end kw'>end</span>
2536
- </pre>
2537
- </td>
2538
- </tr>
2539
- </table>
2540
- </div>
2541
-
2542
- <div class="method_details ">
2543
- <h3 class="signature " id="set_i_fast-instance_method">
2544
-
2545
- - (<tt>Object</tt>) <strong>set_i_fast</strong>(dim, index)
2546
-
2547
-
2548
-
1775
+ <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 269</span>
2549
1776
 
2550
-
2551
- </h3><div class="docstring">
2552
- <div class="discussion">
2553
- <hr style="height: 10px">
2554
- <hr style="height: 10px">
2555
-
2556
-
2557
- </div>
2558
- </div>
2559
- <div class="tags">
2560
-
2561
-
2562
- </div><table class="source_code">
2563
- <tr>
2564
- <td>
2565
- <pre class="lines">
2566
-
2567
-
2568
- 447
2569
- 448
2570
- 449
2571
- 450
2572
- 451
2573
- 452
2574
- 453
2575
- 454
2576
- 455
2577
- 456
2578
- 457
2579
- 458
2580
- 459
2581
- 460
2582
- 461
2583
- 462
2584
- 463
2585
- 464
2586
- 465
2587
- 466
2588
- 467
2589
- 468</pre>
2590
- </td>
2591
- <td>
2592
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 447</span>
2593
-
2594
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_i_fast identifier id'>set_i_fast</span><span class='lparen token'>(</span><span class='rubyid_dim identifier id'>dim</span><span class='comma token'>,</span> <span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2595
-
2596
- <span class='rubyid_case case kw'>case</span> <span class='rubyid_dim identifier id'>dim</span>
2597
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>0</span>
2598
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set0 identifier id'>set0</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2599
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>1</span>
2600
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set1 identifier id'>set1</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2601
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>2</span>
2602
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set2 identifier id'>set2</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2603
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>3</span>
2604
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set3 identifier id'>set3</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2605
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>4</span>
2606
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set4 identifier id'>set4</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2607
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>5</span>
2608
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set5 identifier id'>set5</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2609
- <span class='rubyid_when when kw'>when</span> <span class='integer val'>6</span>
2610
- <span class='rubyid_@nc_index ivar id'>@nc_index</span><span class='dot token'>.</span><span class='rubyid_set6 identifier id'>set6</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='rparen token'>)</span>
2611
- <span class='rubyid_else else kw'>else</span>
2612
- <span class='rubyid_raise identifier id'>raise</span> <span class='string val'>&quot;Maximum allowed dimension is 6. Please, use method set to set this index&quot;</span>
2613
- <span class='rubyid_end end kw'>end</span>
2614
-
2615
- <span class='rubyid_end end kw'>end</span>
2616
- </pre>
1777
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_scalar'>set_scalar</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1778
+ <span class='ivar'>@mdarray</span><span class='period'>.</span><span class='id identifier rubyid_nc_array'>nc_array</span><span class='period'>.</span><span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1779
+ <span class='kw'>end</span></pre>
2617
1780
  </td>
2618
1781
  </tr>
2619
1782
  </table>
@@ -2630,10 +1793,10 @@ always in its basic shape.</p>
2630
1793
 
2631
1794
  </h3><div class="docstring">
2632
1795
  <div class="discussion">
2633
- <hr style="height: 10px">
1796
+ <hr>
2634
1797
 
2635
1798
  <p>Sets the starting position of the index</p>
2636
- <hr style="height: 10px">
1799
+ <hr>
2637
1800
 
2638
1801
 
2639
1802
  </div>
@@ -2662,92 +1825,17 @@ always in its basic shape.</p>
2662
1825
  <td>
2663
1826
  <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 79</span>
2664
1827
 
2665
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_start identifier id'>set_start</span><span class='lparen token'>(</span><span class='rubyid_start identifier id'>start</span><span class='rparen token'>)</span>
2666
-
2667
- <span class='rubyid_start identifier id'>start</span> <span class='assign token'>=</span> <span class='rubyid_reshape identifier id'>reshape</span><span class='lparen token'>(</span><span class='rubyid_start identifier id'>start</span><span class='rparen token'>)</span>
2668
- <span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_start identifier id'>start</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
2669
- <span class='rubyid_raise identifier id'>raise</span> <span class='string val'>&quot;Cannot set index starting position to an array section&quot;</span>
2670
- <span class='rubyid_else else kw'>else</span>
2671
- <span class='rubyid_@start ivar id'>@start</span> <span class='assign token'>=</span> <span class='rubyid_start identifier id'>start</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_reverse identifier id'>reverse</span>
2672
- <span class='rubyid_reset_counter identifier id'>reset_counter</span>
2673
- <span class='rubyid_end end kw'>end</span>
2674
-
2675
- <span class='rubyid_end end kw'>end</span>
2676
- </pre>
2677
- </td>
2678
- </tr>
2679
- </table>
2680
- </div>
2681
-
2682
- <div class="method_details ">
2683
- <h3 class="signature " id="walk_along_axes-instance_method">
2684
-
2685
- - (<tt>Object</tt>) <strong>walk_along_axes</strong>
2686
-
2687
-
2688
-
2689
-
2690
-
2691
- </h3><div class="docstring">
2692
- <div class="discussion">
2693
- <hr style="height: 10px">
2694
- <hr style="height: 10px">
2695
-
2696
-
2697
- </div>
2698
- </div>
2699
- <div class="tags">
2700
-
2701
-
2702
- </div><table class="source_code">
2703
- <tr>
2704
- <td>
2705
- <pre class="lines">
2706
-
1828
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_start'>set_start</span><span class='lparen'>(</span><span class='id identifier rubyid_start'>start</span><span class='rparen'>)</span>
2707
1829
 
2708
- 254
2709
- 255
2710
- 256
2711
- 257
2712
- 258
2713
- 259
2714
- 260
2715
- 261
2716
- 262
2717
- 263
2718
- 264
2719
- 265
2720
- 266
2721
- 267
2722
- 268
2723
- 269
2724
- 270
2725
- 271
2726
- 272</pre>
2727
- </td>
2728
- <td>
2729
- <pre class="code"><span class="info file"># File 'lib/mdarray/counter.rb', line 254</span>
2730
-
2731
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_walk_along_axes identifier id'>walk_along_axes</span>
2732
-
2733
- <span class='rubyid_axes identifier id'>axes</span> <span class='assign token'>=</span> <span class='rubyid_@axes ivar id'>@axes</span><span class='dot token'>.</span><span class='rubyid_dup identifier id'>dup</span><span class='dot token'>.</span><span class='rubyid_reverse identifier id'>reverse</span>
2734
-
2735
- <span class='rubyid_axes identifier id'>axes</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_axis identifier id'>axis</span><span class='bitor op'>|</span>
2736
-
2737
- <span class='rubyid_index identifier id'>index</span> <span class='assign token'>=</span> <span class='rubyid_@counter ivar id'>@counter</span><span class='dot token'>.</span><span class='rubyid_size identifier id'>size</span> <span class='minus op'>-</span> <span class='rubyid_axis identifier id'>axis</span> <span class='minus op'>-</span> <span class='integer val'>1</span>
2738
- <span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_@counter ivar id'>@counter</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span> <span class='lt op'>&lt;</span> <span class='rubyid_@shape ivar id'>@shape</span><span class='lbrack token'>[</span><span class='rubyid_axis identifier id'>axis</span><span class='rbrack token'>]</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rparen token'>)</span>
2739
- <span class='rubyid_@counter ivar id'>@counter</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_@counter ivar id'>@counter</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span> <span class='plus op'>+</span> <span class='integer val'>1</span>
2740
- <span class='rubyid_return return kw'>return</span> <span class='rubyid_@counter ivar id'>@counter</span><span class='comma token'>,</span> <span class='rubyid_axis identifier id'>axis</span>
2741
- <span class='rubyid_else else kw'>else</span>
2742
- <span class='rubyid_@counter ivar id'>@counter</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
2743
- <span class='rubyid_end end kw'>end</span>
2744
-
2745
- <span class='rubyid_end end kw'>end</span>
2746
-
2747
- <span class='rubyid_return return kw'>return</span> <span class='rubyid_nil nil kw'>nil</span>
1830
+ <span class='id identifier rubyid_start'>start</span> <span class='op'>=</span> <span class='id identifier rubyid_reshape'>reshape</span><span class='lparen'>(</span><span class='id identifier rubyid_start'>start</span><span class='rparen'>)</span>
1831
+ <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_start'>start</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1832
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot set index starting position to an array section</span><span class='tstring_end'>&quot;</span></span>
1833
+ <span class='kw'>else</span>
1834
+ <span class='ivar'>@start</span> <span class='op'>=</span> <span class='id identifier rubyid_start'>start</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</span>
1835
+ <span class='id identifier rubyid_reset_counter'>reset_counter</span>
1836
+ <span class='kw'>end</span>
2748
1837
 
2749
- <span class='rubyid_end end kw'>end</span>
2750
- </pre>
1838
+ <span class='kw'>end</span></pre>
2751
1839
  </td>
2752
1840
  </tr>
2753
1841
  </table>
@@ -2758,9 +1846,9 @@ always in its basic shape.</p>
2758
1846
  </div>
2759
1847
 
2760
1848
  <div id="footer">
2761
- Generated on Thu May 16 12:48:38 2013 by
1849
+ Generated on Tue Jul 14 18:08:59 2015 by
2762
1850
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2763
- 0.8.5.2 (ruby-1.9.3).
1851
+ 0.8.7.6 (ruby-1.9.3).
2764
1852
  </div>
2765
1853
 
2766
1854
  </body>