| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Statistics::RserveClient; |
|
2
|
1
|
|
|
1
|
|
35658
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
38
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use Exporter (); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
21
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
|
|
1
|
|
|
|
|
7
|
|
|
|
1
|
|
|
|
|
272
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.12'; #VERSION |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
|
10
|
|
|
|
|
|
|
our @EXPORT = qw( TRUE FALSE ); |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @EXPORT_OK = ( |
|
13
|
|
|
|
|
|
|
'XT_NULL', 'XT_INT', |
|
14
|
|
|
|
|
|
|
'XT_DOUBLE', 'XT_STR', |
|
15
|
|
|
|
|
|
|
'XT_LANG', 'XT_SYM', |
|
16
|
|
|
|
|
|
|
'XT_BOOL', 'XT_S4', |
|
17
|
|
|
|
|
|
|
'XT_VECTOR', 'XT_LIST', |
|
18
|
|
|
|
|
|
|
'XT_CLOS', 'XT_SYMNAME', |
|
19
|
|
|
|
|
|
|
'XT_LIST_NOTAG', 'XT_LIST_TAG', |
|
20
|
|
|
|
|
|
|
'XT_LANG_NOTAG', 'XT_LANG_TAG', |
|
21
|
|
|
|
|
|
|
'XT_VECTOR_EXP', 'XT_VECTOR_STR', |
|
22
|
|
|
|
|
|
|
'XT_ARRAY_INT', 'XT_ARRAY_DOUBLE', |
|
23
|
|
|
|
|
|
|
'XT_ARRAY_STR', 'XT_ARRAY_BOOL_UA', |
|
24
|
|
|
|
|
|
|
'XT_ARRAY_BOOL', 'XT_RAW', |
|
25
|
|
|
|
|
|
|
'XT_ARRAY_CPLX', 'XT_UNKNOWN', |
|
26
|
|
|
|
|
|
|
'XT_FACTOR', 'XT_HAS_ATTR', |
|
27
|
|
|
|
|
|
|
); |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
|
30
|
|
|
|
|
|
|
xt_types => [ |
|
31
|
|
|
|
|
|
|
'XT_NULL', 'XT_INT', |
|
32
|
|
|
|
|
|
|
'XT_DOUBLE', 'XT_STR', |
|
33
|
|
|
|
|
|
|
'XT_LANG', 'XT_SYM', |
|
34
|
|
|
|
|
|
|
'XT_BOOL', 'XT_S4', |
|
35
|
|
|
|
|
|
|
'XT_VECTOR', 'XT_LIST', |
|
36
|
|
|
|
|
|
|
'XT_CLOS', 'XT_SYMNAME', |
|
37
|
|
|
|
|
|
|
'XT_LIST_NOTAG', 'XT_LIST_TAG', |
|
38
|
|
|
|
|
|
|
'XT_LANG_NOTAG', 'XT_LANG_TAG', |
|
39
|
|
|
|
|
|
|
'XT_VECTOR_EXP', 'XT_VECTOR_STR', |
|
40
|
|
|
|
|
|
|
'XT_ARRAY_INT', 'XT_ARRAY_DOUBLE', |
|
41
|
|
|
|
|
|
|
'XT_ARRAY_STR', 'XT_ARRAY_BOOL_UA', |
|
42
|
|
|
|
|
|
|
'XT_ARRAY_BOOL', 'XT_RAW', |
|
43
|
|
|
|
|
|
|
'XT_ARRAY_CPLX', 'XT_UNKNOWN', |
|
44
|
|
|
|
|
|
|
'XT_FACTOR', 'XT_HAS_ATTR', |
|
45
|
|
|
|
|
|
|
] |
|
46
|
|
|
|
|
|
|
); |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
#################### main pod documentation begin ################### |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 NAME |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Statistics::RserveClient - An Rserve Client library for the R statistics platform. |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
use Statistics::RserveClient::Connection; |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $cnx = new Statistics::RserveClient::Connection('localhost'); |
|
60
|
|
|
|
|
|
|
my @result = $cnx->evalString("x='Hello, world!'; x"); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Rserve provides a connection-oriented network interface to the R |
|
65
|
|
|
|
|
|
|
statistical platform. The Statistics::RserveClient package provides a |
|
66
|
|
|
|
|
|
|
Perl client library to enable interaction with Rserve from within Perl |
|
67
|
|
|
|
|
|
|
applications. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Using RserveClient, your Perl application can pass strings to Rserve |
|
70
|
|
|
|
|
|
|
for evaluation by R. The results are returned as Perl arrays. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 USAGE |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
use Statistics::RserveClient::Connection; |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
my $cnx = new Statistics::RserveClient::Connection('localhost'); |
|
77
|
|
|
|
|
|
|
my @result = $cnx->evalString("x='Hello, world!'; x"); |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 BUGS |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This library does not yet support the full rserve protocol. For |
|
83
|
|
|
|
|
|
|
example, long packets are not supported. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SUPPORT |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Please visit http://github.com/djun-kim/Statistics--RserveClient to |
|
88
|
|
|
|
|
|
|
view/file bug reports and feature requests and to browse additional |
|
89
|
|
|
|
|
|
|
documentation. |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 AUTHOR |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Djun M. Kim |
|
94
|
|
|
|
|
|
|
CPAN ID: DJUNKIM |
|
95
|
|
|
|
|
|
|
Cielo Systems Inc. |
|
96
|
|
|
|
|
|
|
info@cielosystems.com |
|
97
|
|
|
|
|
|
|
http://github.org/djun-kim/Statistics--RserveClient/wiki |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This program is free software licensed under the... |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
The General Public License (GPL) |
|
104
|
|
|
|
|
|
|
Version 2, June 1991 |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
The full text of the license can be found in the |
|
107
|
|
|
|
|
|
|
LICENSE file included with this module. |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This software was partially funded through the financial assistance of |
|
112
|
|
|
|
|
|
|
the University of British Columbia, via a Teaching and Learning |
|
113
|
|
|
|
|
|
|
Enhancement Fund project led by Dr. Bruce Dunham (UBC Statistics). |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
The author would also like to thank Dr. Davor Cubranic (UBC |
|
116
|
|
|
|
|
|
|
Statistics) for many improvements to the code, in particular most of |
|
117
|
|
|
|
|
|
|
the tests. |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
rserve: (http://www.rforge.net/Rserve/) |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
R project: http://r-project.org |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
#################### main pod documentation end ################### |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
#use warnings; |
|
130
|
|
|
|
|
|
|
#use autodie; |
|
131
|
|
|
|
|
|
|
|
|
132
|
1
|
|
|
1
|
|
6
|
use constant FALSE => 0; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
85
|
|
|
133
|
1
|
|
|
1
|
|
5
|
use constant TRUE => 1; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
48
|
|
|
134
|
|
|
|
|
|
|
|
|
135
|
1
|
|
|
1
|
|
5
|
use constant DebugLogfile => "/tmp/rserve-debug.log"; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
361
|
|
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
open(DEBUGLOG, '>'.DebugLogfile) or die("can't open debug log: $!\n"); |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
my %typeHash = (); |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
my $DEBUG = FALSE; |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
## |
|
144
|
|
|
|
|
|
|
# =head2 debug() |
|
145
|
|
|
|
|
|
|
# |
|
146
|
|
|
|
|
|
|
# Usage : debug("This is a debug message;"); |
|
147
|
|
|
|
|
|
|
# Purpose : Prints a string to the debugging output stream. |
|
148
|
|
|
|
|
|
|
# Argument : A string to be output to the debug stream. |
|
149
|
|
|
|
|
|
|
# |
|
150
|
|
|
|
|
|
|
# =cut |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
sub debug($) { |
|
153
|
0
|
|
|
0
|
0
|
0
|
my $msg = shift; |
|
154
|
0
|
|
|
|
|
0
|
$msg = "debug [". caller() . "] $msg"; |
|
155
|
0
|
0
|
|
|
|
0
|
print DEBUGLOG $msg if ($DEBUG); |
|
156
|
0
|
|
|
|
|
0
|
return 1; |
|
157
|
|
|
|
|
|
|
} |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
## |
|
160
|
|
|
|
|
|
|
# =head2 buf2str() |
|
161
|
|
|
|
|
|
|
# |
|
162
|
|
|
|
|
|
|
# Usage : buf2str(\@buf); |
|
163
|
|
|
|
|
|
|
# Purpose : Takes a (reference to) a given array and returns a string representation |
|
164
|
|
|
|
|
|
|
# Argument : A reference to an array. |
|
165
|
|
|
|
|
|
|
# Returns : A string representation of the given array. |
|
166
|
|
|
|
|
|
|
# Comments : Utility routine, intended to help printing debugging output. |
|
167
|
|
|
|
|
|
|
# |
|
168
|
|
|
|
|
|
|
# =cut |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub buf2str { |
|
171
|
0
|
|
|
0
|
0
|
0
|
my $r = shift; |
|
172
|
0
|
|
|
|
|
0
|
my @buf = @{$r}; |
|
|
0
|
|
|
|
|
0
|
|
|
173
|
0
|
|
|
|
|
0
|
my $pbuf = ""; |
|
174
|
0
|
|
|
|
|
0
|
for (my $idx = 0; $idx < @buf; $idx++) { |
|
175
|
0
|
|
|
|
|
0
|
my $c = $buf[$idx]; |
|
176
|
0
|
|
|
|
|
0
|
my $ord = ord($c); |
|
177
|
0
|
0
|
|
|
|
0
|
if ($ord < ord('A')) { |
|
178
|
0
|
|
|
|
|
0
|
$c = ""; |
|
179
|
|
|
|
|
|
|
} |
|
180
|
0
|
|
|
|
|
0
|
$pbuf .= "[$idx:$ord:$c]"; |
|
181
|
0
|
0
|
|
|
|
0
|
if ($idx % 8 == 7) {$pbuf .= "\n"}; |
|
|
0
|
|
|
|
|
0
|
|
|
182
|
|
|
|
|
|
|
}; |
|
183
|
0
|
|
|
|
|
0
|
return $pbuf; |
|
184
|
|
|
|
|
|
|
} |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
# xpression type: NULL |
|
187
|
1
|
|
|
1
|
|
5
|
use constant XT_NULL => 0; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
55
|
|
|
188
|
|
|
|
|
|
|
$typeHash{0} = 'XT_NULL'; |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
# xpression type: integer |
|
191
|
1
|
|
|
1
|
|
5
|
use constant XT_INT => 1; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
53
|
|
|
192
|
|
|
|
|
|
|
$typeHash{1} = 'XT_INT'; |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
# xpression type: double |
|
195
|
1
|
|
|
1
|
|
5
|
use constant XT_DOUBLE => 2; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
47
|
|
|
196
|
|
|
|
|
|
|
$typeHash{2} = 'XT_DOUBLE'; |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
# xpression type: String |
|
199
|
1
|
|
|
1
|
|
5
|
use constant XT_STR => 3; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
51
|
|
|
200
|
|
|
|
|
|
|
$typeHash{3} = 'XT_STR'; |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
# xpression type: language construct (currently content is same as list) |
|
203
|
1
|
|
|
1
|
|
4
|
use constant XT_LANG => 4; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
204
|
|
|
|
|
|
|
$typeHash{4} = 'XT_LANG'; |
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
# xpression type: symbol (content is symbol name: String) |
|
207
|
1
|
|
|
1
|
|
5
|
use constant XT_SYM => 5; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
62
|
|
|
208
|
|
|
|
|
|
|
$typeHash{5} = 'XT_SYM'; |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
# xpression type: RBool |
|
211
|
1
|
|
|
1
|
|
4
|
use constant XT_BOOL => 6; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
212
|
|
|
|
|
|
|
$typeHash{6} = 'XT_BOOL'; |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
# xpression type: S4 object |
|
215
|
|
|
|
|
|
|
# @since Rserve 0.5 |
|
216
|
1
|
|
|
1
|
|
16
|
use constant XT_S4 => 7; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
52
|
|
|
217
|
|
|
|
|
|
|
$typeHash{7} = 'XT_S4'; |
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
# xpression type: generic vector (RList) |
|
220
|
1
|
|
|
1
|
|
5
|
use constant XT_VECTOR => 16; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
56
|
|
|
221
|
|
|
|
|
|
|
$typeHash{16} = 'XT_VECTOR'; |
|
222
|
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
# xpression type: dotted-pair list (RList) |
|
224
|
1
|
|
|
1
|
|
4
|
use constant XT_LIST => 17; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
225
|
|
|
|
|
|
|
$typeHash{17} = 'XT_LIST'; |
|
226
|
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
# xpression type: closure |
|
228
|
|
|
|
|
|
|
# (there is no java class for that type (yet?). |
|
229
|
|
|
|
|
|
|
# Currently the body of the closure is stored in the content |
|
230
|
|
|
|
|
|
|
# part of the REXP. Please note that this may change in the future!) |
|
231
|
1
|
|
|
1
|
|
20
|
use constant XT_CLOS => 18; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
54
|
|
|
232
|
|
|
|
|
|
|
$typeHash{18} = 'XT_CLOS'; |
|
233
|
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
# xpression type: symbol name |
|
235
|
|
|
|
|
|
|
# @since Rserve 0.5 |
|
236
|
1
|
|
|
1
|
|
5
|
use constant XT_SYMNAME => 19; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
49
|
|
|
237
|
|
|
|
|
|
|
$typeHash{19} = 'XT_SYMNAME'; |
|
238
|
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
# xpression type: dotted-pair list (w/o tags) |
|
240
|
|
|
|
|
|
|
# @since Rserve 0.5 |
|
241
|
1
|
|
|
1
|
|
4
|
use constant XT_LIST_NOTAG => 20; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
56
|
|
|
242
|
|
|
|
|
|
|
$typeHash{20} = 'LIST_NOTAG'; |
|
243
|
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
# xpression type: dotted-pair list (w tags) |
|
245
|
|
|
|
|
|
|
# @since Rserve 0.5 |
|
246
|
1
|
|
|
1
|
|
4
|
use constant XT_LIST_TAG => 21; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
72
|
|
|
247
|
|
|
|
|
|
|
$typeHash{21} = 'LIST_TAG'; |
|
248
|
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
# xpression type: language list (w/o tags) |
|
250
|
|
|
|
|
|
|
# @since Rserve 0.5 |
|
251
|
1
|
|
|
1
|
|
6
|
use constant XT_LANG_NOTAG => 22; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
42
|
|
|
252
|
|
|
|
|
|
|
$typeHash{22} = 'LANG_NOTAG'; |
|
253
|
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
# xpression type: language list (w tags) |
|
255
|
|
|
|
|
|
|
# @since Rserve 0.5 |
|
256
|
1
|
|
|
1
|
|
4
|
use constant XT_LANG_TAG => 23; |
|
|
1
|
|
|
|
|
8
|
|
|
|
1
|
|
|
|
|
43
|
|
|
257
|
|
|
|
|
|
|
$typeHash{23} = 'LANG_TAG'; |
|
258
|
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
# xpression type: expression vector |
|
260
|
1
|
|
|
1
|
|
5
|
use constant XT_VECTOR_EXP => 26; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
48
|
|
|
261
|
|
|
|
|
|
|
$typeHash{26} = 'VECTOR_EXP'; |
|
262
|
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
# xpression type: string vector |
|
264
|
1
|
|
|
1
|
|
5
|
use constant XT_VECTOR_STR => 27; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
41
|
|
|
265
|
|
|
|
|
|
|
$typeHash{27} = 'VECTOR_STR'; |
|
266
|
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
# xpression type: int[] |
|
268
|
1
|
|
|
1
|
|
4
|
use constant XT_ARRAY_INT => 32; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
52
|
|
|
269
|
|
|
|
|
|
|
$typeHash{32} = 'ARRAY_INT'; |
|
270
|
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
# xpression type: double[] |
|
272
|
1
|
|
|
1
|
|
4
|
use constant XT_ARRAY_DOUBLE => 33; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
60
|
|
|
273
|
|
|
|
|
|
|
$typeHash{33} = 'ARRAY_DOUBLE'; |
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
# xpression type: String[] (currently not used, Vector is used instead) |
|
276
|
1
|
|
|
1
|
|
5
|
use constant XT_ARRAY_STR => 34; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
47
|
|
|
277
|
|
|
|
|
|
|
$typeHash{34} = 'ARRAY_STR'; |
|
278
|
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
# internal use only! this constant should never appear in a REXP |
|
280
|
1
|
|
|
1
|
|
5
|
use constant XT_ARRAY_BOOL_UA => 35; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
52
|
|
|
281
|
|
|
|
|
|
|
$typeHash{35} = 'XT_ARRAY_BOOL_UA'; |
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
# xpression type: RBool[] |
|
284
|
1
|
|
|
1
|
|
4
|
use constant XT_ARRAY_BOOL => 36; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
50
|
|
|
285
|
|
|
|
|
|
|
$typeHash{36} = 'XT_ARRAY_BOOL'; |
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
# xpression type: raw (byte[]) |
|
288
|
|
|
|
|
|
|
# @since Rserve 0.4-? |
|
289
|
1
|
|
|
1
|
|
4
|
use constant XT_RAW => 37; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
43
|
|
|
290
|
|
|
|
|
|
|
$typeHash{37} = 'XT_RAW'; |
|
291
|
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
# xpression type: Complex[] |
|
293
|
|
|
|
|
|
|
# @since Rserve 0.5 |
|
294
|
1
|
|
|
1
|
|
5
|
use constant XT_ARRAY_CPLX => 38; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
48
|
|
|
295
|
|
|
|
|
|
|
$typeHash{38} = 'ARRAY_CPLX'; |
|
296
|
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
# xpression type: unknown; no assumptions can be made about the content |
|
298
|
1
|
|
|
1
|
|
5
|
use constant XT_UNKNOWN => 48; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
42
|
|
|
299
|
|
|
|
|
|
|
$typeHash{48} = 'XT_UNKNOWN'; |
|
300
|
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
# xpression type: RFactor; this XT is internally generated (ergo is |
|
302
|
|
|
|
|
|
|
# does not come from Rsrv.h) to support RFactor class which is built |
|
303
|
|
|
|
|
|
|
# from XT_ARRAY_INT |
|
304
|
1
|
|
|
1
|
|
4
|
use constant XT_FACTOR => 127; |
|
|
1
|
|
|
|
|
11
|
|
|
|
1
|
|
|
|
|
532
|
|
|
305
|
|
|
|
|
|
|
$typeHash{127} = 'XT_FACTOR'; |
|
306
|
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
# used for transport only - has attribute |
|
308
|
1
|
|
|
1
|
|
6
|
use constant XT_HAS_ATTR => 128; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
157
|
|
|
309
|
|
|
|
|
|
|
$typeHash{128} = 'HAS_ATTR'; |
|
310
|
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
sub import { |
|
312
|
|
|
|
|
|
|
|
|
313
|
1
|
|
|
1
|
|
125
|
Statistics::RserveClient->export_to_level( 1, @_ ); |
|
314
|
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
} |
|
316
|
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
1; |
|
319
|
|
|
|
|
|
|
# The preceding line will help the module return a true value |