mdarray 0.4.3.pre-java → 0.5.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +82 -14
- data/Rakefile +8 -2
- data/doc/BinaryOperator.html +227 -0
- data/doc/BitwiseOperators.html +135 -0
- data/doc/BooleanFunctions.html +135 -0
- data/doc/BooleanMDArray.html +193 -0
- data/doc/ByteMDArray.html +271 -0
- data/doc/Colt.html +269 -0
- data/doc/ComparisonOperators.html +135 -0
- data/doc/Const.html +490 -0
- data/doc/Csv.html +589 -0
- data/doc/DDescriptive.html +4373 -0
- data/doc/DoubleMDArray.html +555 -0
- data/doc/DoubleStatList.html +256 -0
- data/doc/FastBinaryOperator.html +743 -0
- data/doc/FastBoolean.html +512 -0
- data/doc/FastUnaryOperator.html +583 -0
- data/doc/FloatMDArray.html +237 -0
- data/doc/FunctionCreation.html +520 -0
- data/doc/FunctionMap.html +813 -0
- data/doc/GenericFunctions.html +135 -0
- data/doc/IntMDArray.html +259 -0
- data/doc/LongMDArray.html +257 -0
- data/doc/MDArray.html +9639 -0
- data/doc/MDArray/Counter.html +2767 -0
- data/doc/MDArray/IteratorFast.html +872 -0
- data/doc/MDArray/IteratorFastBoolean.html +384 -0
- data/doc/MDArray/IteratorFastByte.html +373 -0
- data/doc/MDArray/IteratorFastChar.html +384 -0
- data/doc/MDArray/IteratorFastDouble.html +384 -0
- data/doc/MDArray/IteratorFastFloat.html +384 -0
- data/doc/MDArray/IteratorFastInt.html +384 -0
- data/doc/MDArray/IteratorFastLong.html +384 -0
- data/doc/MDArray/IteratorFastShort.html +384 -0
- data/doc/MDArrayTest.html +125 -0
- data/doc/NonNumericalMDArray.html +177 -0
- data/doc/NumericFunctions.html +297 -0
- data/doc/NumericalMDArray.html +278 -0
- data/doc/Operator.html +826 -0
- data/doc/Proc.html +1097 -0
- data/doc/RubyBinaryOperator.html +526 -0
- data/doc/RubyFunctions.html +232 -0
- data/doc/RubyMath.html +135 -0
- data/doc/RubyStats.html +135 -0
- data/doc/RubyUnaryOperator.html +510 -0
- data/doc/ShortMDArray.html +267 -0
- data/doc/StatList.html +1176 -0
- data/doc/StringMDArray.html +181 -0
- data/doc/StructureMDArray.html +181 -0
- data/doc/UnaryOperator.html +227 -0
- data/doc/UserFunction.html +297 -0
- data/doc/_index.html +467 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +338 -0
- data/doc/file.README.html +173 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +173 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +2524 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/colt/colt.rb +56 -0
- data/lib/colt/colt_mdarray.rb +95 -0
- data/lib/colt/double_descriptive.rb +636 -0
- data/lib/colt/probability.rb +12 -0
- data/lib/colt/stat_list.rb +192 -0
- data/lib/env.rb +5 -1
- data/lib/mdarray.rb +5 -0
- data/lib/mdarray/access.rb +2 -2
- data/lib/mdarray/creation.rb +34 -19
- data/lib/mdarray/csv.rb +61 -0
- data/lib/mdarray/fast_operators.rb +241 -0
- data/lib/mdarray/operators.rb +18 -0
- data/lib/mdarray/ruby_operators.rb +2 -18
- data/lib/mdarray/ruby_stats.rb +1 -1
- data/lib/mdarray/views.rb +8 -8
- data/target/helper.jar +0 -0
- data/test/colt/VALE3.csv +3437 -0
- data/test/colt/VALE3.xlsx +0 -0
- data/test/colt/VALE3_short-err.csv +20 -0
- data/test/colt/VALE3_short.csv +20 -0
- data/test/colt/VALE3_short.xlsx +0 -0
- data/test/colt/test_complete.rb +25 -0
- data/test/colt/test_stat_list.rb +128 -0
- data/test/colt/test_statistics.rb +114 -0
- data/test/complete.rb +25 -0
- data/test/env.rb +54 -30
- data/test/{arithmetic_casting.rb → mdarray/arithmetic_casting.rb} +0 -0
- data/test/{test_access.rb → mdarray/test_access.rb} +0 -0
- data/test/{test_boolean.rb → mdarray/test_boolean.rb} +0 -2
- data/test/{test_comparison.rb → mdarray/test_comparison.rb} +0 -0
- data/test/{test_complete.rb → mdarray/test_complete.rb} +3 -14
- data/test/{test_counter.rb → mdarray/test_counter.rb} +0 -0
- data/test/{test_creation.rb → mdarray/test_creation.rb} +0 -0
- data/test/{test_error.rb → mdarray/test_error.rb} +8 -5
- data/test/{test_operator.rb → mdarray/test_operator.rb} +6 -2
- data/test/{test_speed.rb → mdarray/test_performance.rb} +74 -39
- data/test/{test_printing.rb → mdarray/test_printing.rb} +0 -1
- data/test/{test_shape.rb → mdarray/test_shape.rb} +0 -0
- data/test/mdarray/test_statistics.rb +80 -0
- data/test/{test_trigonometry.rb → mdarray/test_trigonometry.rb} +0 -0
- data/test/{test_views.rb → mdarray/test_views.rb} +0 -0
- data/vendor/parallelcolt-0.10.0.jar +0 -0
- data/version.rb +1 -1
- metadata +122 -39
- data/test/test_lazy.rb +0 -52
- data/test/test_statistics.rb +0 -38
@@ -0,0 +1,256 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: DoubleStatList
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.5.2
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (D)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">DoubleStatList</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: DoubleStatList
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="StatList.html" title="StatList (class)">StatList</a></span></span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next"><span class='object_link'><a href="StatList.html" title="StatList (class)">StatList</a></span></li>
|
82
|
+
|
83
|
+
<li class="next">DoubleStatList</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dt class="r2">Includes:</dt>
|
96
|
+
<dd class="r2"><span class='object_link'><a href="DDescriptive.html" title="DDescriptive (module)">DDescriptive</a></span></dd>
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<dt class="r1 last">Defined in:</dt>
|
103
|
+
<dd class="r1 last">lib/colt/stat_list.rb</dd>
|
104
|
+
|
105
|
+
</dl>
|
106
|
+
<div class="clear"></div>
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<h2>Instance Attribute Summary</h2>
|
115
|
+
|
116
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="StatList.html" title="StatList (class)">StatList</a></span></h3>
|
117
|
+
<p class="inherited"><span class='object_link'><a href="StatList.html#array_list-instance_method" title="StatList#array_list (method)">#array_list</a></span></p>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (DoubleStatList) <strong>initialize</strong>(value = nil) </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
<span class="note title constructor">constructor</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'>
|
148
|
+
<p>????????????????????????????.</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
</ul>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="DDescriptive.html" title="DDescriptive (module)">DDescriptive</a></span></h3>
|
167
|
+
<p class="inherited"><span class='object_link'><a href="DDescriptive.html#auto_correlation-instance_method" title="DDescriptive#auto_correlation (method)">#auto_correlation</a></span>, <span class='object_link'><a href="DDescriptive.html#correlation-instance_method" title="DDescriptive#correlation (method)">#correlation</a></span>, <span class='object_link'><a href="DDescriptive.html#covariance-instance_method" title="DDescriptive#covariance (method)">#covariance</a></span>, <span class='object_link'><a href="DDescriptive.html#durbin_watson-instance_method" title="DDescriptive#durbin_watson (method)">#durbin_watson</a></span>, <span class='object_link'><a href="DDescriptive.html#frequencies-instance_method" title="DDescriptive#frequencies (method)">#frequencies</a></span>, <span class='object_link'><a href="DDescriptive.html#geometric_mean-instance_method" title="DDescriptive#geometric_mean (method)">#geometric_mean</a></span>, <span class='object_link'><a href="DDescriptive.html#harmonic_mean-instance_method" title="DDescriptive#harmonic_mean (method)">#harmonic_mean</a></span>, <span class='object_link'><a href="DDescriptive.html#kurtosis-instance_method" title="DDescriptive#kurtosis (method)">#kurtosis</a></span>, <span class='object_link'><a href="DDescriptive.html#lag1-instance_method" title="DDescriptive#lag1 (method)">#lag1</a></span>, <span class='object_link'><a href="DDescriptive.html#list_size-instance_method" title="DDescriptive#list_size (method)">#list_size</a></span>, <span class='object_link'><a href="DDescriptive.html#max-instance_method" title="DDescriptive#max (method)">#max</a></span>, <span class='object_link'><a href="DDescriptive.html#mean-instance_method" title="DDescriptive#mean (method)">#mean</a></span>, <span class='object_link'><a href="DDescriptive.html#mean_deviation-instance_method" title="DDescriptive#mean_deviation (method)">#mean_deviation</a></span>, <span class='object_link'><a href="DDescriptive.html#median-instance_method" title="DDescriptive#median (method)">#median</a></span>, <span class='object_link'><a href="DDescriptive.html#min-instance_method" title="DDescriptive#min (method)">#min</a></span>, <span class='object_link'><a href="DDescriptive.html#moment-instance_method" title="DDescriptive#moment (method)">#moment</a></span>, <span class='object_link'><a href="DDescriptive.html#moment3-instance_method" title="DDescriptive#moment3 (method)">#moment3</a></span>, <span class='object_link'><a href="DDescriptive.html#moment4-instance_method" title="DDescriptive#moment4 (method)">#moment4</a></span>, <span class='object_link'><a href="DDescriptive.html#pooled_mean-instance_method" title="DDescriptive#pooled_mean (method)">#pooled_mean</a></span>, <span class='object_link'><a href="DDescriptive.html#pooled_variance-instance_method" title="DDescriptive#pooled_variance (method)">#pooled_variance</a></span>, <span class='object_link'><a href="DDescriptive.html#product-instance_method" title="DDescriptive#product (method)">#product</a></span>, <span class='object_link'><a href="DDescriptive.html#quantile-instance_method" title="DDescriptive#quantile (method)">#quantile</a></span>, <span class='object_link'><a href="DDescriptive.html#quantile_inverse-instance_method" title="DDescriptive#quantile_inverse (method)">#quantile_inverse</a></span>, <span class='object_link'><a href="DDescriptive.html#quantiles-instance_method" title="DDescriptive#quantiles (method)">#quantiles</a></span>, <span class='object_link'><a href="DDescriptive.html#rank_interpolated-instance_method" title="DDescriptive#rank_interpolated (method)">#rank_interpolated</a></span>, <span class='object_link'><a href="DDescriptive.html#reset_statistics-instance_method" title="DDescriptive#reset_statistics (method)">#reset_statistics</a></span>, <span class='object_link'><a href="DDescriptive.html#rms-instance_method" title="DDescriptive#rms (method)">#rms</a></span>, <span class='object_link'><a href="DDescriptive.html#sample_covariance-instance_method" title="DDescriptive#sample_covariance (method)">#sample_covariance</a></span>, <span class='object_link'><a href="DDescriptive.html#sample_kurtosis-instance_method" title="DDescriptive#sample_kurtosis (method)">#sample_kurtosis</a></span>, <span class='object_link'><a href="DDescriptive.html#sample_kurtosis_standard_error-instance_method" title="DDescriptive#sample_kurtosis_standard_error (method)">#sample_kurtosis_standard_error</a></span>, <span class='object_link'><a href="DDescriptive.html#sample_skew-instance_method" title="DDescriptive#sample_skew (method)">#sample_skew</a></span>, <span class='object_link'><a href="DDescriptive.html#sample_skew_standard_error-instance_method" title="DDescriptive#sample_skew_standard_error (method)">#sample_skew_standard_error</a></span>, <span class='object_link'><a href="DDescriptive.html#sample_standard_deviation-instance_method" title="DDescriptive#sample_standard_deviation (method)">#sample_standard_deviation</a></span>, <span class='object_link'><a href="DDescriptive.html#sample_variance-instance_method" title="DDescriptive#sample_variance (method)">#sample_variance</a></span>, <span class='object_link'><a href="DDescriptive.html#sample_weighted_variance-instance_method" title="DDescriptive#sample_weighted_variance (method)">#sample_weighted_variance</a></span>, <span class='object_link'><a href="DDescriptive.html#skew-instance_method" title="DDescriptive#skew (method)">#skew</a></span>, <span class='object_link'><a href="DDescriptive.html#sort-instance_method" title="DDescriptive#sort (method)">#sort</a></span>, <span class='object_link'><a href="DDescriptive.html#sorted_data-instance_method" title="DDescriptive#sorted_data (method)">#sorted_data</a></span>, <span class='object_link'><a href="DDescriptive.html#split-instance_method" title="DDescriptive#split (method)">#split</a></span>, <span class='object_link'><a href="DDescriptive.html#standard_deviation-instance_method" title="DDescriptive#standard_deviation (method)">#standard_deviation</a></span>, <span class='object_link'><a href="DDescriptive.html#standard_error-instance_method" title="DDescriptive#standard_error (method)">#standard_error</a></span>, <span class='object_link'><a href="DDescriptive.html#standardize%21-instance_method" title="DDescriptive#standardize! (method)">#standardize!</a></span>, <span class='object_link'><a href="DDescriptive.html#sum-instance_method" title="DDescriptive#sum (method)">#sum</a></span>, <span class='object_link'><a href="DDescriptive.html#sum_of_inversions-instance_method" title="DDescriptive#sum_of_inversions (method)">#sum_of_inversions</a></span>, <span class='object_link'><a href="DDescriptive.html#sum_of_logarithms-instance_method" title="DDescriptive#sum_of_logarithms (method)">#sum_of_logarithms</a></span>, <span class='object_link'><a href="DDescriptive.html#sum_of_power_deviations-instance_method" title="DDescriptive#sum_of_power_deviations (method)">#sum_of_power_deviations</a></span>, <span class='object_link'><a href="DDescriptive.html#sum_of_powers-instance_method" title="DDescriptive#sum_of_powers (method)">#sum_of_powers</a></span>, <span class='object_link'><a href="DDescriptive.html#sum_of_squared_deviations-instance_method" title="DDescriptive#sum_of_squared_deviations (method)">#sum_of_squared_deviations</a></span>, <span class='object_link'><a href="DDescriptive.html#sum_of_squares-instance_method" title="DDescriptive#sum_of_squares (method)">#sum_of_squares</a></span>, <span class='object_link'><a href="DDescriptive.html#trimmed_mean-instance_method" title="DDescriptive#trimmed_mean (method)">#trimmed_mean</a></span>, <span class='object_link'><a href="DDescriptive.html#variance-instance_method" title="DDescriptive#variance (method)">#variance</a></span>, <span class='object_link'><a href="DDescriptive.html#weighted_mean-instance_method" title="DDescriptive#weighted_mean (method)">#weighted_mean</a></span>, <span class='object_link'><a href="DDescriptive.html#weighted_rms-instance_method" title="DDescriptive#weighted_rms (method)">#weighted_rms</a></span>, <span class='object_link'><a href="DDescriptive.html#weighted_sums-instance_method" title="DDescriptive#weighted_sums (method)">#weighted_sums</a></span>, <span class='object_link'><a href="DDescriptive.html#winsorized_mean-instance_method" title="DDescriptive#winsorized_mean (method)">#winsorized_mean</a></span></p>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="StatList.html" title="StatList (class)">StatList</a></span></h3>
|
178
|
+
<p class="inherited"><span class='object_link'><a href="StatList.html#add-instance_method" title="StatList#add (method)">#add</a></span>, <span class='object_link'><a href="StatList.html#before_insert-instance_method" title="StatList#before_insert (method)">#before_insert</a></span>, <span class='object_link'><a href="StatList.html#binary_search-instance_method" title="StatList#binary_search (method)">#binary_search</a></span>, <span class='object_link'><a href="StatList.html#copy-instance_method" title="StatList#copy (method)">#copy</a></span>, <span class='object_link'><a href="StatList.html#elements-instance_method" title="StatList#elements (method)">#elements</a></span>, <span class='object_link'><a href="StatList.html#get-instance_method" title="StatList#get (method)">#get</a></span>, <span class='object_link'><a href="StatList.html#index_of-instance_method" title="StatList#index_of (method)">#index_of</a></span>, <span class='object_link'><a href="StatList.html#last_index_of-instance_method" title="StatList#last_index_of (method)">#last_index_of</a></span>, <span class='object_link'><a href="StatList.html#print-instance_method" title="StatList#print (method)">#print</a></span>, <span class='object_link'><a href="StatList.html#reverse-instance_method" title="StatList#reverse (method)">#reverse</a></span>, <span class='object_link'><a href="StatList.html#set-instance_method" title="StatList#set (method)">#set</a></span>, <span class='object_link'><a href="StatList.html#shuffle-instance_method" title="StatList#shuffle (method)">#shuffle</a></span>, <span class='object_link'><a href="StatList.html#to_s-instance_method" title="StatList#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="StatList.html#trim_to_size-instance_method" title="StatList#trim_to_size (method)">#trim_to_size</a></span></p>
|
179
|
+
<div id="constructor_details" class="method_details_list">
|
180
|
+
<h2>Constructor Details</h2>
|
181
|
+
|
182
|
+
<div class="method_details first">
|
183
|
+
<h3 class="signature first" id="initialize-instance_method">
|
184
|
+
|
185
|
+
- (<tt><span class='object_link'><a href="" title="DoubleStatList (class)">DoubleStatList</a></span></tt>) <strong>initialize</strong>(value = nil)
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</h3><div class="docstring">
|
192
|
+
<div class="discussion">
|
193
|
+
<hr style="height: 10px">
|
194
|
+
<hr style="height: 10px">
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<div class="tags">
|
200
|
+
|
201
|
+
|
202
|
+
</div><table class="source_code">
|
203
|
+
<tr>
|
204
|
+
<td>
|
205
|
+
<pre class="lines">
|
206
|
+
|
207
|
+
|
208
|
+
178
|
209
|
+
179
|
210
|
+
180
|
211
|
+
181
|
212
|
+
182
|
213
|
+
183
|
214
|
+
184
|
215
|
+
185
|
216
|
+
186
|
217
|
+
187
|
218
|
+
188
|
219
|
+
189
|
220
|
+
190</pre>
|
221
|
+
</td>
|
222
|
+
<td>
|
223
|
+
<pre class="code"><span class="info file"># File 'lib/colt/stat_list.rb', line 178</span>
|
224
|
+
|
225
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
226
|
+
|
227
|
+
<span class='rubyid_super super kw'>super</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
|
228
|
+
|
229
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span> <span class='eq op'>==</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
230
|
+
<span class='rubyid_@array_list ivar id'>@array_list</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
|
231
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</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>
|
232
|
+
<span class='rubyid_@array_list ivar id'>@array_list</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
|
233
|
+
<span class='rubyid_else else kw'>else</span> <span class='comment val'># Receiving a DoubleArrayList</span>
|
234
|
+
<span class='rubyid_@array_list ivar id'>@array_list</span> <span class='assign token'>=</span> <span class='rubyid_value identifier id'>value</span>
|
235
|
+
<span class='rubyid_end end kw'>end</span>
|
236
|
+
|
237
|
+
<span class='rubyid_end end kw'>end</span>
|
238
|
+
</pre>
|
239
|
+
</td>
|
240
|
+
</tr>
|
241
|
+
</table>
|
242
|
+
</div>
|
243
|
+
|
244
|
+
</div>
|
245
|
+
|
246
|
+
|
247
|
+
</div>
|
248
|
+
|
249
|
+
<div id="footer">
|
250
|
+
Generated on Thu May 16 12:48:37 2013 by
|
251
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
252
|
+
0.8.5.2 (ruby-1.9.3).
|
253
|
+
</div>
|
254
|
+
|
255
|
+
</body>
|
256
|
+
</html>
|
@@ -0,0 +1,743 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: FastBinaryOperator
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.5.2
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (F)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">FastBinaryOperator</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: FastBinaryOperator
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="BinaryOperator.html" title="BinaryOperator (class)">BinaryOperator</a></span></span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next"><span class='object_link'><a href="Operator.html" title="Operator (class)">Operator</a></span></li>
|
82
|
+
|
83
|
+
<li class="next"><span class='object_link'><a href="BinaryOperator.html" title="BinaryOperator (class)">BinaryOperator</a></span></li>
|
84
|
+
|
85
|
+
<li class="next">FastBinaryOperator</li>
|
86
|
+
|
87
|
+
</ul>
|
88
|
+
<a href="#" class="inheritanceTree">show all</a>
|
89
|
+
|
90
|
+
</dd>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dt class="r2 last">Defined in:</dt>
|
101
|
+
<dd class="r2 last">lib/mdarray/fast_operators.rb</dd>
|
102
|
+
|
103
|
+
</dl>
|
104
|
+
<div class="clear"></div>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<h2>Instance Attribute Summary</h2>
|
113
|
+
|
114
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Operator.html" title="Operator (class)">Operator</a></span></h3>
|
115
|
+
<p class="inherited"><span class='object_link'><a href="Operator.html#arity-instance_method" title="Operator#arity (method)">#arity</a></span>, <span class='object_link'><a href="Operator.html#exec_type-instance_method" title="Operator#exec_type (method)">#exec_type</a></span>, <span class='object_link'><a href="Operator.html#force_type-instance_method" title="Operator#force_type (method)">#force_type</a></span>, <span class='object_link'><a href="Operator.html#name-instance_method" title="Operator#name (method)">#name</a></span>, <span class='object_link'><a href="Operator.html#post_condition-instance_method" title="Operator#post_condition (method)">#post_condition</a></span>, <span class='object_link'><a href="Operator.html#pre_condition-instance_method" title="Operator#pre_condition (method)">#pre_condition</a></span>, <span class='object_link'><a href="Operator.html#type-instance_method" title="Operator#type (method)">#type</a></span></p>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<h2>
|
120
|
+
Instance Method Summary
|
121
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
122
|
+
</h2>
|
123
|
+
|
124
|
+
<ul class="summary">
|
125
|
+
|
126
|
+
<li class="public ">
|
127
|
+
<span class="summary_signature">
|
128
|
+
|
129
|
+
<a href="#complex_reduce-instance_method" title="#complex_reduce (instance method)">- (Object) <strong>complex_reduce</strong>(*args) </a>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
</span>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<span class="summary_desc"><div class='inline'>
|
144
|
+
<p>?????????????????????????????.</p>
|
145
|
+
</div></span>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
<li class="public ">
|
151
|
+
<span class="summary_signature">
|
152
|
+
|
153
|
+
<a href="#default-instance_method" title="#default (instance method)">- (Object) <strong>default</strong>(*args) </a>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</span>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'>
|
168
|
+
<p>?????????????????????????????.</p>
|
169
|
+
</div></span>
|
170
|
+
|
171
|
+
</li>
|
172
|
+
|
173
|
+
|
174
|
+
<li class="public ">
|
175
|
+
<span class="summary_signature">
|
176
|
+
|
177
|
+
<a href="#fill-instance_method" title="#fill (instance method)">- (Object) <strong>fill</strong>(*args) </a>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
</span>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
<span class="summary_desc"><div class='inline'>
|
192
|
+
<p>?????????????????????????????.</p>
|
193
|
+
</div></span>
|
194
|
+
|
195
|
+
</li>
|
196
|
+
|
197
|
+
|
198
|
+
<li class="public ">
|
199
|
+
<span class="summary_signature">
|
200
|
+
|
201
|
+
<a href="#get_args-instance_method" title="#get_args (instance method)">- (Object) <strong>get_args</strong>(*args) {|@op1.nc_array, arg2, @op1.shape, *args| ... }</a>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
</span>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<span class="summary_desc"><div class='inline'>
|
216
|
+
<p>?????????????????????????????.</p>
|
217
|
+
</div></span>
|
218
|
+
|
219
|
+
</li>
|
220
|
+
|
221
|
+
|
222
|
+
<li class="public ">
|
223
|
+
<span class="summary_signature">
|
224
|
+
|
225
|
+
<a href="#in_place-instance_method" title="#in_place (instance method)">- (Object) <strong>in_place</strong>(*args) </a>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
</span>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
<span class="summary_desc"><div class='inline'>
|
240
|
+
<p>?????????????????????????????.</p>
|
241
|
+
</div></span>
|
242
|
+
|
243
|
+
</li>
|
244
|
+
|
245
|
+
|
246
|
+
<li class="public ">
|
247
|
+
<span class="summary_signature">
|
248
|
+
|
249
|
+
<a href="#reduce-instance_method" title="#reduce (instance method)">- (Object) <strong>reduce</strong>(*args) </a>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
</span>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
<span class="summary_desc"><div class='inline'>
|
264
|
+
<p>?????????????????????????????.</p>
|
265
|
+
</div></span>
|
266
|
+
|
267
|
+
</li>
|
268
|
+
|
269
|
+
|
270
|
+
</ul>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="BinaryOperator.html" title="BinaryOperator (class)">BinaryOperator</a></span></h3>
|
283
|
+
<p class="inherited"><span class='object_link'><a href="BinaryOperator.html#initialize-instance_method" title="BinaryOperator#initialize (method)">#initialize</a></span></p>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Operator.html" title="Operator (class)">Operator</a></span></h3>
|
294
|
+
<p class="inherited"><span class='object_link'><a href="Operator.html#exec-instance_method" title="Operator#exec (method)">#exec</a></span>, <span class='object_link'><a href="Operator.html#initialize-instance_method" title="Operator#initialize (method)">#initialize</a></span></p>
|
295
|
+
<div id="constructor_details" class="method_details_list">
|
296
|
+
<h2>Constructor Details</h2>
|
297
|
+
|
298
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="BinaryOperator.html#initialize-instance_method" title="BinaryOperator#initialize (method)">BinaryOperator</a></span></p>
|
299
|
+
|
300
|
+
</div>
|
301
|
+
|
302
|
+
|
303
|
+
<div id="instance_method_details" class="method_details_list">
|
304
|
+
<h2>Instance Method Details</h2>
|
305
|
+
|
306
|
+
|
307
|
+
<div class="method_details first">
|
308
|
+
<h3 class="signature first" id="complex_reduce-instance_method">
|
309
|
+
|
310
|
+
- (<tt>Object</tt>) <strong>complex_reduce</strong>(*args)
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
</h3><div class="docstring">
|
317
|
+
<div class="discussion">
|
318
|
+
<hr style="height: 10px">
|
319
|
+
<hr style="height: 10px">
|
320
|
+
|
321
|
+
|
322
|
+
</div>
|
323
|
+
</div>
|
324
|
+
<div class="tags">
|
325
|
+
|
326
|
+
|
327
|
+
</div><table class="source_code">
|
328
|
+
<tr>
|
329
|
+
<td>
|
330
|
+
<pre class="lines">
|
331
|
+
|
332
|
+
|
333
|
+
143
|
334
|
+
144
|
335
|
+
145
|
336
|
+
146
|
337
|
+
147
|
338
|
+
148
|
339
|
+
149
|
340
|
+
150
|
341
|
+
151
|
342
|
+
152
|
343
|
+
153
|
344
|
+
154
|
345
|
+
155</pre>
|
346
|
+
</td>
|
347
|
+
<td>
|
348
|
+
<pre class="code"><span class="info file"># File 'lib/mdarray/fast_operators.rb', line 143</span>
|
349
|
+
|
350
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_complex_reduce identifier id'>complex_reduce</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
351
|
+
|
352
|
+
<span class='rubyid_calc identifier id'>calc</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
353
|
+
|
354
|
+
<span class='rubyid_get_args identifier id'>get_args</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_shape identifier id'>shape</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_other_args identifier id'>other_args</span><span class='bitor op'>|</span>
|
355
|
+
<span class='rubyid_helper identifier id'>helper</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_RbMdarrayLoopsBinops constant id'>RbMdarrayLoopsBinops</span><span class='colon2 op'>::</span><span class='rubyid_ComplexReduceBinaryOperator constant id'>ComplexReduceBinaryOperator</span>
|
356
|
+
<span class='rubyid_calc identifier id'>calc</span> <span class='assign token'>=</span> <span class='rubyid_@pre_condition_result ivar id'>@pre_condition_result</span>
|
357
|
+
<span class='rubyid_calc identifier id'>calc</span> <span class='assign token'>=</span> <span class='rubyid_helper identifier id'>helper</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>"apply"</span><span class='comma token'>,</span> <span class='rubyid_calc identifier id'>calc</span><span class='comma token'>,</span> <span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_@do_func ivar id'>@do_func</span><span class='rparen token'>)</span>
|
358
|
+
<span class='rubyid_end end kw'>end</span>
|
359
|
+
|
360
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_calc identifier id'>calc</span>
|
361
|
+
|
362
|
+
<span class='rubyid_end end kw'>end</span>
|
363
|
+
</pre>
|
364
|
+
</td>
|
365
|
+
</tr>
|
366
|
+
</table>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
<div class="method_details ">
|
370
|
+
<h3 class="signature " id="default-instance_method">
|
371
|
+
|
372
|
+
- (<tt>Object</tt>) <strong>default</strong>(*args)
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
</h3><div class="docstring">
|
379
|
+
<div class="discussion">
|
380
|
+
<hr style="height: 10px">
|
381
|
+
<hr style="height: 10px">
|
382
|
+
|
383
|
+
|
384
|
+
</div>
|
385
|
+
</div>
|
386
|
+
<div class="tags">
|
387
|
+
|
388
|
+
|
389
|
+
</div><table class="source_code">
|
390
|
+
<tr>
|
391
|
+
<td>
|
392
|
+
<pre class="lines">
|
393
|
+
|
394
|
+
|
395
|
+
75
|
396
|
+
76
|
397
|
+
77
|
398
|
+
78
|
399
|
+
79
|
400
|
+
80
|
401
|
+
81
|
402
|
+
82
|
403
|
+
83
|
404
|
+
84
|
405
|
+
85
|
406
|
+
86
|
407
|
+
87
|
408
|
+
88
|
409
|
+
89
|
410
|
+
90
|
411
|
+
91
|
412
|
+
92
|
413
|
+
93</pre>
|
414
|
+
</td>
|
415
|
+
<td>
|
416
|
+
<pre class="code"><span class="info file"># File 'lib/mdarray/fast_operators.rb', line 75</span>
|
417
|
+
|
418
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_default identifier id'>default</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
419
|
+
|
420
|
+
<span class='rubyid_calc identifier id'>calc</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
421
|
+
<span class='rubyid_get_args identifier id'>get_args</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_shape identifier id'>shape</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_other_args identifier id'>other_args</span><span class='bitor op'>|</span>
|
422
|
+
<span class='rubyid_calc identifier id'>calc</span> <span class='assign token'>=</span> <span class='rubyid_MDArray constant id'>MDArray</span><span class='dot token'>.</span><span class='rubyid_build identifier id'>build</span><span class='lparen token'>(</span><span class='rubyid_@type ivar id'>@type</span><span class='comma token'>,</span> <span class='rubyid_shape identifier id'>shape</span><span class='rparen token'>)</span>
|
423
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_@coerced ivar id'>@coerced</span><span class='rparen token'>)</span>
|
424
|
+
<span class='rubyid_helper identifier id'>helper</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_RbMdarrayLoopsBinops constant id'>RbMdarrayLoopsBinops</span><span class='colon2 op'>::</span><span class='rubyid_CoerceBinaryOperator constant id'>CoerceBinaryOperator</span>
|
425
|
+
<span class='rubyid_helper identifier id'>helper</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>"apply"</span><span class='comma token'>,</span> <span class='rubyid_calc identifier id'>calc</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='comma token'>,</span> <span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_@do_func ivar id'>@do_func</span><span class='rparen token'>)</span>
|
426
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='lparen token'>(</span><span class='rubyid_@op1 ivar id'>@op1</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_NumericalMDArray constant id'>NumericalMDArray</span><span class='rparen token'>)</span>
|
427
|
+
<span class='rubyid_helper identifier id'>helper</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_RbMdarrayLoopsBinops constant id'>RbMdarrayLoopsBinops</span><span class='colon2 op'>::</span><span class='rubyid_DefaultBinaryOperator constant id'>DefaultBinaryOperator</span>
|
428
|
+
<span class='rubyid_helper identifier id'>helper</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>"apply"</span><span class='comma token'>,</span> <span class='rubyid_calc identifier id'>calc</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='comma token'>,</span> <span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_@do_func ivar id'>@do_func</span><span class='rparen token'>)</span>
|
429
|
+
<span class='rubyid_else else kw'>else</span>
|
430
|
+
<span class='rubyid_helper identifier id'>helper</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_RbMdarrayLoopsBinops constant id'>RbMdarrayLoopsBinops</span><span class='colon2 op'>::</span><span class='rubyid_DefaultBinaryOperator constant id'>DefaultBinaryOperator</span>
|
431
|
+
<span class='rubyid_helper identifier id'>helper</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='dstring node'>"apply#{@op1.class}"</span><span class='comma token'>,</span> <span class='rubyid_calc identifier id'>calc</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='comma token'>,</span> <span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_@do_func ivar id'>@do_func</span><span class='rparen token'>)</span>
|
432
|
+
<span class='rubyid_end end kw'>end</span>
|
433
|
+
<span class='rubyid_end end kw'>end</span>
|
434
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_calc identifier id'>calc</span>
|
435
|
+
|
436
|
+
<span class='rubyid_end end kw'>end</span>
|
437
|
+
</pre>
|
438
|
+
</td>
|
439
|
+
</tr>
|
440
|
+
</table>
|
441
|
+
</div>
|
442
|
+
|
443
|
+
<div class="method_details ">
|
444
|
+
<h3 class="signature " id="fill-instance_method">
|
445
|
+
|
446
|
+
- (<tt>Object</tt>) <strong>fill</strong>(*args)
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
</h3><div class="docstring">
|
453
|
+
<div class="discussion">
|
454
|
+
<hr style="height: 10px">
|
455
|
+
<hr style="height: 10px">
|
456
|
+
|
457
|
+
|
458
|
+
</div>
|
459
|
+
</div>
|
460
|
+
<div class="tags">
|
461
|
+
|
462
|
+
|
463
|
+
</div><table class="source_code">
|
464
|
+
<tr>
|
465
|
+
<td>
|
466
|
+
<pre class="lines">
|
467
|
+
|
468
|
+
|
469
|
+
99
|
470
|
+
100
|
471
|
+
101
|
472
|
+
102
|
473
|
+
103
|
474
|
+
104
|
475
|
+
105
|
476
|
+
106</pre>
|
477
|
+
</td>
|
478
|
+
<td>
|
479
|
+
<pre class="code"><span class="info file"># File 'lib/mdarray/fast_operators.rb', line 99</span>
|
480
|
+
|
481
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_fill identifier id'>fill</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
482
|
+
|
483
|
+
<span class='rubyid_get_args identifier id'>get_args</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_shape identifier id'>shape</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_other_args identifier id'>other_args</span><span class='bitor op'>|</span>
|
484
|
+
<span class='rubyid_helper identifier id'>helper</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_RbMdarrayLoopsBinops constant id'>RbMdarrayLoopsBinops</span><span class='colon2 op'>::</span><span class='rubyid_FillBinaryOperator constant id'>FillBinaryOperator</span>
|
485
|
+
<span class='rubyid_helper identifier id'>helper</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>"apply"</span><span class='comma token'>,</span> <span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='rparen token'>)</span>
|
486
|
+
<span class='rubyid_end end kw'>end</span>
|
487
|
+
|
488
|
+
<span class='rubyid_end end kw'>end</span>
|
489
|
+
</pre>
|
490
|
+
</td>
|
491
|
+
</tr>
|
492
|
+
</table>
|
493
|
+
</div>
|
494
|
+
|
495
|
+
<div class="method_details ">
|
496
|
+
<h3 class="signature " id="get_args-instance_method">
|
497
|
+
|
498
|
+
- (<tt>Object</tt>) <strong>get_args</strong>(*args) {|@op1.nc_array, arg2, @op1.shape, *args| ... }
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
</h3><div class="docstring">
|
505
|
+
<div class="discussion">
|
506
|
+
<hr style="height: 10px">
|
507
|
+
<hr style="height: 10px">
|
508
|
+
|
509
|
+
|
510
|
+
</div>
|
511
|
+
</div>
|
512
|
+
<div class="tags">
|
513
|
+
|
514
|
+
<p class="tag_title">Yields:</p>
|
515
|
+
<ul class="yield">
|
516
|
+
|
517
|
+
<li>
|
518
|
+
|
519
|
+
|
520
|
+
<span class='type'>(<tt>@op1.nc_array</tt>, <tt>arg2</tt>, <tt>@op1.shape</tt>, <tt>*args</tt>)</span>
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
</li>
|
525
|
+
|
526
|
+
</ul>
|
527
|
+
|
528
|
+
</div><table class="source_code">
|
529
|
+
<tr>
|
530
|
+
<td>
|
531
|
+
<pre class="lines">
|
532
|
+
|
533
|
+
|
534
|
+
33
|
535
|
+
34
|
536
|
+
35
|
537
|
+
36
|
538
|
+
37
|
539
|
+
38
|
540
|
+
39
|
541
|
+
40
|
542
|
+
41
|
543
|
+
42
|
544
|
+
43
|
545
|
+
44
|
546
|
+
45
|
547
|
+
46
|
548
|
+
47
|
549
|
+
48
|
550
|
+
49
|
551
|
+
50
|
552
|
+
51
|
553
|
+
52
|
554
|
+
53
|
555
|
+
54
|
556
|
+
55
|
557
|
+
56
|
558
|
+
57
|
559
|
+
58
|
560
|
+
59
|
561
|
+
60
|
562
|
+
61
|
563
|
+
62
|
564
|
+
63
|
565
|
+
64
|
566
|
+
65
|
567
|
+
66
|
568
|
+
67
|
569
|
+
68
|
570
|
+
69</pre>
|
571
|
+
</td>
|
572
|
+
<td>
|
573
|
+
<pre class="code"><span class="info file"># File 'lib/mdarray/fast_operators.rb', line 33</span>
|
574
|
+
|
575
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_get_args identifier id'>get_args</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
576
|
+
|
577
|
+
<span class='rubyid_parse_args identifier id'>parse_args</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
578
|
+
|
579
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_@op1 ivar id'>@op1</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_NumericalMDArray constant id'>NumericalMDArray</span><span class='rparen token'>)</span>
|
580
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_@op2 ivar id'>@op2</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Numeric constant id'>Numeric</span><span class='rparen token'>)</span>
|
581
|
+
<span class='rubyid_arg2 identifier id'>arg2</span> <span class='assign token'>=</span> <span class='rubyid_@op2 ivar id'>@op2</span>
|
582
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='lparen token'>(</span><span class='rubyid_@op2 ivar id'>@op2</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_NumericalMDArray constant id'>NumericalMDArray</span><span class='rparen token'>)</span>
|
583
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='notop op'>!</span><span class='rubyid_@op1 ivar id'>@op1</span><span class='dot token'>.</span><span class='rubyid_compatible identifier id'>compatible</span><span class='lparen token'>(</span><span class='rubyid_@op2 ivar id'>@op2</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
584
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='string val'>"Invalid operation - arrays are incompatible"</span>
|
585
|
+
<span class='rubyid_end end kw'>end</span>
|
586
|
+
<span class='rubyid_arg2 identifier id'>arg2</span> <span class='assign token'>=</span> <span class='rubyid_@op2 ivar id'>@op2</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span>
|
587
|
+
<span class='rubyid_else else kw'>else</span> <span class='comment val'># Operation with another user defined type</span>
|
588
|
+
<span class='rubyid_false false kw'>false</span>
|
589
|
+
<span class='comment val'># *TODO: make it more general using coerce if other_val type is not recognized</span>
|
590
|
+
<span class='comment val'># if (arg is not recognized)</span>
|
591
|
+
<span class='comment val'># self_equiv, arg_equiv = arg.coerce(self)</span>
|
592
|
+
<span class='comment val'># self_equiv * arg_equiv</span>
|
593
|
+
<span class='comment val'># end</span>
|
594
|
+
<span class='rubyid_end end kw'>end</span>
|
595
|
+
|
596
|
+
<span class='rubyid_else else kw'>else</span> <span class='comment val'># NonNumericalMDArray</span>
|
597
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='notop op'>!</span><span class='rubyid_@op1 ivar id'>@op1</span><span class='dot token'>.</span><span class='rubyid_compatible identifier id'>compatible</span><span class='lparen token'>(</span><span class='rubyid_@op2 ivar id'>@op2</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
598
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='string val'>"Invalid operation - arrays are incompatible"</span>
|
599
|
+
<span class='rubyid_end end kw'>end</span>
|
600
|
+
|
601
|
+
<span class='comment val'># Will not work if we have subclasses!!!!</span>
|
602
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_@op1 ivar id'>@op1</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span> <span class='neq op'>!=</span> <span class='rubyid_@op2 ivar id'>@op2</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='rparen token'>)</span>
|
603
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='string val'>"Invalid operation - array are not of compatible types"</span>
|
604
|
+
<span class='rubyid_end end kw'>end</span>
|
605
|
+
|
606
|
+
<span class='rubyid_arg2 identifier id'>arg2</span> <span class='assign token'>=</span> <span class='rubyid_@op2 ivar id'>@op2</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span>
|
607
|
+
<span class='rubyid_end end kw'>end</span>
|
608
|
+
|
609
|
+
<span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_@op1 ivar id'>@op1</span><span class='dot token'>.</span><span class='rubyid_nc_array identifier id'>nc_array</span><span class='comma token'>,</span> <span class='rubyid_arg2 identifier id'>arg2</span><span class='comma token'>,</span> <span class='rubyid_@op1 ivar id'>@op1</span><span class='dot token'>.</span><span class='rubyid_shape identifier id'>shape</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span>
|
610
|
+
|
611
|
+
<span class='rubyid_end end kw'>end</span>
|
612
|
+
</pre>
|
613
|
+
</td>
|
614
|
+
</tr>
|
615
|
+
</table>
|
616
|
+
</div>
|
617
|
+
|
618
|
+
<div class="method_details ">
|
619
|
+
<h3 class="signature " id="in_place-instance_method">
|
620
|
+
|
621
|
+
- (<tt>Object</tt>) <strong>in_place</strong>(*args)
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
</h3><div class="docstring">
|
628
|
+
<div class="discussion">
|
629
|
+
<hr style="height: 10px">
|
630
|
+
<hr style="height: 10px">
|
631
|
+
|
632
|
+
|
633
|
+
</div>
|
634
|
+
</div>
|
635
|
+
<div class="tags">
|
636
|
+
|
637
|
+
|
638
|
+
</div><table class="source_code">
|
639
|
+
<tr>
|
640
|
+
<td>
|
641
|
+
<pre class="lines">
|
642
|
+
|
643
|
+
|
644
|
+
112
|
645
|
+
113
|
646
|
+
114
|
647
|
+
115
|
648
|
+
116
|
649
|
+
117
|
650
|
+
118
|
651
|
+
119</pre>
|
652
|
+
</td>
|
653
|
+
<td>
|
654
|
+
<pre class="code"><span class="info file"># File 'lib/mdarray/fast_operators.rb', line 112</span>
|
655
|
+
|
656
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_in_place identifier id'>in_place</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
657
|
+
|
658
|
+
<span class='rubyid_get_args identifier id'>get_args</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_shape identifier id'>shape</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_other_args identifier id'>other_args</span><span class='bitor op'>|</span>
|
659
|
+
<span class='rubyid_helper identifier id'>helper</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_RbMdarrayLoopsBinops constant id'>RbMdarrayLoopsBinops</span><span class='colon2 op'>::</span><span class='rubyid_InplaceBinaryOperator constant id'>InplaceBinaryOperator</span>
|
660
|
+
<span class='rubyid_helper identifier id'>helper</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>"apply"</span><span class='comma token'>,</span> <span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_@do_func ivar id'>@do_func</span><span class='rparen token'>)</span>
|
661
|
+
<span class='rubyid_end end kw'>end</span>
|
662
|
+
|
663
|
+
<span class='rubyid_end end kw'>end</span>
|
664
|
+
</pre>
|
665
|
+
</td>
|
666
|
+
</tr>
|
667
|
+
</table>
|
668
|
+
</div>
|
669
|
+
|
670
|
+
<div class="method_details ">
|
671
|
+
<h3 class="signature " id="reduce-instance_method">
|
672
|
+
|
673
|
+
- (<tt>Object</tt>) <strong>reduce</strong>(*args)
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
</h3><div class="docstring">
|
680
|
+
<div class="discussion">
|
681
|
+
<hr style="height: 10px">
|
682
|
+
<hr style="height: 10px">
|
683
|
+
|
684
|
+
|
685
|
+
</div>
|
686
|
+
</div>
|
687
|
+
<div class="tags">
|
688
|
+
|
689
|
+
|
690
|
+
</div><table class="source_code">
|
691
|
+
<tr>
|
692
|
+
<td>
|
693
|
+
<pre class="lines">
|
694
|
+
|
695
|
+
|
696
|
+
125
|
697
|
+
126
|
698
|
+
127
|
699
|
+
128
|
700
|
+
129
|
701
|
+
130
|
702
|
+
131
|
703
|
+
132
|
704
|
+
133
|
705
|
+
134
|
706
|
+
135
|
707
|
+
136
|
708
|
+
137</pre>
|
709
|
+
</td>
|
710
|
+
<td>
|
711
|
+
<pre class="code"><span class="info file"># File 'lib/mdarray/fast_operators.rb', line 125</span>
|
712
|
+
|
713
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_reduce identifier id'>reduce</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
714
|
+
|
715
|
+
<span class='rubyid_calc identifier id'>calc</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
716
|
+
|
717
|
+
<span class='rubyid_get_args identifier id'>get_args</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_shape identifier id'>shape</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_other_args identifier id'>other_args</span><span class='bitor op'>|</span>
|
718
|
+
<span class='rubyid_helper identifier id'>helper</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_RbMdarrayLoopsBinops constant id'>RbMdarrayLoopsBinops</span><span class='colon2 op'>::</span><span class='rubyid_ReduceBinaryOperator constant id'>ReduceBinaryOperator</span>
|
719
|
+
<span class='rubyid_calc identifier id'>calc</span> <span class='assign token'>=</span> <span class='rubyid_@pre_condition_result ivar id'>@pre_condition_result</span>
|
720
|
+
<span class='rubyid_calc identifier id'>calc</span> <span class='assign token'>=</span> <span class='rubyid_helper identifier id'>helper</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>"apply"</span><span class='comma token'>,</span> <span class='rubyid_calc identifier id'>calc</span><span class='comma token'>,</span> <span class='rubyid_op1 identifier id'>op1</span><span class='comma token'>,</span> <span class='rubyid_op2 identifier id'>op2</span><span class='comma token'>,</span> <span class='rubyid_@do_func ivar id'>@do_func</span><span class='rparen token'>)</span>
|
721
|
+
<span class='rubyid_end end kw'>end</span>
|
722
|
+
|
723
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_calc identifier id'>calc</span>
|
724
|
+
|
725
|
+
<span class='rubyid_end end kw'>end</span>
|
726
|
+
</pre>
|
727
|
+
</td>
|
728
|
+
</tr>
|
729
|
+
</table>
|
730
|
+
</div>
|
731
|
+
|
732
|
+
</div>
|
733
|
+
|
734
|
+
</div>
|
735
|
+
|
736
|
+
<div id="footer">
|
737
|
+
Generated on Thu May 16 12:48:41 2013 by
|
738
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
739
|
+
0.8.5.2 (ruby-1.9.3).
|
740
|
+
</div>
|
741
|
+
|
742
|
+
</body>
|
743
|
+
</html>
|