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.
- checksums.yaml +4 -4
- data/config.rb +29 -95
- data/doc/BinaryOperator.html +20 -21
- data/doc/BitwiseOperators.html +18 -8
- data/doc/BitwiseOperators/BinaryAnd.html +189 -0
- data/doc/BitwiseOperators/BinaryLeftShift.html +189 -0
- data/doc/BitwiseOperators/BinaryOnesComplement.html +189 -0
- data/doc/BitwiseOperators/BinaryOr.html +189 -0
- data/doc/BitwiseOperators/BinaryRightShift.html +189 -0
- data/doc/BitwiseOperators/BinaryXor.html +189 -0
- data/doc/BooleanFunctions.html +18 -8
- data/doc/BooleanFunctions/And.html +189 -0
- data/doc/BooleanFunctions/Not.html +189 -0
- data/doc/BooleanFunctions/Or.html +189 -0
- data/doc/BooleanMDArray.html +10 -10
- data/doc/ByteMDArray.html +73 -14
- data/doc/CernDoubleFunctions.html +208 -0
- data/doc/CernFloatFunctions.html +208 -0
- data/doc/CernFunctions.html +828 -0
- data/doc/CernIntFunctions.html +208 -0
- data/doc/CernLongFunctions.html +208 -0
- data/doc/CharMDArray.html +181 -0
- data/doc/Colt.html +18 -20
- data/doc/ComparisonOperators.html +18 -8
- data/doc/ComparisonOperators/Eq.html +189 -0
- data/doc/ComparisonOperators/Ge.html +189 -0
- data/doc/ComparisonOperators/Gt.html +189 -0
- data/doc/ComparisonOperators/Le.html +189 -0
- data/doc/ComparisonOperators/Lt.html +189 -0
- data/doc/Const.html +107 -47
- data/doc/Csv.html +325 -113
- data/doc/Csv/Dimension.html +771 -0
- data/doc/Csv/Dimensions.html +654 -0
- data/doc/DDescriptive.html +573 -625
- data/doc/DoubleMDArray.html +40 -172
- data/doc/DoubleStatList.html +19 -20
- data/doc/FastBinaryOperator.html +166 -148
- data/doc/FastUnaryOperator.html +104 -109
- data/doc/FloatMDArray.html +55 -16
- data/doc/FunctionCreation.html +53 -273
- data/doc/FunctionMap.html +381 -93
- data/doc/GenericFunctions.html +18 -8
- data/doc/GenericFunctions/Null.html +187 -0
- data/doc/IntMDArray.html +77 -16
- data/doc/Java/CernJetMathTdouble/DoubleFunctions.html +120 -0
- data/doc/Java/CernJetMathTfloat/FloatFunctions.html +120 -0
- data/doc/Java/CernJetMathTint/IntFunctions.html +120 -0
- data/doc/Java/CernJetMathTlong/LongFunctions.html +120 -0
- data/doc/LazyBinaryOperator.html +714 -0
- data/doc/LazyMDArray.html +990 -0
- data/doc/LazyMDArray/BinaryComp.html +282 -0
- data/doc/LazyMDArray/UnaryComp.html +280 -0
- data/doc/LazyUnaryOperator.html +537 -0
- data/doc/LongMDArray.html +59 -15
- data/doc/MDArray.html +3223 -2181
- data/doc/MDArray/Counter.html +321 -1233
- data/doc/MDArray/IteratorFast.html +177 -116
- data/doc/MDArray/IteratorFastBoolean.html +37 -41
- data/doc/MDArray/IteratorFastByte.html +46 -39
- data/doc/MDArray/IteratorFastChar.html +37 -41
- data/doc/MDArray/IteratorFastDouble.html +37 -41
- data/doc/MDArray/IteratorFastFloat.html +37 -41
- data/doc/MDArray/IteratorFastInt.html +37 -41
- data/doc/MDArray/IteratorFastLong.html +37 -41
- data/doc/MDArray/IteratorFastShort.html +37 -41
- data/doc/MDArray/Section.html +561 -0
- data/doc/Nashorn.html +1407 -0
- data/doc/NetCDF.html +749 -0
- data/doc/NetCDF/Attribute.html +875 -0
- data/doc/NetCDF/AttributeWriter.html +286 -0
- data/doc/NetCDF/CDMNode.html +460 -0
- data/doc/NetCDF/Dimension.html +559 -0
- data/doc/NetCDF/DimensionWriter.html +642 -0
- data/doc/NetCDF/File.html +1593 -0
- data/doc/NetCDF/FileParent.html +674 -0
- data/doc/NetCDF/FileWriter.html +2875 -0
- data/doc/NetCDF/Group.html +685 -0
- data/doc/NetCDF/GroupWriter.html +851 -0
- data/doc/NetCDF/TimeVariable.html +646 -0
- data/doc/NetCDF/Variable.html +2994 -0
- data/doc/NetCDF/VariableWriter.html +420 -0
- data/doc/NonNumericalMDArray.html +11 -11
- data/doc/NumericFunctions.html +38 -30
- data/doc/NumericFunctions/Abs.html +189 -0
- data/doc/NumericFunctions/Add.html +189 -0
- data/doc/NumericFunctions/Ceil.html +189 -0
- data/doc/NumericFunctions/Cube.html +189 -0
- data/doc/NumericFunctions/Div.html +189 -0
- data/doc/NumericFunctions/Floor.html +189 -0
- data/doc/NumericFunctions/Fourth.html +189 -0
- data/doc/NumericFunctions/IsZero.html +189 -0
- data/doc/NumericFunctions/Max.html +189 -0
- data/doc/NumericFunctions/Min.html +189 -0
- data/doc/NumericFunctions/Mul.html +189 -0
- data/doc/NumericFunctions/Power.html +189 -0
- data/doc/NumericFunctions/Square.html +189 -0
- data/doc/NumericFunctions/Sub.html +189 -0
- data/doc/NumericFunctions/Truncate.html +189 -0
- data/doc/NumericalMDArray.html +14 -15
- data/doc/Operator.html +318 -109
- data/doc/Proc.html +120 -129
- data/doc/RubyBinaryOperator.html +66 -70
- data/doc/RubyFunctions.html +572 -27
- data/doc/RubyMath.html +18 -8
- data/doc/RubyMath/Acos.html +189 -0
- data/doc/RubyMath/Acosh.html +189 -0
- data/doc/RubyMath/Asin.html +189 -0
- data/doc/RubyMath/Asinh.html +189 -0
- data/doc/RubyMath/Atan.html +189 -0
- data/doc/RubyMath/Atan2.html +189 -0
- data/doc/RubyMath/Atanh.html +189 -0
- data/doc/RubyMath/Cbrt.html +189 -0
- data/doc/RubyMath/Cos.html +189 -0
- data/doc/RubyMath/Cosh.html +189 -0
- data/doc/RubyMath/Erf.html +189 -0
- data/doc/RubyMath/Erfc.html +189 -0
- data/doc/RubyMath/Exp.html +189 -0
- data/doc/RubyMath/Gamma.html +189 -0
- data/doc/RubyMath/Hypot.html +189 -0
- data/doc/RubyMath/Ldexp.html +189 -0
- data/doc/RubyMath/Log.html +189 -0
- data/doc/RubyMath/Log10.html +189 -0
- data/doc/RubyMath/Log2.html +189 -0
- data/doc/RubyMath/Neg.html +189 -0
- data/doc/RubyMath/Sin.html +189 -0
- data/doc/RubyMath/Sinh.html +189 -0
- data/doc/RubyMath/Sqrt.html +189 -0
- data/doc/RubyMath/Tan.html +189 -0
- data/doc/RubyMath/Tanh.html +189 -0
- data/doc/RubyStats.html +8 -8
- data/doc/RubyUnaryOperator.html +61 -65
- data/doc/ShortMDArray.html +69 -14
- data/doc/Sol.html +700 -0
- data/doc/Sol/BarChart.html +181 -0
- data/doc/Sol/BaseChart.html +800 -0
- data/doc/Sol/Bootstrap.html +1137 -0
- data/doc/Sol/Bridge.html +586 -0
- data/doc/Sol/Chart.html +1162 -0
- data/doc/Sol/CoordinateChart.html +679 -0
- data/doc/Sol/Dashboard.html +2094 -0
- data/doc/Sol/Dashboard/DCFX.html +786 -0
- data/doc/Sol/Dashboard/MyHandle.html +338 -0
- data/doc/Sol/Dashboard/MyService.html +202 -0
- data/doc/Sol/Dashboard/MyTask.html +291 -0
- data/doc/Sol/Interval.html +1213 -0
- data/doc/Sol/LineChart.html +346 -0
- data/doc/Sol/LinearScale.html +334 -0
- data/doc/Sol/Margins.html +219 -0
- data/doc/Sol/OrdinalScale.html +263 -0
- data/doc/Sol/Scale.html +462 -0
- data/doc/Sol/Stack.html +199 -0
- data/doc/Sol/TimeScale.html +397 -0
- data/doc/StatList.html +110 -125
- data/doc/StringMDArray.html +10 -10
- data/doc/StructureMDArray.html +10 -10
- data/doc/UnaryOperator.html +20 -21
- data/doc/UserFunction.html +51 -49
- data/doc/_index.html +881 -106
- data/doc/class_list.html +8 -3
- data/doc/css/style.css +2 -1
- data/doc/file.README.html +455 -104
- data/doc/file_list.html +7 -2
- data/doc/frames.html +5 -7
- data/doc/index.html +455 -104
- data/doc/js/app.js +7 -2
- data/doc/js/full_list.js +11 -3
- data/doc/method_list.html +3170 -1233
- data/doc/top-level-namespace.html +31 -8
- data/lib/colt/matrix/algebra.rb +5 -5
- data/lib/mdarray.rb +6 -3
- data/lib/mdarray/csv.rb +25 -5
- data/lib/mdarray/fast_operators.rb +1 -1
- data/lib/mdarray/function_creation.rb +3 -1
- data/lib/mdarray/hierarchy.rb +2 -0
- data/lib/mdarray/operators.rb +1 -1
- data/lib/mdarray/ruby_functions.rb +8 -4
- data/lib/mdarray/ruby_math.rb +0 -28
- data/test/colt/matrix/test_matrix2d_floatingalgebra.rb +31 -7
- data/test/complete.rb +4 -4
- data/test/mdarray/PETR4_2014.csv +249 -0
- data/test/mdarray/VALE_2014.csv +253 -0
- data/test/mdarray/VALE_PETR4.csv +501 -0
- data/test/mdarray/arithmetic_casting.rb +1 -0
- data/test/mdarray/test_access.rb +1 -0
- data/test/mdarray/test_boolean.rb +1 -0
- data/test/mdarray/test_comparison.rb +1 -0
- data/test/mdarray/test_complete.rb +2 -5
- data/test/mdarray/test_counter.rb +1 -0
- data/test/mdarray/test_creation.rb +1 -0
- data/test/mdarray/test_csv.rb +51 -0
- data/test/mdarray/test_error.rb +1 -0
- data/test/mdarray/test_non_numeric.rb +1 -1
- data/test/mdarray/test_operator.rb +31 -14
- data/test/mdarray/test_performance.rb +2 -1
- data/test/mdarray/test_printing.rb +1 -0
- data/test/mdarray/test_sections.rb +1 -0
- data/test/mdarray/test_shape.rb +1 -0
- data/test/mdarray/test_trigonometry.rb +1 -0
- data/test/mdarray/test_views.rb +1 -0
- data/vendor/mdarray.jar +0 -0
- data/vendor/{netcdfAll-4.5_0.jar → netcdfAll-4.6.jar} +0 -0
- data/vendor/slf4j-jdk14-1.7.12.jar +0 -0
- data/version.rb +1 -1
- metadata +247 -139
- data/lib/env.rb +0 -12
- data/lib/mdarray/lazy_mdarray.rb +0 -315
- data/lib/mdarray/lazy_operators.rb +0 -174
- data/test/env.rb +0 -8
- data/test/mdarray/test_lazy.rb +0 -306
data/doc/Nashorn.html
ADDED
|
@@ -0,0 +1,1407 @@
|
|
|
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: Nashorn
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.7.6
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" 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#!Nashorn.html";
|
|
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 (N)</a> »
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<span class="title">Nashorn</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: Nashorn
|
|
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">JRubyFX::Application</span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next">JRubyFX::Application</li>
|
|
82
|
+
|
|
83
|
+
<li class="next">Nashorn</li>
|
|
84
|
+
|
|
85
|
+
</ul>
|
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
87
|
+
|
|
88
|
+
</dd>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
|
99
|
+
<dd class="r2 last">lib/nashorn/nashorn.rb</dd>
|
|
100
|
+
|
|
101
|
+
</dl>
|
|
102
|
+
<div class="clear"></div>
|
|
103
|
+
|
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
|
105
|
+
<div class="discussion">
|
|
106
|
+
|
|
107
|
+
<h6 id="label-"></h6>
|
|
108
|
+
|
|
109
|
+
<h6 id="label-"></h6>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="tags">
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
|
122
|
+
<ul class="summary">
|
|
123
|
+
|
|
124
|
+
<li class="public ">
|
|
125
|
+
<span class="summary_signature">
|
|
126
|
+
|
|
127
|
+
<a href="#browser-instance_method" title="#browser (instance method)">- (Object) <strong>browser</strong> </a>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
</span>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
<span class="note title readonly">readonly</span>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
<span class="summary_desc"><div class='inline'>
|
|
147
|
+
<p>When view is true the following variables will be set.</p>
|
|
148
|
+
</div></span>
|
|
149
|
+
|
|
150
|
+
</li>
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
<li class="public ">
|
|
154
|
+
<span class="summary_signature">
|
|
155
|
+
|
|
156
|
+
<a href="#document-instance_method" title="#document (instance method)">- (Object) <strong>document</strong> </a>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
</span>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<span class="note title readonly">readonly</span>
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<span class="summary_desc"><div class='inline'>
|
|
176
|
+
<p>Returns the value of attribute document.</p>
|
|
177
|
+
</div></span>
|
|
178
|
+
|
|
179
|
+
</li>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<li class="public ">
|
|
183
|
+
<span class="summary_signature">
|
|
184
|
+
|
|
185
|
+
<a href="#engine-instance_method" title="#engine (instance method)">- (Object) <strong>engine</strong> </a>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
</span>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
<span class="note title readonly">readonly</span>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<span class="summary_desc"><div class='inline'>
|
|
205
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
206
|
+
</div></span>
|
|
207
|
+
|
|
208
|
+
</li>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<li class="public ">
|
|
212
|
+
<span class="summary_signature">
|
|
213
|
+
|
|
214
|
+
<a href="#window-instance_method" title="#window (instance method)">- (Object) <strong>window</strong> </a>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
</span>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
<span class="note title readonly">readonly</span>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
<span class="summary_desc"><div class='inline'>
|
|
234
|
+
<p>Returns the value of attribute window.</p>
|
|
235
|
+
</div></span>
|
|
236
|
+
|
|
237
|
+
</li>
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
</ul>
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<h2>
|
|
247
|
+
Instance Method Summary
|
|
248
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
249
|
+
</h2>
|
|
250
|
+
|
|
251
|
+
<ul class="summary">
|
|
252
|
+
|
|
253
|
+
<li class="public ">
|
|
254
|
+
<span class="summary_signature">
|
|
255
|
+
|
|
256
|
+
<a href="#assign-instance_method" title="#assign (instance method)">- (Object) <strong>assign</strong>(name, value) </a>
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
</span>
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
<span class="summary_desc"><div class='inline'>
|
|
271
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
272
|
+
</div></span>
|
|
273
|
+
|
|
274
|
+
</li>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
<li class="public ">
|
|
278
|
+
<span class="summary_signature">
|
|
279
|
+
|
|
280
|
+
<a href="#build_vector-instance_method" title="#build_vector (instance method)">- (Object) <strong>build_vector</strong>(mdarray) </a>
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
</span>
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
<span class="summary_desc"><div class='inline'>
|
|
295
|
+
<p>----------------------------------------------------------------------------------------
|
|
296
|
+
Builds a Renjin vector from an MDArray.</p>
|
|
297
|
+
</div></span>
|
|
298
|
+
|
|
299
|
+
</li>
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
<li class="public ">
|
|
303
|
+
<span class="summary_signature">
|
|
304
|
+
|
|
305
|
+
<a href="#direct_eval-instance_method" title="#direct_eval (instance method)">- (Object) <strong>direct_eval</strong>(expression) </a>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
</span>
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
<span class="summary_desc"><div class='inline'>
|
|
320
|
+
<p>----------------------------------------------------------------------------------------
|
|
321
|
+
Evaluates an expression but does not wrap the return in a RubySexp.</p>
|
|
322
|
+
</div></span>
|
|
323
|
+
|
|
324
|
+
</li>
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
<li class="public ">
|
|
328
|
+
<span class="summary_signature">
|
|
329
|
+
|
|
330
|
+
<a href="#eval-instance_method" title="#eval (instance method)">- (Object) <strong>eval</strong>(expression) </a>
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
</span>
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
<span class="summary_desc"><div class='inline'>
|
|
345
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
346
|
+
</div></span>
|
|
347
|
+
|
|
348
|
+
</li>
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
<li class="public ">
|
|
352
|
+
<span class="summary_signature">
|
|
353
|
+
|
|
354
|
+
<a href="#install__package-instance_method" title="#install__package (instance method)">- (Object) <strong>install__package</strong>(name) </a>
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
</span>
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
<span class="summary_desc"><div class='inline'>
|
|
369
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
370
|
+
</div></span>
|
|
371
|
+
|
|
372
|
+
</li>
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
<li class="public ">
|
|
376
|
+
<span class="summary_signature">
|
|
377
|
+
|
|
378
|
+
<a href="#library-instance_method" title="#library (instance method)">- (Object) <strong>library</strong>(package) </a>
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
</span>
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
<span class="summary_desc"><div class='inline'>
|
|
393
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
394
|
+
</div></span>
|
|
395
|
+
|
|
396
|
+
</li>
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
<li class="public ">
|
|
400
|
+
<span class="summary_signature">
|
|
401
|
+
|
|
402
|
+
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(symbol, *args) </a>
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
</span>
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
<span class="summary_desc"><div class='inline'>
|
|
417
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
418
|
+
</div></span>
|
|
419
|
+
|
|
420
|
+
</li>
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
<li class="public ">
|
|
424
|
+
<span class="summary_signature">
|
|
425
|
+
|
|
426
|
+
<a href="#parse-instance_method" title="#parse (instance method)">- (Object) <strong>parse</strong>(*args) </a>
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
</span>
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
<span class="summary_desc"><div class='inline'>
|
|
441
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
442
|
+
</div></span>
|
|
443
|
+
|
|
444
|
+
</li>
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
<li class="public ">
|
|
448
|
+
<span class="summary_signature">
|
|
449
|
+
|
|
450
|
+
<a href="#pull-instance_method" title="#pull (instance method)">- (Object) <strong>pull</strong>(name) </a>
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
</span>
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
<span class="summary_desc"><div class='inline'>
|
|
465
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
466
|
+
</div></span>
|
|
467
|
+
|
|
468
|
+
</li>
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
<li class="public ">
|
|
472
|
+
<span class="summary_signature">
|
|
473
|
+
|
|
474
|
+
<a href="#start-instance_method" title="#start (instance method)">- (Object) <strong>start</strong>(stage) </a>
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
</span>
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
489
|
+
|
|
490
|
+
</li>
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
</ul>
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
<div id="method_missing_details" class="method_details_list">
|
|
498
|
+
<h2>Dynamic Method Handling</h2>
|
|
499
|
+
<p class="notice this">
|
|
500
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
|
501
|
+
|
|
502
|
+
</p>
|
|
503
|
+
|
|
504
|
+
<div class="method_details first">
|
|
505
|
+
<h3 class="signature first" id="method_missing-instance_method">
|
|
506
|
+
|
|
507
|
+
- (<tt>Object</tt>) <strong>method_missing</strong>(symbol, *args)
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
</h3><div class="docstring">
|
|
514
|
+
<div class="discussion">
|
|
515
|
+
<hr>
|
|
516
|
+
<hr>
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
</div>
|
|
520
|
+
</div>
|
|
521
|
+
<div class="tags">
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
</div><table class="source_code">
|
|
525
|
+
<tr>
|
|
526
|
+
<td>
|
|
527
|
+
<pre class="lines">
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
83
|
|
531
|
+
84
|
|
532
|
+
85
|
|
533
|
+
86
|
|
534
|
+
87
|
|
535
|
+
88
|
|
536
|
+
89
|
|
537
|
+
90
|
|
538
|
+
91
|
|
539
|
+
92
|
|
540
|
+
93
|
|
541
|
+
94
|
|
542
|
+
95
|
|
543
|
+
96
|
|
544
|
+
97
|
|
545
|
+
98
|
|
546
|
+
99
|
|
547
|
+
100
|
|
548
|
+
101
|
|
549
|
+
102
|
|
550
|
+
103
|
|
551
|
+
104</pre>
|
|
552
|
+
</td>
|
|
553
|
+
<td>
|
|
554
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 83</span>
|
|
555
|
+
|
|
556
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
557
|
+
|
|
558
|
+
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_symbol'>symbol</span><span class='period'>.</span><span class='id identifier rubyid_id2name'>id2name</span>
|
|
559
|
+
|
|
560
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(.*)=$</span><span class='regexp_end'>/</span></span>
|
|
561
|
+
<span class='kw'>super</span> <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>!=</span> <span class='int'>1</span>
|
|
562
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='id identifier rubyid_assign'>assign</span><span class='lparen'>(</span><span class='backref'>$1</span><span class='comma'>,</span><span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
563
|
+
<span class='kw'>else</span>
|
|
564
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
565
|
+
<span class='comment'># p "#{name}(#{params})"
|
|
566
|
+
</span> <span class='comment'># ret = eval("#{name}(#{params})")
|
|
567
|
+
</span> <span class='kw'>begin</span>
|
|
568
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='ivar'>@engine</span><span class='period'>.</span><span class='id identifier rubyid_invokeFunction'>invokeFunction</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
|
569
|
+
<span class='kw'>rescue</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>JavaLang</span><span class='op'>::</span><span class='const'>NoSuchMethodException</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
|
570
|
+
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span>
|
|
571
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NoMethodError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Method </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> is not defined.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
|
572
|
+
<span class='kw'>end</span>
|
|
573
|
+
<span class='kw'>end</span>
|
|
574
|
+
|
|
575
|
+
<span class='id identifier rubyid_ret'>ret</span>
|
|
576
|
+
|
|
577
|
+
<span class='kw'>end</span></pre>
|
|
578
|
+
</td>
|
|
579
|
+
</tr>
|
|
580
|
+
</table>
|
|
581
|
+
</div>
|
|
582
|
+
|
|
583
|
+
</div>
|
|
584
|
+
|
|
585
|
+
<div id="instance_attr_details" class="attr_details">
|
|
586
|
+
<h2>Instance Attribute Details</h2>
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
<span id=""></span>
|
|
590
|
+
<div class="method_details first">
|
|
591
|
+
<h3 class="signature first" id="browser-instance_method">
|
|
592
|
+
|
|
593
|
+
- (<tt>Object</tt>) <strong>browser</strong> <span class="extras">(readonly)</span>
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
</h3><div class="docstring">
|
|
600
|
+
<div class="discussion">
|
|
601
|
+
|
|
602
|
+
<p>When view is true the following variables will be set</p>
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
</div>
|
|
606
|
+
</div>
|
|
607
|
+
<div class="tags">
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
</div><table class="source_code">
|
|
611
|
+
<tr>
|
|
612
|
+
<td>
|
|
613
|
+
<pre class="lines">
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
39
|
|
617
|
+
40
|
|
618
|
+
41</pre>
|
|
619
|
+
</td>
|
|
620
|
+
<td>
|
|
621
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 39</span>
|
|
622
|
+
|
|
623
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_browser'>browser</span>
|
|
624
|
+
<span class='ivar'>@browser</span>
|
|
625
|
+
<span class='kw'>end</span></pre>
|
|
626
|
+
</td>
|
|
627
|
+
</tr>
|
|
628
|
+
</table>
|
|
629
|
+
</div>
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
<span id=""></span>
|
|
633
|
+
<div class="method_details ">
|
|
634
|
+
<h3 class="signature " id="document-instance_method">
|
|
635
|
+
|
|
636
|
+
- (<tt>Object</tt>) <strong>document</strong> <span class="extras">(readonly)</span>
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
</h3><div class="docstring">
|
|
643
|
+
<div class="discussion">
|
|
644
|
+
|
|
645
|
+
<p>Returns the value of attribute document</p>
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
</div>
|
|
649
|
+
</div>
|
|
650
|
+
<div class="tags">
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
</div><table class="source_code">
|
|
654
|
+
<tr>
|
|
655
|
+
<td>
|
|
656
|
+
<pre class="lines">
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
41
|
|
660
|
+
42
|
|
661
|
+
43</pre>
|
|
662
|
+
</td>
|
|
663
|
+
<td>
|
|
664
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 41</span>
|
|
665
|
+
|
|
666
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_document'>document</span>
|
|
667
|
+
<span class='ivar'>@document</span>
|
|
668
|
+
<span class='kw'>end</span></pre>
|
|
669
|
+
</td>
|
|
670
|
+
</tr>
|
|
671
|
+
</table>
|
|
672
|
+
</div>
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
<span id=""></span>
|
|
676
|
+
<div class="method_details ">
|
|
677
|
+
<h3 class="signature " id="engine-instance_method">
|
|
678
|
+
|
|
679
|
+
- (<tt>Object</tt>) <strong>engine</strong> <span class="extras">(readonly)</span>
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
</h3><div class="docstring">
|
|
686
|
+
<div class="discussion">
|
|
687
|
+
<hr>
|
|
688
|
+
<hr>
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
</div>
|
|
692
|
+
</div>
|
|
693
|
+
<div class="tags">
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
</div><table class="source_code">
|
|
697
|
+
<tr>
|
|
698
|
+
<td>
|
|
699
|
+
<pre class="lines">
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
36
|
|
703
|
+
37
|
|
704
|
+
38</pre>
|
|
705
|
+
</td>
|
|
706
|
+
<td>
|
|
707
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 36</span>
|
|
708
|
+
|
|
709
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_engine'>engine</span>
|
|
710
|
+
<span class='ivar'>@engine</span>
|
|
711
|
+
<span class='kw'>end</span></pre>
|
|
712
|
+
</td>
|
|
713
|
+
</tr>
|
|
714
|
+
</table>
|
|
715
|
+
</div>
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
<span id=""></span>
|
|
719
|
+
<div class="method_details ">
|
|
720
|
+
<h3 class="signature " id="window-instance_method">
|
|
721
|
+
|
|
722
|
+
- (<tt>Object</tt>) <strong>window</strong> <span class="extras">(readonly)</span>
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
</h3><div class="docstring">
|
|
729
|
+
<div class="discussion">
|
|
730
|
+
|
|
731
|
+
<p>Returns the value of attribute window</p>
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
</div>
|
|
735
|
+
</div>
|
|
736
|
+
<div class="tags">
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
</div><table class="source_code">
|
|
740
|
+
<tr>
|
|
741
|
+
<td>
|
|
742
|
+
<pre class="lines">
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
40
|
|
746
|
+
41
|
|
747
|
+
42</pre>
|
|
748
|
+
</td>
|
|
749
|
+
<td>
|
|
750
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 40</span>
|
|
751
|
+
|
|
752
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_window'>window</span>
|
|
753
|
+
<span class='ivar'>@window</span>
|
|
754
|
+
<span class='kw'>end</span></pre>
|
|
755
|
+
</td>
|
|
756
|
+
</tr>
|
|
757
|
+
</table>
|
|
758
|
+
</div>
|
|
759
|
+
|
|
760
|
+
</div>
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
<div id="instance_method_details" class="method_details_list">
|
|
764
|
+
<h2>Instance Method Details</h2>
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
<div class="method_details first">
|
|
768
|
+
<h3 class="signature first" id="assign-instance_method">
|
|
769
|
+
|
|
770
|
+
- (<tt>Object</tt>) <strong>assign</strong>(name, value)
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
</h3><div class="docstring">
|
|
777
|
+
<div class="discussion">
|
|
778
|
+
<hr>
|
|
779
|
+
<hr>
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
</div>
|
|
783
|
+
</div>
|
|
784
|
+
<div class="tags">
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
</div><table class="source_code">
|
|
788
|
+
<tr>
|
|
789
|
+
<td>
|
|
790
|
+
<pre class="lines">
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
198
|
|
794
|
+
199
|
|
795
|
+
200
|
|
796
|
+
201
|
|
797
|
+
202
|
|
798
|
+
203
|
|
799
|
+
204
|
|
800
|
+
205
|
|
801
|
+
206
|
|
802
|
+
207
|
|
803
|
+
208
|
|
804
|
+
209
|
|
805
|
+
210
|
|
806
|
+
211
|
|
807
|
+
212
|
|
808
|
+
213
|
|
809
|
+
214
|
|
810
|
+
215
|
|
811
|
+
216</pre>
|
|
812
|
+
</td>
|
|
813
|
+
<td>
|
|
814
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 198</span>
|
|
815
|
+
|
|
816
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_assign'>assign</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
817
|
+
|
|
818
|
+
<span class='id identifier rubyid_original_value'>original_value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
|
819
|
+
|
|
820
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>MDArray</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>RubySexp</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
821
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_sexp'>sexp</span> <span class='op'>!=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
822
|
+
<span class='comment'># MDArray already represented in R
|
|
823
|
+
</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_sexp'>sexp</span>
|
|
824
|
+
<span class='kw'>else</span>
|
|
825
|
+
<span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_build_vector'>build_vector</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
826
|
+
<span class='kw'>end</span>
|
|
827
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span> <span class='op'>==</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
828
|
+
<span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='const'>NULL</span>
|
|
829
|
+
<span class='kw'>end</span>
|
|
830
|
+
|
|
831
|
+
<span class='ivar'>@engine</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
832
|
+
<span class='id identifier rubyid_original_value'>original_value</span>
|
|
833
|
+
|
|
834
|
+
<span class='kw'>end</span></pre>
|
|
835
|
+
</td>
|
|
836
|
+
</tr>
|
|
837
|
+
</table>
|
|
838
|
+
</div>
|
|
839
|
+
|
|
840
|
+
<div class="method_details ">
|
|
841
|
+
<h3 class="signature " id="build_vector-instance_method">
|
|
842
|
+
|
|
843
|
+
- (<tt>Object</tt>) <strong>build_vector</strong>(mdarray)
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
</h3><div class="docstring">
|
|
850
|
+
<div class="discussion">
|
|
851
|
+
<hr>
|
|
852
|
+
|
|
853
|
+
<p>Builds a Renjin vector from an MDArray. Should be private, but public for
|
|
854
|
+
testing.</p>
|
|
855
|
+
<hr>
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
</div>
|
|
859
|
+
</div>
|
|
860
|
+
<div class="tags">
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
</div><table class="source_code">
|
|
864
|
+
<tr>
|
|
865
|
+
<td>
|
|
866
|
+
<pre class="lines">
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
261
|
|
870
|
+
262
|
|
871
|
+
263
|
|
872
|
+
264
|
|
873
|
+
265
|
|
874
|
+
266
|
|
875
|
+
267
|
|
876
|
+
268
|
|
877
|
+
269
|
|
878
|
+
270
|
|
879
|
+
271
|
|
880
|
+
272
|
|
881
|
+
273
|
|
882
|
+
274
|
|
883
|
+
275
|
|
884
|
+
276
|
|
885
|
+
277
|
|
886
|
+
278
|
|
887
|
+
279
|
|
888
|
+
280
|
|
889
|
+
281
|
|
890
|
+
282
|
|
891
|
+
283
|
|
892
|
+
284
|
|
893
|
+
285
|
|
894
|
+
286
|
|
895
|
+
287
|
|
896
|
+
288
|
|
897
|
+
289
|
|
898
|
+
290
|
|
899
|
+
291
|
|
900
|
+
292
|
|
901
|
+
293
|
|
902
|
+
294
|
|
903
|
+
295
|
|
904
|
+
296</pre>
|
|
905
|
+
</td>
|
|
906
|
+
<td>
|
|
907
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 261</span>
|
|
908
|
+
|
|
909
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_build_vector'>build_vector</span><span class='lparen'>(</span><span class='id identifier rubyid_mdarray'>mdarray</span><span class='rparen'>)</span>
|
|
910
|
+
|
|
911
|
+
<span class='id identifier rubyid_shape'>shape</span> <span class='op'>=</span> <span class='id identifier rubyid_mdarray'>mdarray</span><span class='period'>.</span><span class='id identifier rubyid_shape'>shape</span>
|
|
912
|
+
<span class='comment'># index = mdarray.nc_array.getIndex()
|
|
913
|
+
</span> <span class='comment'># index = MDArray.index_factory(shape)
|
|
914
|
+
</span> <span class='comment'># representation of shape in R is different from shape in MDArray. Convert MDArray
|
|
915
|
+
</span> <span class='comment'># shape to R shape.
|
|
916
|
+
</span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_shape'>shape</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>2</span><span class='rparen'>)</span>
|
|
917
|
+
<span class='id identifier rubyid_shape'>shape</span><span class='period'>.</span><span class='id identifier rubyid_reverse!'>reverse!</span>
|
|
918
|
+
<span class='id identifier rubyid_shape'>shape</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_shape'>shape</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_shape'>shape</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_shape'>shape</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
|
919
|
+
<span class='kw'>end</span>
|
|
920
|
+
|
|
921
|
+
<span class='comment'># AttributeMap attributes = AttributeMap.builder().setDim(new IntVector(dim)).build();
|
|
922
|
+
</span> <span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>OrgRenjinSexp</span><span class='op'>::</span><span class='const'>AttributeMap</span><span class='period'>.</span><span class='id identifier rubyid_builder'>builder</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='period'>
|
|
923
|
+
</span><span class='id identifier rubyid_ .setDim'> .setDim</span><span class='lparen'>(</span><span class='const'>Java</span><span class='op'>::</span><span class='const'>OrgRenjinSexp</span><span class='op'>::</span><span class='const'>IntArrayVector</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='lparen'>(</span><span class='id identifier rubyid_shape'>shape</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
|
924
|
+
|
|
925
|
+
<span class='comment'># vector = Java::RbScicom::MDDoubleVector.new(mdarray.nc_array, attributes, index,
|
|
926
|
+
</span> <span class='comment'># index.stride)
|
|
927
|
+
</span>
|
|
928
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_mdarray'>mdarray</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
|
|
929
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>int</span><span class='tstring_end'>"</span></span>
|
|
930
|
+
<span class='id identifier rubyid_vector'>vector</span> <span class='op'>=</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>RbScicom</span><span class='op'>::</span><span class='const'>MDIntVector</span><span class='period'>.</span><span class='id identifier rubyid_factory'>factory</span><span class='lparen'>(</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='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
|
|
931
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>double</span><span class='tstring_end'>"</span></span>
|
|
932
|
+
<span class='id identifier rubyid_vector'>vector</span> <span class='op'>=</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>RbScicom</span><span class='op'>::</span><span class='const'>MDDoubleVector</span><span class='period'>.</span><span class='id identifier rubyid_factory'>factory</span><span class='lparen'>(</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='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
|
|
933
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>byte</span><span class='tstring_end'>"</span></span>
|
|
934
|
+
<span class='id identifier rubyid_vector'>vector</span> <span class='op'>=</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>RbScicom</span><span class='op'>::</span><span class='const'>MDLogicalVector</span><span class='period'>.</span><span class='id identifier rubyid_factory'>factory</span><span class='lparen'>(</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='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
|
|
935
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>string</span><span class='tstring_end'>"</span></span>
|
|
936
|
+
<span class='id identifier rubyid_vector'>vector</span> <span class='op'>=</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>RbScicom</span><span class='op'>::</span><span class='const'>MDStringVector</span><span class='period'>.</span><span class='id identifier rubyid_factory'>factory</span><span class='lparen'>(</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='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
|
|
937
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span>
|
|
938
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Boolean vectors cannot be converted to R vectors. If you are trying to \
|
|
939
|
+
convert to an R Logical object, use a :byte MDArray</span><span class='tstring_end'>"</span></span>
|
|
940
|
+
<span class='kw'>else</span>
|
|
941
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Cannot convert MDArray </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mdarray'>mdarray</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='rbrace'>}</span><span class='tstring_content'> to R vector</span><span class='tstring_end'>"</span></span>
|
|
942
|
+
<span class='kw'>end</span>
|
|
943
|
+
|
|
944
|
+
<span class='kw'>end</span></pre>
|
|
945
|
+
</td>
|
|
946
|
+
</tr>
|
|
947
|
+
</table>
|
|
948
|
+
</div>
|
|
949
|
+
|
|
950
|
+
<div class="method_details ">
|
|
951
|
+
<h3 class="signature " id="direct_eval-instance_method">
|
|
952
|
+
|
|
953
|
+
- (<tt>Object</tt>) <strong>direct_eval</strong>(expression)
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
</h3><div class="docstring">
|
|
960
|
+
<div class="discussion">
|
|
961
|
+
<hr>
|
|
962
|
+
|
|
963
|
+
<p>Evaluates an expression but does not wrap the return in a RubySexp. Needed
|
|
964
|
+
for intermediate evaluation done by internal methods. In principle,
|
|
965
|
+
should not be called by users.</p>
|
|
966
|
+
<hr>
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
</div>
|
|
970
|
+
</div>
|
|
971
|
+
<div class="tags">
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
</div><table class="source_code">
|
|
975
|
+
<tr>
|
|
976
|
+
<td>
|
|
977
|
+
<pre class="lines">
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
131
|
|
981
|
+
132
|
|
982
|
+
133
|
|
983
|
+
134
|
|
984
|
+
135
|
|
985
|
+
136
|
|
986
|
+
137
|
|
987
|
+
138
|
|
988
|
+
139
|
|
989
|
+
140
|
|
990
|
+
141
|
|
991
|
+
142
|
|
992
|
+
143
|
|
993
|
+
144
|
|
994
|
+
145
|
|
995
|
+
146</pre>
|
|
996
|
+
</td>
|
|
997
|
+
<td>
|
|
998
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 131</span>
|
|
999
|
+
|
|
1000
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_direct_eval'>direct_eval</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span>
|
|
1001
|
+
<span class='kw'>begin</span>
|
|
1002
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='ivar'>@engine</span><span class='period'>.</span><span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span>
|
|
1003
|
+
<span class='kw'>rescue</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>OrgRenjinEval</span><span class='op'>::</span><span class='const'>EvalException</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
|
1004
|
+
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span>
|
|
1005
|
+
<span class='kw'>ensure</span>
|
|
1006
|
+
<span class='embdoc_beg'>=begin
|
|
1007
|
+
</span><span class='embdoc'> Renjin.stack.each do |sexp|
|
|
1008
|
+
</span><span class='embdoc'> sexp.destroy
|
|
1009
|
+
</span><span class='embdoc'> end
|
|
1010
|
+
</span><span class='embdoc_end'>=end
|
|
1011
|
+
</span> <span class='kw'>end</span>
|
|
1012
|
+
|
|
1013
|
+
<span class='id identifier rubyid_ret'>ret</span>
|
|
1014
|
+
|
|
1015
|
+
<span class='kw'>end</span></pre>
|
|
1016
|
+
</td>
|
|
1017
|
+
</tr>
|
|
1018
|
+
</table>
|
|
1019
|
+
</div>
|
|
1020
|
+
|
|
1021
|
+
<div class="method_details ">
|
|
1022
|
+
<h3 class="signature " id="eval-instance_method">
|
|
1023
|
+
|
|
1024
|
+
- (<tt>Object</tt>) <strong>eval</strong>(expression)
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
</h3><div class="docstring">
|
|
1031
|
+
<div class="discussion">
|
|
1032
|
+
<hr>
|
|
1033
|
+
<hr>
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
</div>
|
|
1037
|
+
</div>
|
|
1038
|
+
<div class="tags">
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
</div><table class="source_code">
|
|
1042
|
+
<tr>
|
|
1043
|
+
<td>
|
|
1044
|
+
<pre class="lines">
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
110
|
|
1048
|
+
111
|
|
1049
|
+
112
|
|
1050
|
+
113
|
|
1051
|
+
114
|
|
1052
|
+
115
|
|
1053
|
+
116
|
|
1054
|
+
117
|
|
1055
|
+
118
|
|
1056
|
+
119
|
|
1057
|
+
120
|
|
1058
|
+
121
|
|
1059
|
+
122
|
|
1060
|
+
123</pre>
|
|
1061
|
+
</td>
|
|
1062
|
+
<td>
|
|
1063
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 110</span>
|
|
1064
|
+
|
|
1065
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span>
|
|
1066
|
+
<span class='kw'>begin</span>
|
|
1067
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='ivar'>@engine</span><span class='period'>.</span><span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span>
|
|
1068
|
+
<span class='kw'>rescue</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>JavaxScript</span><span class='op'>::</span><span class='const'>ScriptException</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
|
1069
|
+
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span>
|
|
1070
|
+
<span class='embdoc_beg'>=begin
|
|
1071
|
+
</span><span class='embdoc'> rescue Java::OrgRenjinParser::ParseException => e
|
|
1072
|
+
</span><span class='embdoc'> p e.message
|
|
1073
|
+
</span><span class='embdoc_end'>=end
|
|
1074
|
+
</span> <span class='kw'>end</span>
|
|
1075
|
+
|
|
1076
|
+
<span class='id identifier rubyid_ret'>ret</span>
|
|
1077
|
+
|
|
1078
|
+
<span class='kw'>end</span></pre>
|
|
1079
|
+
</td>
|
|
1080
|
+
</tr>
|
|
1081
|
+
</table>
|
|
1082
|
+
</div>
|
|
1083
|
+
|
|
1084
|
+
<div class="method_details ">
|
|
1085
|
+
<h3 class="signature " id="install__package-instance_method">
|
|
1086
|
+
|
|
1087
|
+
- (<tt>Object</tt>) <strong>install__package</strong>(name)
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
</h3><div class="docstring">
|
|
1094
|
+
<div class="discussion">
|
|
1095
|
+
<hr>
|
|
1096
|
+
<hr>
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
</div>
|
|
1100
|
+
</div>
|
|
1101
|
+
<div class="tags">
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
</div><table class="source_code">
|
|
1105
|
+
<tr>
|
|
1106
|
+
<td>
|
|
1107
|
+
<pre class="lines">
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
230
|
|
1111
|
+
231
|
|
1112
|
+
232
|
|
1113
|
+
233
|
|
1114
|
+
234
|
|
1115
|
+
235</pre>
|
|
1116
|
+
</td>
|
|
1117
|
+
<td>
|
|
1118
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 230</span>
|
|
1119
|
+
|
|
1120
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_install__package'>install__package</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
1121
|
+
|
|
1122
|
+
<span class='id identifier rubyid_pm'>pm</span> <span class='op'>=</span> <span class='const'>PackageManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
1123
|
+
<span class='id identifier rubyid_pm'>pm</span><span class='period'>.</span><span class='id identifier rubyid_load_package'>load_package</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
1124
|
+
|
|
1125
|
+
<span class='kw'>end</span></pre>
|
|
1126
|
+
</td>
|
|
1127
|
+
</tr>
|
|
1128
|
+
</table>
|
|
1129
|
+
</div>
|
|
1130
|
+
|
|
1131
|
+
<div class="method_details ">
|
|
1132
|
+
<h3 class="signature " id="library-instance_method">
|
|
1133
|
+
|
|
1134
|
+
- (<tt>Object</tt>) <strong>library</strong>(package)
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
</h3><div class="docstring">
|
|
1141
|
+
<div class="discussion">
|
|
1142
|
+
<hr>
|
|
1143
|
+
<hr>
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
</div>
|
|
1147
|
+
</div>
|
|
1148
|
+
<div class="tags">
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
</div><table class="source_code">
|
|
1152
|
+
<tr>
|
|
1153
|
+
<td>
|
|
1154
|
+
<pre class="lines">
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
241
|
|
1158
|
+
242
|
|
1159
|
+
243
|
|
1160
|
+
244
|
|
1161
|
+
245
|
|
1162
|
+
246
|
|
1163
|
+
247
|
|
1164
|
+
248
|
|
1165
|
+
249</pre>
|
|
1166
|
+
</td>
|
|
1167
|
+
<td>
|
|
1168
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 241</span>
|
|
1169
|
+
|
|
1170
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_library'>library</span><span class='lparen'>(</span><span class='id identifier rubyid_package'>package</span><span class='rparen'>)</span>
|
|
1171
|
+
|
|
1172
|
+
<span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span><span class='lparen'>(</span><span class='const'>SciCom</span><span class='period'>.</span><span class='id identifier rubyid_cran_dir'>cran_dir</span><span class='rparen'>)</span>
|
|
1173
|
+
<span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='const'>SciCom</span><span class='period'>.</span><span class='id identifier rubyid_cran_dir'>cran_dir</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_package'>package</span><span class='rbrace'>}</span><span class='tstring_content'>.jar</span><span class='tstring_end'>"</span></span>
|
|
1174
|
+
|
|
1175
|
+
<span class='id identifier rubyid_require'>require</span> <span class='id identifier rubyid_filename'>filename</span>
|
|
1176
|
+
<span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>library(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_package'>package</span><span class='rbrace'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
1177
|
+
|
|
1178
|
+
<span class='kw'>end</span></pre>
|
|
1179
|
+
</td>
|
|
1180
|
+
</tr>
|
|
1181
|
+
</table>
|
|
1182
|
+
</div>
|
|
1183
|
+
|
|
1184
|
+
<div class="method_details ">
|
|
1185
|
+
<h3 class="signature " id="parse-instance_method">
|
|
1186
|
+
|
|
1187
|
+
- (<tt>Object</tt>) <strong>parse</strong>(*args)
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
</h3><div class="docstring">
|
|
1194
|
+
<div class="discussion">
|
|
1195
|
+
<hr>
|
|
1196
|
+
<hr>
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
</div>
|
|
1200
|
+
</div>
|
|
1201
|
+
<div class="tags">
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
</div><table class="source_code">
|
|
1205
|
+
<tr>
|
|
1206
|
+
<td>
|
|
1207
|
+
<pre class="lines">
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
152
|
|
1211
|
+
153
|
|
1212
|
+
154
|
|
1213
|
+
155
|
|
1214
|
+
156
|
|
1215
|
+
157
|
|
1216
|
+
158
|
|
1217
|
+
159
|
|
1218
|
+
160
|
|
1219
|
+
161
|
|
1220
|
+
162
|
|
1221
|
+
163
|
|
1222
|
+
164
|
|
1223
|
+
165
|
|
1224
|
+
166
|
|
1225
|
+
167
|
|
1226
|
+
168
|
|
1227
|
+
169
|
|
1228
|
+
170
|
|
1229
|
+
171
|
|
1230
|
+
172
|
|
1231
|
+
173
|
|
1232
|
+
174
|
|
1233
|
+
175
|
|
1234
|
+
176
|
|
1235
|
+
177
|
|
1236
|
+
178
|
|
1237
|
+
179
|
|
1238
|
+
180
|
|
1239
|
+
181
|
|
1240
|
+
182
|
|
1241
|
+
183
|
|
1242
|
+
184
|
|
1243
|
+
185
|
|
1244
|
+
186
|
|
1245
|
+
187
|
|
1246
|
+
188
|
|
1247
|
+
189
|
|
1248
|
+
190
|
|
1249
|
+
191
|
|
1250
|
+
192</pre>
|
|
1251
|
+
</td>
|
|
1252
|
+
<td>
|
|
1253
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 152</span>
|
|
1254
|
+
|
|
1255
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
1256
|
+
|
|
1257
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
1258
|
+
|
|
1259
|
+
<span class='id identifier rubyid_args'>args</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_arg'>arg</span><span class='op'>|</span>
|
|
1260
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Numeric</span><span class='rparen'>)</span>
|
|
1261
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='id identifier rubyid_arg'>arg</span>
|
|
1262
|
+
<span class='kw'>elsif</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>String</span><span class='rparen'>)</span>
|
|
1263
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_arg'>arg</span><span class='rbrace'>}</span><span class='tstring_content'>\"</span><span class='tstring_end'>"</span></span>
|
|
1264
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Symbol</span><span class='rparen'>)</span>
|
|
1265
|
+
<span class='id identifier rubyid_var'>var</span> <span class='op'>=</span> <span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
1266
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span>
|
|
1267
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>TrueClass</span><span class='rparen'>)</span>
|
|
1268
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>TRUE</span><span class='tstring_end'>"</span></span>
|
|
1269
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>FalseClass</span><span class='rparen'>)</span>
|
|
1270
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FALSE</span><span class='tstring_end'>"</span></span>
|
|
1271
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span> <span class='op'>==</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
1272
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>NULL</span><span class='tstring_end'>"</span></span>
|
|
1273
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>NegRange</span><span class='rparen'>)</span>
|
|
1274
|
+
<span class='id identifier rubyid_final_value'>final_value</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_exclude_end?'>exclude_end?</span><span class='rparen'>)</span><span class='op'>?</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span>
|
|
1275
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>-(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_final_value'>final_value</span><span class='rbrace'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
|
1276
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Range</span><span class='rparen'>)</span>
|
|
1277
|
+
<span class='id identifier rubyid_final_value'>final_value</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_exclude_end?'>exclude_end?</span><span class='rparen'>)</span><span class='op'>?</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span>
|
|
1278
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_final_value'>final_value</span><span class='rbrace'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
|
1279
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Hash</span><span class='rparen'>)</span>
|
|
1280
|
+
<span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
|
1281
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_content'> = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
1282
|
+
<span class='kw'>end</span>
|
|
1283
|
+
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Renjin</span><span class='op'>::</span><span class='const'>RubySexp</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>MDArray</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
1284
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'><<</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span>
|
|
1285
|
+
<span class='comment'># elsif
|
|
1286
|
+
</span> <span class='comment'># params << arg.inspect
|
|
1287
|
+
</span> <span class='kw'>else</span>
|
|
1288
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unknown parameter type for R: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_arg'>arg</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
1289
|
+
<span class='kw'>end</span>
|
|
1290
|
+
|
|
1291
|
+
<span class='kw'>end</span>
|
|
1292
|
+
|
|
1293
|
+
<span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>,</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
1294
|
+
|
|
1295
|
+
<span class='kw'>end</span></pre>
|
|
1296
|
+
</td>
|
|
1297
|
+
</tr>
|
|
1298
|
+
</table>
|
|
1299
|
+
</div>
|
|
1300
|
+
|
|
1301
|
+
<div class="method_details ">
|
|
1302
|
+
<h3 class="signature " id="pull-instance_method">
|
|
1303
|
+
|
|
1304
|
+
- (<tt>Object</tt>) <strong>pull</strong>(name)
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
</h3><div class="docstring">
|
|
1311
|
+
<div class="discussion">
|
|
1312
|
+
<hr>
|
|
1313
|
+
<hr>
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
</div>
|
|
1317
|
+
</div>
|
|
1318
|
+
<div class="tags">
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
</div><table class="source_code">
|
|
1322
|
+
<tr>
|
|
1323
|
+
<td>
|
|
1324
|
+
<pre class="lines">
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
222
|
|
1328
|
+
223
|
|
1329
|
+
224</pre>
|
|
1330
|
+
</td>
|
|
1331
|
+
<td>
|
|
1332
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 222</span>
|
|
1333
|
+
|
|
1334
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pull'>pull</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
1335
|
+
<span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
1336
|
+
<span class='kw'>end</span></pre>
|
|
1337
|
+
</td>
|
|
1338
|
+
</tr>
|
|
1339
|
+
</table>
|
|
1340
|
+
</div>
|
|
1341
|
+
|
|
1342
|
+
<div class="method_details ">
|
|
1343
|
+
<h3 class="signature " id="start-instance_method">
|
|
1344
|
+
|
|
1345
|
+
- (<tt>Object</tt>) <strong>start</strong>(stage)
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
</h3><table class="source_code">
|
|
1352
|
+
<tr>
|
|
1353
|
+
<td>
|
|
1354
|
+
<pre class="lines">
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
43
|
|
1358
|
+
44
|
|
1359
|
+
45
|
|
1360
|
+
46
|
|
1361
|
+
47
|
|
1362
|
+
48
|
|
1363
|
+
49
|
|
1364
|
+
50
|
|
1365
|
+
51
|
|
1366
|
+
52
|
|
1367
|
+
53
|
|
1368
|
+
54
|
|
1369
|
+
55
|
|
1370
|
+
56
|
|
1371
|
+
57</pre>
|
|
1372
|
+
</td>
|
|
1373
|
+
<td>
|
|
1374
|
+
<pre class="code"><span class="info file"># File 'lib/nashorn/nashorn.rb', line 43</span>
|
|
1375
|
+
|
|
1376
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_stage'>stage</span><span class='rparen'>)</span>
|
|
1377
|
+
|
|
1378
|
+
<span class='comment'># Create a WebView and get a web_engine
|
|
1379
|
+
</span> <span class='ivar'>@browser</span> <span class='op'>=</span> <span class='const'>WebView</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
1380
|
+
<span class='ivar'>@window</span> <span class='op'>=</span> <span class='id identifier rubyid_browser'>browser</span><span class='period'>.</span><span class='id identifier rubyid_engine'>engine</span><span class='period'>.</span><span class='id identifier rubyid_executeScript'>executeScript</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>window</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
1381
|
+
<span class='ivar'>@web_engine</span> <span class='op'>=</span> <span class='id identifier rubyid_browser'>browser</span><span class='period'>.</span><span class='id identifier rubyid_getEngine'>getEngine</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
|
1382
|
+
<span class='ivar'>@web_engine</span><span class='period'>.</span><span class='id identifier rubyid_setJavaScriptEnabled'>setJavaScriptEnabled</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
|
|
1383
|
+
|
|
1384
|
+
<span class='comment'># Create a Nashorn engine
|
|
1385
|
+
</span> <span class='id identifier rubyid_factory'>factory</span> <span class='op'>=</span> <span class='const'>Java</span><span class='op'>::</span><span class='const'>JavaxScript</span><span class='period'>.</span><span class='const'>ScriptEngineManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
|
1386
|
+
<span class='ivar'>@engine</span> <span class='op'>=</span> <span class='id identifier rubyid_factory'>factory</span><span class='period'>.</span><span class='id identifier rubyid_getEngineByName'>getEngineByName</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>nashorn</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
1387
|
+
|
|
1388
|
+
<span class='comment'># JSAdapter.new
|
|
1389
|
+
</span>
|
|
1390
|
+
<span class='kw'>end</span></pre>
|
|
1391
|
+
</td>
|
|
1392
|
+
</tr>
|
|
1393
|
+
</table>
|
|
1394
|
+
</div>
|
|
1395
|
+
|
|
1396
|
+
</div>
|
|
1397
|
+
|
|
1398
|
+
</div>
|
|
1399
|
+
|
|
1400
|
+
<div id="footer">
|
|
1401
|
+
Generated on Tue Jul 14 18:09:12 2015 by
|
|
1402
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1403
|
+
0.8.7.6 (ruby-1.9.3).
|
|
1404
|
+
</div>
|
|
1405
|
+
|
|
1406
|
+
</body>
|
|
1407
|
+
</html>
|