ReFRACtor
lua_blitz.cc
Go to the documentation of this file.
1 #include "register_lua.h"
2 #include <blitz/array.h>
3 using namespace FullPhysics;
4 using namespace blitz;
5 
6 //-----------------------------------------------------------------------
8 //-----------------------------------------------------------------------
9 
10 // double 1d
11 double blitz_double_array_1d_read(const Array<double, 1>& V, int i)
12 { range_check(i, 0, V.rows()); return V(i); }
13 blitz::Array<double, 1> blitz_double_array_1d_slice(const Array<double, 1>& V, Range i)
14 { return V(i); }
15 void blitz_double_array_1d_set_i(Array<double, 1>& V, int i, double v)
16 { range_check(i, 0, V.rows()); V(i) = v; }
17 void blitz_double_array_1d_set_r_val(Array<double, 1>& V, Range r, double v)
18 { V(r) = v; }
19 void blitz_double_array_1d_set_r_arr(Array<double, 1>& V, Range r, Array<double, 1>& v)
20 { V(r) = v; }
21 
22 std::string blitz_double_array_1d_tostring(const Array<double, 1>& V)
23 {
24  std::ostringstream os;
25  os << "Array<double, 1>: " << V;
26  return os.str();
27 }
28 
29 // int 1d
30 int blitz_int_array_1d_read(const Array<int, 1>& V, int i)
31 { range_check(i, 0, V.rows()); return V(i); }
32 void blitz_int_array_1d_set_i(Array<int, 1>& V, int i, int v)
33 { range_check(i, 0, V.rows()); V(i) = v; }
34 void blitz_int_array_1d_set_r(Array<int, 1>& V, Range r, int v)
35 { V(r) = v; }
36 
37 std::string blitz_int_array_1d_tostring(const Array<int, 1>& V)
38 {
39  std::ostringstream os;
40  os << "Array<int, 1>: " << V;
41  return os.str();
42 }
43 
44 // bool 1d
45 bool blitz_bool_array_1d_read(const Array<bool, 1>& V, int i)
46 { range_check(i, 0, V.rows()); return V(i); }
47 void blitz_bool_array_1d_set_i(Array<bool, 1>& V, int i, bool v)
48 { range_check(i, 0, V.rows()); V(i) = v; }
49 void blitz_bool_array_1d_set_r(Array<bool, 1>& V, Range r, bool v)
50 { V(r) = v; }
51 
52 std::string blitz_bool_array_1d_tostring(const Array<bool, 1>& V)
53 {
54  std::ostringstream os;
55  os << "Array<bool, 1>: " << V;
56  return os.str();
57 }
58 
59 // double 2d
60 double blitz_double_array_2d_read(const Array<double, 2>& V, int i, int j)
61 { range_check(i, 0, V.rows());
62  range_check(j, 0, V.cols());
63  return V(i, j); }
64 blitz::Array<double, 2> blitz_double_array_2d_slice_rr(const Array<double, 2>& V, Range i, Range j)
65 { return V(i, j); }
66 blitz::Array<double, 1> blitz_double_array_2d_slice_ir(const Array<double, 2>& V, int i, Range j)
67 { range_check(i, 0, V.rows()); return V(i, j); }
68 blitz::Array<double, 1> blitz_double_array_2d_slice_ri(const Array<double, 2>& V, Range i, int j)
69 { range_check(j, 0, V.cols()); return V(i, j); }
70 
71 void blitz_double_array_2d_set_ii(Array<double, 2>& V, int i, int j, double v)
72 { range_check(i, 0, V.rows());
73  range_check(j, 0, V.cols());
74  V(i, j) = v; }
75 void blitz_double_array_2d_set_ri(Array<double, 2>& V, Range i, int j, double v)
76 { range_check(j, 0, V.cols());
77  V(i, j) = v; }
78 void blitz_double_array_2d_set_ir(Array<double, 2>& V, int i, Range j, double v)
79 { range_check(i, 0, V.rows()); V(i, j) = v; }
80 void blitz_double_array_2d_set_rr(Array<double, 2>& V, Range i, Range j, double v)
81 { V(i, j) = v; }
82 void blitz_double_array_2d_set_arr_ri(Array<double, 2>& V, Range i, int j, Array<double, 1> v)
83 { range_check(j, 0, V.cols()); V(i, j) = v; }
84 void blitz_double_array_2d_set_arr_ir(Array<double, 2>& V, int i, Range j, Array<double, 1> v)
85 { range_check(i, 0, V.rows()); V(i, j) = v; }
86 void blitz_double_array_2d_set_arr_rr(Array<double, 2>& V, Range i, Range j, Array<double, 2> v)
87 { V(i, j) = v; }
88 
89 std::string blitz_double_array_2d_tostring(const Array<double, 2>& V)
90 {
91  std::ostringstream os;
92  os << "Array<double, 2>: " << V;
93  return os.str();
94 }
95 
96 // int 2d
97 int blitz_int_array_2d_read(const Array<int, 2>& V, int i, int j)
98 { range_check(i, 0, V.rows());
99  range_check(j, 0, V.cols());
100  return V(i, j); }
101 blitz::Array<int, 2> blitz_int_array_2d_slice_rr(const Array<int, 2>& V, Range i, Range j)
102 { return V(i, j); }
103 blitz::Array<int, 1> blitz_int_array_2d_slice_ir(const Array<int, 2>& V, int i, Range j)
104 { range_check(i, 0, V.rows());
105  return V(i, j); }
106 blitz::Array<int, 1> blitz_int_array_2d_slice_ri(const Array<int, 2>& V, Range i, int j)
107 { range_check(j, 0, V.cols());
108  return V(i, j); }
109 
110 void blitz_int_array_2d_set_ii(Array<int, 2>& V, int i, int j, int v)
111 { range_check(i, 0, V.rows());
112  range_check(j, 0, V.cols());
113  V(i, j) = v; }
114 void blitz_int_array_2d_set_ri(Array<int, 2>& V, Range i, int j, int v)
115 {range_check(j, 0, V.cols());
116  V(i, j) = v; }
117 void blitz_int_array_2d_set_ir(Array<int, 2>& V, int i, Range j, int v)
118 { range_check(i, 0, V.rows()); V(i, j) = v; }
119 void blitz_int_array_2d_set_rr(Array<int, 2>& V, Range i, Range j, int v)
120 { V(i, j) = v; }
121 void blitz_int_array_2d_set_arr_ri(Array<int, 2>& V, Range i, int j, Array<int, 1> v)
122 { range_check(j, 0, V.cols()); V(i, j) = v; }
123 void blitz_int_array_2d_set_arr_ir(Array<int, 2>& V, int i, Range j, Array<int, 1> v)
124 { range_check(i, 0, V.rows()); V(i, j) = v; }
125 void blitz_int_array_2d_set_arr_rr(Array<int, 2>& V, Range i, Range j, Array<int, 2> v)
126 { V(i, j) = v; }
127 
128 std::string blitz_int_array_2d_tostring(const Array<int, 2>& V)
129 {
130  std::ostringstream os;
131  os << "Array<int, 2>: " << V;
132  return os.str();
133 }
134 
135 // bool 2d
136 bool blitz_bool_array_2d_read(const Array<bool, 2>& V, int i, int j)
137 { range_check(i, 0, V.rows());
138  range_check(j, 0, V.cols());
139  return V(i, j); }
140 blitz::Array<bool, 2> blitz_bool_array_2d_slice_rr(const Array<bool, 2>& V, Range i, Range j)
141 { return V(i, j); }
142 blitz::Array<bool, 1> blitz_bool_array_2d_slice_ir(const Array<bool, 2>& V, int i, Range j)
143 { range_check(i, 0, V.rows());
144  return V(i, j); }
145 blitz::Array<bool, 1> blitz_bool_array_2d_slice_ri(const Array<bool, 2>& V, Range i, int j)
146 { range_check(j, 0, V.cols());
147  return V(i, j); }
148 
149 void blitz_bool_array_2d_set_ii(Array<bool, 2>& V, int i, int j, bool v)
150 { range_check(i, 0, V.rows());
151  range_check(j, 0, V.cols());
152  V(i, j) = v; }
153 void blitz_bool_array_2d_set_ri(Array<bool, 2>& V, Range i, int j, bool v)
154 { range_check(j, 0, V.cols());
155  V(i, j) = v; }
156 void blitz_bool_array_2d_set_ir(Array<bool, 2>& V, int i, Range j, bool v)
157 { range_check(i, 0, V.rows());
158  V(i, j) = v; }
159 void blitz_bool_array_2d_set_rr(Array<bool, 2>& V, Range i, Range j, bool v)
160 { V(i, j) = v; }
161 void blitz_bool_array_2d_set_arr_ri(Array<bool, 2>& V, Range i, int j, Array<bool, 1> v)
162 { range_check(j, 0, V.cols()); V(i, j) = v; }
163 void blitz_bool_array_2d_set_arr_ir(Array<bool, 2>& V, int i, Range j, Array<bool, 1> v)
164 { range_check(i, 0, V.rows()); V(i, j) = v; }
165 void blitz_bool_array_2d_set_arr_rr(Array<bool, 2>& V, Range i, Range j, Array<bool, 2> v)
166 { V(i, j) = v; }
167 
168 std::string blitz_bool_array_2d_tostring(const Array<bool, 2>& V)
169 {
170  std::ostringstream os;
171  os << "Array<bool, 2>: " << V;
172  return os.str();
173 }
174 
175 // double 3d
176 double blitz_double_array_3d_read(const Array<double, 3>& V, int i, int j, int k)
177 { return V(i, j, k); }
178 
179 blitz::Array<double, 3> blitz_double_array_3d_slice_rrr(const Array<double, 3>& V, Range i, Range j, Range k)
180 { return V(i, j, k); }
181 blitz::Array<double, 2> blitz_double_array_3d_slice_irr(const Array<double, 3>& V, int i, Range j, Range k)
182 { return V(i, j, k); }
183 blitz::Array<double, 2> blitz_double_array_3d_slice_rir(const Array<double, 3>& V, Range i, int j, Range k)
184 { return V(i, j, k); }
185 blitz::Array<double, 2> blitz_double_array_3d_slice_rri(const Array<double, 3>& V, Range i, Range j, int k)
186 { return V(i, j, k); }
187 
188 blitz::Array<double, 1> blitz_double_array_3d_slice_rii(const Array<double, 3>& V, Range i, int j, int k)
189 { return V(i, j, k); }
190 blitz::Array<double, 1> blitz_double_array_3d_slice_iri(const Array<double, 3>& V, int i, Range j, int k)
191 { return V(i, j, k); }
192 blitz::Array<double, 1> blitz_double_array_3d_slice_iir(const Array<double, 3>& V, int i, int j, Range k)
193 { return V(i, j, k); }
194 
195 
196 void blitz_double_array_3d_set_rrr(Array<double, 3>& V, Range i, Range j, Range k, double v)
197 { V(i, j, k) = v; }
198 
199 void blitz_double_array_3d_set_irr(Array<double, 3>& V, int i, Range j, Range k, double v)
200 { V(i, j, k) = v; }
201 void blitz_double_array_3d_set_rir(Array<double, 3>& V, Range i, int j, Range k, double v)
202 { V(i, j, k) = v; }
203 void blitz_double_array_3d_set_rri(Array<double, 3>& V, Range i, Range j, int k, double v)
204 { V(i, j, k) = v; }
205 
206 void blitz_double_array_3d_set_iir(Array<double, 3>& V, int i, int j, Range k, double v)
207 { V(i, j, k) = v; }
208 void blitz_double_array_3d_set_iri(Array<double, 3>& V, int i, Range j, int k, double v)
209 { V(i, j, k) = v; }
210 void blitz_double_array_3d_set_rii(Array<double, 3>& V, Range i, int j, int k, double v)
211 { V(i, j, k) = v; }
212 
213 void blitz_double_array_3d_set_iii(Array<double, 3>& V, int i, int j, int k, double v)
214 { V(i, j, k) = v; }
215 
216 void blitz_double_array_3d_set_arr_rrr(Array<double, 3>& V, Range i, Range j, Range k, Array<double, 3> v)
217 { V(i, j, k) = v; }
218 
219 void blitz_double_array_3d_set_arr_irr(Array<double, 3>& V, int i, Range j, Range k, Array<double, 2> v)
220 { V(i, j, k) = v; }
221 void blitz_double_array_3d_set_arr_rir(Array<double, 3>& V, Range i, int j, Range k, Array<double, 2> v)
222 { V(i, j, k) = v; }
223 void blitz_double_array_3d_set_arr_rri(Array<double, 3>& V, Range i, Range j, int k, Array<double, 2> v)
224 { V(i, j, k) = v; }
225 
226 void blitz_double_array_3d_set_arr_iir(Array<double, 3>& V, int i, int j, Range k, Array<double, 1> v)
227 { V(i, j, k) = v; }
228 void blitz_double_array_3d_set_arr_iri(Array<double, 3>& V, int i, Range j, int k, Array<double, 1> v)
229 { V(i, j, k) = v; }
230 void blitz_double_array_3d_set_arr_rii(Array<double, 3>& V, Range i, int j, int k, Array<double, 1> v)
231 { V(i, j, k) = v; }
232 
233 std::string blitz_double_array_3d_tostring(const Array<double, 3>& V)
234 {
235  std::ostringstream os;
236  os << "Array<double, 3>: "<< V;
237  return os.str();
238 }
239 
240 // int 3d
241 int blitz_int_array_3d_read(const Array<int, 3>& V, int i, int j, int k)
242 { return V(i, j, k); }
243 
244 blitz::Array<int, 3> blitz_int_array_3d_slice_rrr(const Array<int, 3>& V, Range i, Range j, Range k)
245 { return V(i, j, k); }
246 blitz::Array<int, 2> blitz_int_array_3d_slice_irr(const Array<int, 3>& V, int i, Range j, Range k)
247 { return V(i, j, k); }
248 blitz::Array<int, 2> blitz_int_array_3d_slice_rir(const Array<int, 3>& V, Range i, int j, Range k)
249 { return V(i, j, k); }
250 blitz::Array<int, 2> blitz_int_array_3d_slice_rri(const Array<int, 3>& V, Range i, Range j, int k)
251 { return V(i, j, k); }
252 
253 blitz::Array<int, 1> blitz_int_array_3d_slice_rii(const Array<int, 3>& V, Range i, int j, int k)
254 { return V(i, j, k); }
255 blitz::Array<int, 1> blitz_int_array_3d_slice_iri(const Array<int, 3>& V, int i, Range j, int k)
256 { return V(i, j, k); }
257 blitz::Array<int, 1> blitz_int_array_3d_slice_iir(const Array<int, 3>& V, int i, int j, Range k)
258 { return V(i, j, k); }
259 
260 
261 void blitz_int_array_3d_set_rrr(Array<int, 3>& V, Range i, Range j, Range k, int v)
262 { V(i, j, k) = v; }
263 
264 void blitz_int_array_3d_set_irr(Array<int, 3>& V, int i, Range j, Range k, int v)
265 { V(i, j, k) = v; }
266 void blitz_int_array_3d_set_rir(Array<int, 3>& V, Range i, int j, Range k, int v)
267 { V(i, j, k) = v; }
268 void blitz_int_array_3d_set_rri(Array<int, 3>& V, Range i, Range j, int k, int v)
269 { V(i, j, k) = v; }
270 
271 void blitz_int_array_3d_set_iir(Array<int, 3>& V, int i, int j, Range k, int v)
272 { V(i, j, k) = v; }
273 void blitz_int_array_3d_set_iri(Array<int, 3>& V, int i, Range j, int k, int v)
274 { V(i, j, k) = v; }
275 void blitz_int_array_3d_set_rii(Array<int, 3>& V, Range i, int j, int k, int v)
276 { V(i, j, k) = v; }
277 
278 void blitz_int_array_3d_set_iii(Array<int, 3>& V, int i, int j, int k, int v)
279 { V(i, j, k) = v; }
280 
281 void blitz_int_array_3d_set_arr_rrr(Array<int, 3>& V, Range i, Range j, Range k, Array<int, 3> v)
282 { V(i, j, k) = v; }
283 
284 void blitz_int_array_3d_set_arr_irr(Array<int, 3>& V, int i, Range j, Range k, Array<int, 2> v)
285 { V(i, j, k) = v; }
286 void blitz_int_array_3d_set_arr_rir(Array<int, 3>& V, Range i, int j, Range k, Array<int, 2> v)
287 { V(i, j, k) = v; }
288 void blitz_int_array_3d_set_arr_rri(Array<int, 3>& V, Range i, Range j, int k, Array<int, 2> v)
289 { V(i, j, k) = v; }
290 
291 void blitz_int_array_3d_set_arr_iir(Array<int, 3>& V, int i, int j, Range k, Array<int, 1> v)
292 { V(i, j, k) = v; }
293 void blitz_int_array_3d_set_arr_iri(Array<int, 3>& V, int i, Range j, int k, Array<int, 1> v)
294 { V(i, j, k) = v; }
295 void blitz_int_array_3d_set_arr_rii(Array<int, 3>& V, Range i, int j, int k, Array<int, 1> v)
296 { V(i, j, k) = v; }
297 
298 std::string blitz_int_array_3d_tostring(const Array<int, 3>& V)
299 {
300  std::ostringstream os;
301  os << "Array<int, 3>: "<< V;
302  return os.str();
303 }
304 
305 // bool 3d
306 bool blitz_bool_array_3d_read(const Array<bool, 1>& V, int i, int j, int k)
307 { return V(i, j, k); }
308 
309 void blitz_bool_array_3d_set_iii(Array<bool, 3>& V, int i, int j, int k, bool v)
310 { V(i, j, k) = v; }
311 void blitz_bool_array_3d_set_iir(Array<bool, 3>& V, int i, int j, Range k, bool v)
312 { V(i, j, k) = v; }
313 void blitz_bool_array_3d_set_iri(Array<bool, 3>& V, int i, Range j, int k, bool v)
314 { V(i, j, k) = v; }
315 void blitz_bool_array_3d_set_irr(Array<bool, 3>& V, int i, Range j, Range k, bool v)
316 { V(i, j, k) = v; }
317 void blitz_bool_array_3d_set_rii(Array<bool, 3>& V, Range i, int j, int k, bool v)
318 { V(i, j, k) = v; }
319 void blitz_bool_array_3d_set_rir(Array<bool, 3>& V, Range i, int j, Range k, bool v)
320 { V(i, j, k) = v; }
321 void blitz_bool_array_3d_set_rri(Array<bool, 3>& V, Range i, Range j, int k, bool v)
322 { V(i, j, k) = v; }
323 void blitz_bool_array_3d_set_rrr(Array<bool, 3>& V, Range i, Range j, Range k, bool v)
324 { V(i, j, k) = v; }
325 
326 std::string blitz_bool_array_3d_tostring(const Array<bool, 3>& V)
327 {
328  std::ostringstream os;
329  os << "Array<bool, 3>: " << V;
330  return os.str();
331 }
332 
333 // double 4d
334 int blitz_double_array_4d_extent_4(const Array<double, 4>& V) {
335  return V.extent(fourthDim);
336 }
337 
338 double blitz_double_array_4d_read(const Array<double, 4>& V, int i, int j, int k, int l)
339 { return V(i, j, k, l); }
340 
341 blitz::Array<double, 4> blitz_double_array_4d_slice_rrrr(const Array<double, 4>& V, Range i, Range j, Range k, Range l)
342 { return V(i, j, k, l); }
343 
344 blitz::Array<double, 3> blitz_double_array_4d_slice_irrr(const Array<double, 4>& V, int i, Range j, Range k, Range l)
345 { return V(i, j, k, l); }
346 blitz::Array<double, 3> blitz_double_array_4d_slice_rirr(const Array<double, 4>& V, Range i, int j, Range k, Range l)
347 { return V(i, j, k, l); }
348 blitz::Array<double, 3> blitz_double_array_4d_slice_rrir(const Array<double, 4>& V, Range i, Range j, int k, Range l)
349 { return V(i, j, k, l); }
350 blitz::Array<double, 3> blitz_double_array_4d_slice_rrri(const Array<double, 4>& V, Range i, Range j, Range k, int l)
351 { return V(i, j, k, l); }
352 
353 blitz::Array<double, 2> blitz_double_array_4d_slice_iirr(const Array<double, 4>& V, int i, int j, Range k, Range l)
354 { return V(i, j, k, l); }
355 blitz::Array<double, 2> blitz_double_array_4d_slice_riir(const Array<double, 4>& V, Range i, int j, int k, Range l)
356 { return V(i, j, k, l); }
357 blitz::Array<double, 2> blitz_double_array_4d_slice_rrii(const Array<double, 4>& V, Range i, Range j, int k, int l)
358 { return V(i, j, k, l); }
359 blitz::Array<double, 2> blitz_double_array_4d_slice_irir(const Array<double, 4>& V, int i, Range j, int k, Range l)
360 { return V(i, j, k, l); }
361 blitz::Array<double, 2> blitz_double_array_4d_slice_irri(const Array<double, 4>& V, int i, Range j, Range k, int l)
362 { return V(i, j, k, l); }
363 blitz::Array<double, 2> blitz_double_array_4d_slice_riri(const Array<double, 4>& V, Range i, int j, Range k, int l)
364 { return V(i, j, k, l); }
365 
366 blitz::Array<double, 1> blitz_double_array_4d_slice_iiir(const Array<double, 4>& V, int i, int j, int k, Range l)
367 { return V(i, j, k, l); }
368 blitz::Array<double, 1> blitz_double_array_4d_slice_riii(const Array<double, 4>& V, Range i, int j, int k, int l)
369 { return V(i, j, k, l); }
370 
371 void blitz_double_array_4d_set_rrrr(Array<double, 4>& V, Range i, Range j, Range k, Range l, double v)
372 { V(i, j, k, l) = v; }
373 
374 void blitz_double_array_4d_set_irrr(Array<double, 4>& V, int i, Range j, Range k, Range l, double v)
375 { V(i, j, k, l) = v; }
376 void blitz_double_array_4d_set_rirr(Array<double, 4>& V, Range i, int j, Range k, Range l, double v)
377 { V(i, j, k, l) = v; }
378 void blitz_double_array_4d_set_rrir(Array<double, 4>& V, Range i, Range j, int k, Range l, double v)
379 { V(i, j, k, l) = v; }
380 void blitz_double_array_4d_set_rrri(Array<double, 4>& V, Range i, Range j, Range k, int l, double v)
381 { V(i, j, k, l) = v; }
382 
383 void blitz_double_array_4d_set_iirr(Array<double, 4>& V, int i, int j, Range k, Range l, double v)
384 { V(i, j, k, l) = v; }
385 void blitz_double_array_4d_set_riir(Array<double, 4>& V, Range i, int j, int k, Range l, double v)
386 { V(i, j, k, l) = v; }
387 void blitz_double_array_4d_set_rrii(Array<double, 4>& V, Range i, Range j, int k, int l, double v)
388 { V(i, j, k, l) = v; }
389 void blitz_double_array_4d_set_irir(Array<double, 4>& V, int i, Range j, int k, Range l, double v)
390 { V(i, j, k, l) = v; }
391 void blitz_double_array_4d_set_irri(Array<double, 4>& V, int i, Range j, Range k, int l, double v)
392 { V(i, j, k, l) = v; }
393 void blitz_double_array_4d_set_riri(Array<double, 4>& V, Range i, int j, Range k, int l, double v)
394 { V(i, j, k, l) = v; }
395 
396 void blitz_double_array_4d_set_riii(Array<double, 4>& V, Range i, int j, int k, int l, double v)
397 { V(i, j, k, l) = v; }
398 void blitz_double_array_4d_set_irii(Array<double, 4>& V, int i, Range j, int k, int l, double v)
399 { V(i, j, k, l) = v; }
400 void blitz_double_array_4d_set_iiri(Array<double, 4>& V, int i, int j, Range k, int l, double v)
401 { V(i, j, k, l) = v; }
402 void blitz_double_array_4d_set_iiir(Array<double, 4>& V, int i, int j, int k, Range l, double v)
403 { V(i, j, k, l) = v; }
404 void blitz_double_array_4d_set_iiii(Array<double, 4>& V, int i, int j, int k, int l, double v)
405 { V(i, j, k, l) = v; }
406 
407 void blitz_double_array_4d_set_arr_irrr(Array<double, 4>& V, int i, Range j, Range k, Range l, Array<double, 3>& v)
408 { V(i, j, k, l) = v; }
409 void blitz_double_array_4d_set_arr_rirr(Array<double, 4>& V, Range i, int j, Range k, Range l, Array<double, 3>& v)
410 { V(i, j, k, l) = v; }
411 void blitz_double_array_4d_set_arr_rrir(Array<double, 4>& V, Range i, Range j, int k, Range l, Array<double, 3>& v)
412 { V(i, j, k, l) = v; }
413 void blitz_double_array_4d_set_arr_rrri(Array<double, 4>& V, Range i, Range j, Range k, int l, Array<double, 3>& v)
414 { V(i, j, k, l) = v; }
415 
416 void blitz_double_array_4d_set_arr_iirr(Array<double, 4>& V, int i, int j, Range k, Range l, Array<double, 2>& v)
417 { V(i, j, k, l) = v; }
418 void blitz_double_array_4d_set_arr_riir(Array<double, 4>& V, Range i, int j, int k, Range l, Array<double, 2>& v)
419 { V(i, j, k, l) = v; }
420 void blitz_double_array_4d_set_arr_rrii(Array<double, 4>& V, Range i, Range j, int k, int l, Array<double, 2>& v)
421 { V(i, j, k, l) = v; }
422 void blitz_double_array_4d_set_arr_irir(Array<double, 4>& V, int i, Range j, int k, Range l, Array<double, 2>& v)
423 { V(i, j, k, l) = v; }
424 void blitz_double_array_4d_set_arr_irri(Array<double, 4>& V, int i, Range j, Range k, int l, Array<double, 2>& v)
425 { V(i, j, k, l) = v; }
426 void blitz_double_array_4d_set_arr_riri(Array<double, 4>& V, Range i, int j, Range k, int l, Array<double, 2>& v)
427 { V(i, j, k, l) = v; }
428 
429 void blitz_double_array_4d_set_arr_riii(Array<double, 4>& V, Range i, int j, int k, int l, Array<double, 1>& v)
430 { V(i, j, k, l) = v; }
431 void blitz_double_array_4d_set_arr_irii(Array<double, 4>& V, int i, Range j, int k, int l, Array<double, 1>& v)
432 { V(i, j, k, l) = v; }
433 void blitz_double_array_4d_set_arr_iiri(Array<double, 4>& V, int i, int j, Range k, int l, Array<double, 1>& v)
434 { V(i, j, k, l) = v; }
435 void blitz_double_array_4d_set_arr_iiir(Array<double, 4>& V, int i, int j, int k, Range l, Array<double, 1>& v)
436 { V(i, j, k, l) = v; }
437 
438 std::string blitz_double_array_4d_tostring(const Array<double, 4>& V)
439 {
440  std::ostringstream os;
441  os << "Array<double, 4>: "<< V;
442  return os.str();
443 }
444 // double 5d
445 int blitz_double_array_5d_extent_4(const Array<double, 5>& V) {
446  return V.extent(fourthDim);
447 }
448 
449 int blitz_double_array_5d_extent_5(const Array<double, 5>& V) {
450  return V.extent(fifthDim);
451 }
452 
453 double blitz_double_array_5d_read(const Array<double, 5>& V, int i, int j, int k, int l, int m)
454 { return V(i, j, k, l, m); }
455 
456 blitz::Array<double, 5> blitz_double_array_5d_slice_rrrrr(const Array<double, 5>& V, Range i, Range j, Range k, Range l, Range m)
457 { return V(i, j, k, l, m); }
458 
459 blitz::Array<double, 4> blitz_double_array_5d_slice_irrrr(const Array<double, 5>& V, int i, Range j, Range k, Range l, Range m)
460 { return V(i, j, k, l, m); }
461 blitz::Array<double, 4> blitz_double_array_5d_slice_rirrr(const Array<double, 5>& V, Range i, int j, Range k, Range l, Range m)
462 { return V(i, j, k, l, m); }
463 blitz::Array<double, 4> blitz_double_array_5d_slice_rrirr(const Array<double, 5>& V, Range i, Range j, int k, Range l, Range m)
464 { return V(i, j, k, l, m); }
465 blitz::Array<double, 4> blitz_double_array_5d_slice_rrrir(const Array<double, 5>& V, Range i, Range j, Range k, int l, Range m)
466 { return V(i, j, k, l, m); }
467 blitz::Array<double, 4> blitz_double_array_5d_slice_rrrri(const Array<double, 5>& V, Range i, Range j, Range k, Range l, int m)
468 { return V(i, j, k, l, m); }
469 
470 blitz::Array<double, 3> blitz_double_array_5d_slice_iirrr(const Array<double, 5>& V, int i, int j, Range k, Range l, Range m)
471 { return V(i, j, k, l, m); }
472 blitz::Array<double, 3> blitz_double_array_5d_slice_irirr(const Array<double, 5>& V, int i, Range j, int k, Range l, Range m)
473 { return V(i, j, k, l, m); }
474 blitz::Array<double, 3> blitz_double_array_5d_slice_irrir(const Array<double, 5>& V, int i, Range j, Range k, int l, Range m)
475 { return V(i, j, k, l, m); }
476 blitz::Array<double, 3> blitz_double_array_5d_slice_irrri(const Array<double, 5>& V, int i, Range j, Range k, Range l, int m)
477 { return V(i, j, k, l, m); }
478 blitz::Array<double, 3> blitz_double_array_5d_slice_riirr(const Array<double, 5>& V, Range i, int j, int k, Range l, Range m)
479 { return V(i, j, k, l, m); }
480 blitz::Array<double, 3> blitz_double_array_5d_slice_ririr(const Array<double, 5>& V, Range i, int j, Range k, int l, Range m)
481 { return V(i, j, k, l, m); }
482 blitz::Array<double, 3> blitz_double_array_5d_slice_rirri(const Array<double, 5>& V, Range i, int j, Range k, Range l, int m)
483 { return V(i, j, k, l, m); }
484 blitz::Array<double, 3> blitz_double_array_5d_slice_rriir(const Array<double, 5>& V, Range i, Range j, int k, int l, Range m)
485 { return V(i, j, k, l, m); }
486 blitz::Array<double, 3> blitz_double_array_5d_slice_rriri(const Array<double, 5>& V, Range i, Range j, int k, Range l, int m)
487 { return V(i, j, k, l, m); }
488 blitz::Array<double, 3> blitz_double_array_5d_slice_rrrii(const Array<double, 5>& V, Range i, Range j, Range k, int l, int m)
489 { return V(i, j, k, l, m); }
490 
491 blitz::Array<double, 2> blitz_double_array_5d_slice_rriii(const Array<double, 5>& V, Range i, Range j, int k, int l, int m)
492 { return V(i, j, k, l, m); }
493 blitz::Array<double, 2> blitz_double_array_5d_slice_ririi(const Array<double, 5>& V, Range i, int j, Range k, int l, int m)
494 { return V(i, j, k, l, m); }
495 blitz::Array<double, 2> blitz_double_array_5d_slice_riiri(const Array<double, 5>& V, Range i, int j, int k, Range l, int m)
496 { return V(i, j, k, l, m); }
497 blitz::Array<double, 2> blitz_double_array_5d_slice_irrii(const Array<double, 5>& V, int i, Range j, Range k, int l, int m)
498 { return V(i, j, k, l, m); }
499 blitz::Array<double, 2> blitz_double_array_5d_slice_iriri(const Array<double, 5>& V, int i, Range j, int k, Range l, int m)
500 { return V(i, j, k, l, m); }
501 blitz::Array<double, 2> blitz_double_array_5d_slice_iirri(const Array<double, 5>& V, int i, int j, Range k, Range l, int m)
502 { return V(i, j, k, l, m); }
503 blitz::Array<double, 2> blitz_double_array_5d_slice_iirir(const Array<double, 5>& V, int i, int j, Range k, int l, Range m)
504 { return V(i, j, k, l, m); }
505 blitz::Array<double, 2> blitz_double_array_5d_slice_riiir(const Array<double, 5>& V, Range i, int j, int k, int l, Range m)
506 { return V(i, j, k, l, m); }
507 blitz::Array<double, 2> blitz_double_array_5d_slice_iriir(const Array<double, 5>& V, int i, Range j, int k, int l, Range m)
508 { return V(i, j, k, l, m); }
509 blitz::Array<double, 2> blitz_double_array_5d_slice_iiirr(const Array<double, 5>& V, int i, int j, int k, Range l, Range m)
510 { return V(i, j, k, l, m); }
511 
512 blitz::Array<double, 1> blitz_double_array_5d_slice_iirii(const Array<double, 5>& V, int i, int j, Range k, int l, int m)
513 { return V(i, j, k, l, m); }
514 blitz::Array<double, 1> blitz_double_array_5d_slice_iiiri(const Array<double, 5>& V, int i, int j, int k, Range l, int m)
515 { return V(i, j, k, l, m); }
516 blitz::Array<double, 1> blitz_double_array_5d_slice_iiiir(const Array<double, 5>& V, int i, int j, int k, int l, Range m)
517 { return V(i, j, k, l, m); }
518 blitz::Array<double, 1> blitz_double_array_5d_slice_riiii(const Array<double, 5>& V, Range i, int j, int k, int l, int m)
519 { return V(i, j, k, l, m); }
520 blitz::Array<double, 1> blitz_double_array_5d_slice_iriii(const Array<double, 5>& V, int i, Range j, int k, int l, int m)
521 { return V(i, j, k, l, m); }
522 
523 
524 void blitz_double_array_5d_set_iiiii(Array<double, 5>& V, int i, int j, int k, int l, int m, double v)
525 { V(i, j, k, l, m) = v; }
526 
527 void blitz_double_array_5d_set_rrrrr_val(Array<double, 5>& V, Range i, Range j, Range k, Range l, Range m, double v)
528 { V(i, j, k, l, m) = v; }
529 
530 void blitz_double_array_5d_set_rrrrr_arr(Array<double, 5>& V, Range i, Range j, Range k, Range l, Range m, blitz::Array<double, 5> v)
531 { V(i, j, k, l, m) = v; }
532 
533 void blitz_double_array_5d_set_irrrr(Array<double, 5>& V, int i, Range j, Range k, Range l, Range m, blitz::Array<double, 4> v)
534 { V(i, j, k, l, m) = v; }
535 void blitz_double_array_5d_set_rirrr(Array<double, 5>& V, Range i, int j, Range k, Range l, Range m, blitz::Array<double, 4> v)
536 { V(i, j, k, l, m) = v; }
537 void blitz_double_array_5d_set_rrirr(Array<double, 5>& V, Range i, Range j, int k, Range l, Range m, blitz::Array<double, 4> v)
538 { V(i, j, k, l, m) = v; }
539 void blitz_double_array_5d_set_rrrir(Array<double, 5>& V, Range i, Range j, Range k, int l, Range m, blitz::Array<double, 4> v)
540 { V(i, j, k, l, m) = v; }
541 void blitz_double_array_5d_set_rrrri(Array<double, 5>& V, Range i, Range j, Range k, Range l, int m, blitz::Array<double, 4> v)
542 { V(i, j, k, l, m) = v; }
543 
544 void blitz_double_array_5d_set_iirrr(Array<double, 5>& V, int i, int j, Range k, Range l, Range m, blitz::Array<double, 3> v)
545 { V(i, j, k, l, m) = v; }
546 void blitz_double_array_5d_set_irirr(Array<double, 5>& V, int i, Range j, int k, Range l, Range m, blitz::Array<double, 3> v)
547 { V(i, j, k, l, m) = v; }
548 void blitz_double_array_5d_set_irrir(Array<double, 5>& V, int i, Range j, Range k, int l, Range m, blitz::Array<double, 3> v)
549 { V(i, j, k, l, m) = v; }
550 void blitz_double_array_5d_set_irrri(Array<double, 5>& V, int i, Range j, Range k, Range l, int m, blitz::Array<double, 3> v)
551 { V(i, j, k, l, m) = v; }
552 void blitz_double_array_5d_set_riirr(Array<double, 5>& V, Range i, int j, int k, Range l, Range m, blitz::Array<double, 3> v)
553 { V(i, j, k, l, m) = v; }
554 void blitz_double_array_5d_set_ririr(Array<double, 5>& V, Range i, int j, Range k, int l, Range m, blitz::Array<double, 3> v)
555 { V(i, j, k, l, m) = v; }
556 void blitz_double_array_5d_set_rirri(Array<double, 5>& V, Range i, int j, Range k, Range l, int m, blitz::Array<double, 3> v)
557 { V(i, j, k, l, m) = v; }
558 void blitz_double_array_5d_set_rriir(Array<double, 5>& V, Range i, Range j, int k, int l, Range m, blitz::Array<double, 3> v)
559 { V(i, j, k, l, m) = v; }
560 void blitz_double_array_5d_set_rriri(Array<double, 5>& V, Range i, Range j, int k, Range l, int m, blitz::Array<double, 3> v)
561 { V(i, j, k, l, m) = v; }
562 void blitz_double_array_5d_set_rrrii(Array<double, 5>& V, Range i, Range j, Range k, int l, int m, blitz::Array<double, 3> v)
563 { V(i, j, k, l, m) = v; }
564 
565 void blitz_double_array_5d_set_rriii(Array<double, 5>& V, Range i, Range j, int k, int l, int m, blitz::Array<double, 2> v)
566 { V(i, j, k, l, m) = v; }
567 void blitz_double_array_5d_set_ririi(Array<double, 5>& V, Range i, int j, Range k, int l, int m, blitz::Array<double, 2> v)
568 { V(i, j, k, l, m) = v; }
569 void blitz_double_array_5d_set_riiri(Array<double, 5>& V, Range i, int j, int k, Range l, int m, blitz::Array<double, 2> v)
570 { V(i, j, k, l, m) = v; }
571 void blitz_double_array_5d_set_irrii(Array<double, 5>& V, int i, Range j, Range k, int l, int m, blitz::Array<double, 2> v)
572 { V(i, j, k, l, m) = v; }
573 void blitz_double_array_5d_set_iriri(Array<double, 5>& V, int i, Range j, int k, Range l, int m, blitz::Array<double, 2> v)
574 { V(i, j, k, l, m) = v; }
575 void blitz_double_array_5d_set_iirri(Array<double, 5>& V, int i, int j, Range k, Range l, int m, blitz::Array<double, 2> v)
576 { V(i, j, k, l, m) = v; }
577 void blitz_double_array_5d_set_iirir(Array<double, 5>& V, int i, int j, Range k, int l, Range m, blitz::Array<double, 2> v)
578 { V(i, j, k, l, m) = v; }
579 void blitz_double_array_5d_set_riiir(Array<double, 5>& V, Range i, int j, int k, int l, Range m, blitz::Array<double, 2> v)
580 { V(i, j, k, l, m) = v; }
581 void blitz_double_array_5d_set_iriir(Array<double, 5>& V, int i, Range j, int k, int l, Range m, blitz::Array<double, 2> v)
582 { V(i, j, k, l, m) = v; }
583 void blitz_double_array_5d_set_iiirr(Array<double, 5>& V, int i, int j, int k, Range l, Range m, blitz::Array<double, 2> v)
584 { V(i, j, k, l, m) = v; }
585 
586 void blitz_double_array_5d_set_iirii(Array<double, 5>& V, int i, int j, Range k, int l, int m, blitz::Array<double, 1> v)
587 { V(i, j, k, l, m) = v; }
588 void blitz_double_array_5d_set_iiiri(Array<double, 5>& V, int i, int j, int k, Range l, int m, blitz::Array<double, 1> v)
589 { V(i, j, k, l, m) = v; }
590 void blitz_double_array_5d_set_iiiir(Array<double, 5>& V, int i, int j, int k, int l, Range m, blitz::Array<double, 1> v)
591 { V(i, j, k, l, m) = v; }
592 void blitz_double_array_5d_set_riiii(Array<double, 5>& V, Range i, int j, int k, int l, int m, blitz::Array<double, 1> v)
593 { V(i, j, k, l, m) = v; }
594 void blitz_double_array_5d_set_iriii(Array<double, 5>& V, int i, Range j, int k, int l, int m, blitz::Array<double, 1> v)
595 { V(i, j, k, l, m) = v; }
596 
597 std::string blitz_double_array_5d_tostring(const Array<double, 5>& V)
598 {
599  std::ostringstream os;
600  os << "Array<double, 5>: "<< V;
601  return os.str();
602 }
603 
604 // Math operations
605 
606 template <class Vt>
607 Vt blitz_oper_add_double(const Vt& Arr, const double v) {
608  Vt res( Arr + v );
609  return res;
610 }
611 
612 template <class Vt>
613 Vt double_oper_add_blitz(const double v, const Vt& Arr) {
614  Vt res( v + Arr );
615  return res;
616 }
617 
618 template <class Vt>
619 Vt blitz_oper_add_array(const Vt& Arr, const Vt v) {
620  Vt res( Arr + v );
621  return res;
622 }
623 
624 template <class Vt>
625 Vt blitz_oper_sub_double(const Vt& Arr, const double v) {
626  Vt res( Arr - v );
627  return res;
628 }
629 
630 template <class Vt>
631 Vt double_oper_sub_blitz(const double v, const Vt& Arr) {
632  Vt res( v - Arr );
633  return res;
634 }
635 
636 template <class Vt>
637 Vt blitz_oper_sub_array(const Vt& Arr, const Vt v) {
638  Vt res( Arr - v );
639  return res;
640 }
641 
642 template <class Vt>
643 Vt blitz_oper_mul_double(const Vt& Arr, const double v) {
644  Vt res( Arr * v );
645  return res;
646 }
647 
648 template <class Vt>
649 Vt double_oper_mul_blitz(const double v, const Vt& Arr) {
650  Vt res( v * Arr );
651  return res;
652 }
653 
654 template <class Vt>
655 Vt blitz_oper_mul_array(const Vt& Arr, const Vt v) {
656  Vt res( Arr * v );
657  return res;
658 }
659 
660 template <class Vt>
661 Vt blitz_oper_div_double(const Vt& Arr, const double v) {
662  Vt res( Arr / v );
663  return res;
664 }
665 
666 template <class Vt>
667 Vt double_oper_div_blitz(const double v, const Vt& Arr) {
668  Vt res( v / Arr );
669  return res;
670 }
671 
672 template <class Vt>
673 Vt blitz_oper_div_array(const Vt& Arr, const Vt& v) {
674  Vt res( Arr / v );
675  return res;
676 }
677 
678 template <class Vt>
679 double blitz_sum(const Vt& Arr) {
680  return sum(Arr);
681 }
682 
683 template <class Vt>
684 double blitz_product(const Vt& Arr) {
685  return product(Arr);
686 }
687 
688 template <class Vt>
689 double blitz_mean(const Vt& Arr) {
690  return mean(Arr);
691 }
692 
693 template <class Vt>
694 double blitz_min(const Vt& Arr) {
695  return min(Arr);
696 }
697 
698 template <class Vt>
699 double blitz_max(const Vt& Arr) {
700  return max(Arr);
701 }
702 
703 template <class Vt>
704 Vt blitz_log(const Vt& Arr) {
705  Vt res( log(Arr) );
706  return res;
707 }
708 
709 template <class Vt>
710 Vt blitz_exp(const Vt& Arr) {
711  Vt res( exp(Arr) );
712  return res;
713 }
714 
715 typedef Array<double, 1> ad1;
716 typedef Array<double, 2> ad2;
717 typedef Array<double, 3> ad3;
718 typedef Array<double, 4> ad4;
719 typedef Array<double, 5> ad5;
720 typedef Array<bool, 1> ab1;
721 typedef Array<bool, 2> ab2;
722 typedef Array<bool, 3> ab3;
723 typedef Array<int, 1> ai1;
724 typedef Array<int, 2> ai2;
725 typedef Array<int, 3> ai3;
726 REGISTER_LUA_CLASS_NAME(ad1, Blitz_double_array_1d)
727 .def(luabind::constructor<int>())
728 .def("rows", &Array<double, 1>::rows)
729 .def("__call", &blitz_double_array_1d_read)
730 .def("__call", &blitz_double_array_1d_slice)
731 .def("set", &blitz_double_array_1d_set_i)
734 .def("__tostring", &blitz_double_array_1d_tostring)
735 .def("__add", &blitz_oper_add_double<ad1>)
736 .def("__add", &double_oper_add_blitz<ad1>)
737 .def("__add", &blitz_oper_add_array<ad1>)
738 .def("__sub", &blitz_oper_sub_double<ad1>)
739 .def("__sub", &double_oper_sub_blitz<ad1>)
740 .def("__sub", &blitz_oper_sub_array<ad1>)
741 .def("__mul", &blitz_oper_mul_double<ad1>)
742 .def("__mul", &double_oper_mul_blitz<ad1>)
743 .def("__mul", &blitz_oper_mul_array<ad1>)
744 .def("__div", &blitz_oper_div_double<ad1>)
745 .def("__div", &double_oper_div_blitz<ad1>)
746 .def("__div", &blitz_oper_div_array<ad1>)
747 .def("sum", &blitz_sum<ad1>)
748 .def("product", &blitz_product<ad1>)
749 .def("mean", &blitz_mean<ad1>)
750 .def("min", &blitz_min<ad1>)
751 .def("max", &blitz_max<ad1>)
752 .def("log", &blitz_log<ad1>)
753 .def("exp", &blitz_exp<ad1>)
755 
756 REGISTER_LUA_CLASS_NAME(ai1, Blitz_int_array_1d)
757 .def(luabind::constructor<int>())
758 .def("rows", &Array<int, 1>::rows)
759 .def("__call", &blitz_int_array_1d_read)
762 .def("__tostring", &blitz_int_array_1d_tostring)
764 
765 REGISTER_LUA_CLASS_NAME(ab1, Blitz_bool_array_1d)
766 .def(luabind::constructor<int>())
767 .def("rows", &Array<bool, 1>::rows)
768 .def("__call", &blitz_bool_array_1d_read)
771 .def("__tostring", &blitz_bool_array_1d_tostring)
773 
774 REGISTER_LUA_CLASS_NAME(ad2, Blitz_double_array_2d)
775 .def(luabind::constructor<int,int>())
776 .def("rows", &Array<double, 2>::rows)
777 .def("cols", &Array<double, 2>::cols)
778 .def("__call", &blitz_double_array_2d_read)
789 .def("__tostring", &blitz_double_array_2d_tostring)
790 .def("__add", &blitz_oper_add_double<ad2>)
791 .def("__add", &double_oper_add_blitz<ad2>)
792 .def("__add", &blitz_oper_add_array<ad2>)
793 .def("__sub", &blitz_oper_sub_double<ad2>)
794 .def("__sub", &double_oper_sub_blitz<ad2>)
795 .def("__sub", &blitz_oper_sub_array<ad2>)
796 .def("__mul", &blitz_oper_mul_double<ad2>)
797 .def("__mul", &double_oper_mul_blitz<ad2>)
798 .def("__mul", &blitz_oper_mul_array<ad2>)
799 .def("__div", &blitz_oper_div_double<ad2>)
800 .def("__div", &double_oper_div_blitz<ad2>)
801 .def("__div", &blitz_oper_div_array<ad2>)
802 .def("sum", &blitz_sum<ad2>)
803 .def("product", &blitz_product<ad2>)
804 .def("mean", &blitz_mean<ad2>)
805 .def("min", &blitz_min<ad2>)
806 .def("max", &blitz_max<ad2>)
807 .def("log", &blitz_log<ad2>)
808 .def("exp", &blitz_exp<ad2>)
810 
811 REGISTER_LUA_CLASS_NAME(ai2, Blitz_int_array_2d)
812 .def(luabind::constructor<int,int>())
813 .def("rows", &Array<int, 2>::rows)
814 .def("cols", &Array<int, 2>::cols)
815 .def("__call", &blitz_int_array_2d_read)
816 .def("__call", &blitz_int_array_2d_slice_rr)
817 .def("__call", &blitz_int_array_2d_slice_ir)
818 .def("__call", &blitz_int_array_2d_slice_ri)
826 .def("__tostring", &blitz_int_array_2d_tostring)
828 
829 REGISTER_LUA_CLASS_NAME(ab2, Blitz_bool_array_2d)
830 .def(luabind::constructor<int, int>())
831 .def("rows", &Array<bool, 2>::rows)
832 .def("cols", &Array<bool, 2>::cols)
833 .def("__call", &blitz_bool_array_2d_read)
844 .def("__tostring", &blitz_bool_array_2d_tostring)
846 
847 REGISTER_LUA_CLASS_NAME(ad3, Blitz_double_array_3d)
848 .def(luabind::constructor<int,int,int>())
849 .def("rows", &Array<double, 3>::rows)
850 .def("cols", &Array<double, 3>::cols)
851 .def("depth", &Array<double, 3>::depth)
852 .def("__call", &blitz_double_array_3d_read)
875 .def("__tostring", &blitz_double_array_3d_tostring)
876 .def("__add", &blitz_oper_add_double<ad3>)
877 .def("__add", &double_oper_add_blitz<ad3>)
878 .def("__add", &blitz_oper_add_array<ad3>)
879 .def("__sub", &blitz_oper_sub_double<ad3>)
880 .def("__sub", &double_oper_sub_blitz<ad3>)
881 .def("__sub", &blitz_oper_sub_array<ad3>)
882 .def("__mul", &double_oper_mul_blitz<ad3>)
883 .def("__mul", &double_oper_mul_blitz<ad3>)
884 .def("__mul", &blitz_oper_mul_array<ad3>)
885 .def("__div", &blitz_oper_div_double<ad3>)
886 .def("__div", &double_oper_div_blitz<ad3>)
887 .def("__div", &blitz_oper_div_array<ad3>)
888 .def("sum", &blitz_sum<ad3>)
889 .def("product", &blitz_product<ad3>)
890 .def("mean", &blitz_mean<ad3>)
891 .def("min", &blitz_min<ad3>)
892 .def("max", &blitz_max<ad3>)
893 .def("log", &blitz_log<ad3>)
894 .def("exp", &blitz_exp<ad3>)
896 
897 REGISTER_LUA_CLASS_NAME(ai3, Blitz_int_array_3d)
898 .def(luabind::constructor<int,int,int>())
899 .def("rows", &Array<int, 3>::rows)
900 .def("cols", &Array<int, 3>::cols)
901 .def("depth", &Array<int, 3>::depth)
902 .def("__call", &blitz_int_array_3d_read)
925 .def("__tostring", &blitz_int_array_3d_tostring)
927 
928 REGISTER_LUA_CLASS_NAME(ab3, Blitz_bool_array_3d)
929 .def(luabind::constructor<int>())
930 .def("rows", &Array<bool, 3>::rows)
931 .def("cols", &Array<bool, 3>::cols)
932 .def("depth", &Array<bool, 3>::depth)
933 .def("__call", &blitz_bool_array_3d_read)
942 .def("__tostring", &blitz_bool_array_3d_tostring)
944 
945 REGISTER_LUA_CLASS_NAME(ad4, Blitz_double_array_4d)
946 .def(luabind::constructor<int,int,int,int>())
947 .def("rows", &Array<double, 4>::rows)
948 .def("cols", &Array<double, 4>::cols)
949 .def("depth", &Array<double, 4>::depth)
950 .def("fourth_dim", &blitz_double_array_4d_extent_4)
951 .def("__call", &blitz_double_array_4d_read)
995 .def("__tostring", &blitz_double_array_4d_tostring)
996 .def("__add", &blitz_oper_add_double<ad4>)
997 .def("__add", &double_oper_add_blitz<ad4>)
998 .def("__add", &blitz_oper_add_array<ad4>)
999 .def("__sub", &blitz_oper_sub_double<ad4>)
1000 .def("__sub", &double_oper_sub_blitz<ad4>)
1001 .def("__sub", &blitz_oper_sub_array<ad4>)
1002 .def("__mul", &blitz_oper_mul_double<ad4>)
1003 .def("__mul", &double_oper_mul_blitz<ad4>)
1004 .def("__mul", &blitz_oper_mul_array<ad4>)
1005 .def("__div", &blitz_oper_div_double<ad4>)
1006 .def("__div", &double_oper_div_blitz<ad4>)
1007 .def("__div", &blitz_oper_div_array<ad4>)
1008 .def("sum", &blitz_sum<ad4>)
1009 .def("product", &blitz_product<ad4>)
1010 .def("mean", &blitz_mean<ad4>)
1011 .def("min", &blitz_min<ad4>)
1012 .def("max", &blitz_max<ad4>)
1013 .def("log", &blitz_log<ad4>)
1014 .def("exp", &blitz_exp<ad4>)
1016 
1017 REGISTER_LUA_CLASS_NAME(ad5, Blitz_double_array_5d)
1018 .def(luabind::constructor<int,int,int,int,int>())
1019 .def("rows", &Array<double, 5>::rows)
1020 .def("cols", &Array<double, 5>::cols)
1021 .def("depth", &Array<double, 5>::depth)
1022 .def("fourth_dim", &blitz_double_array_5d_extent_4)
1023 .def("fifth_dim", &blitz_double_array_5d_extent_5)
1024 .def("__call", &blitz_double_array_5d_read)
1089 .def("__tostring", &blitz_double_array_5d_tostring)
1090 .def("__add", &blitz_oper_add_double<ad5>)
1091 .def("__add", &double_oper_add_blitz<ad5>)
1092 .def("__add", &blitz_oper_add_array<ad5>)
1093 .def("__sub", &blitz_oper_sub_double<ad5>)
1094 .def("__sub", &double_oper_sub_blitz<ad5>)
1095 .def("__sub", &blitz_oper_sub_array<ad5>)
1096 .def("__mul", &blitz_oper_mul_double<ad5>)
1097 .def("__mul", &double_oper_mul_blitz<ad5>)
1098 .def("__mul", &blitz_oper_mul_array<ad5>)
1099 .def("__div", &blitz_oper_div_double<ad5>)
1100 .def("__div", &double_oper_div_blitz<ad5>)
1101 .def("__div", &blitz_oper_div_array<ad5>)
1102 .def("sum", &blitz_sum<ad5>)
1103 .def("product", &blitz_product<ad5>)
1104 .def("mean", &blitz_mean<ad5>)
1105 .def("min", &blitz_min<ad5>)
1106 .def("max", &blitz_max<ad5>)
1107 .def("log", &blitz_log<ad5>)
1108 .def("exp", &blitz_exp<ad5>)
1110 
1111 std::string range_tostring(const blitz::Range& R)
1112 {
1113  std::ostringstream os;
1114  os << R;
1115  return os.str();
1116 }
1117 
1118 REGISTER_LUA_CLASS_NAME(Range, Range)
1119 .def(luabind::constructor<>())
1120 .def(luabind::constructor<int>())
1121 .def(luabind::constructor<int,int>())
1122 .def(luabind::constructor<int,int,int>())
1123 .def("__tostring", &range_tostring)
1124 .scope
1125 [
1126  luabind::def("all", &Range::all)
1127  ]
1128 .enum_("Range")
1129 [
1130  luabind::value("fromStart", (int) blitz::fromStart),
1131  luabind::value("toEnd", (int) blitz::toEnd)
1132 ]
Array< int, 2 > ai2
Definition: lua_blitz.cc:724
void blitz_double_array_5d_set_irrrr(Array< double, 5 > &V, int i, Range j, Range k, Range l, Range m, blitz::Array< double, 4 > v)
Definition: lua_blitz.cc:533
Array< double, 4 > ad4
Definition: lua_blitz.cc:718
#define range_check(V, Min, Max)
Range check.
Definition: fp_exception.h:140
void blitz_double_array_4d_set_rrir(Array< double, 4 > &V, Range i, Range j, int k, Range l, double v)
Definition: lua_blitz.cc:378
void blitz_double_array_4d_set_irir(Array< double, 4 > &V, int i, Range j, int k, Range l, double v)
Definition: lua_blitz.cc:389
void blitz_double_array_3d_set_rir(Array< double, 3 > &V, Range i, int j, Range k, double v)
Definition: lua_blitz.cc:201
void blitz_int_array_2d_set_arr_ir(Array< int, 2 > &V, int i, Range j, Array< int, 1 > v)
Definition: lua_blitz.cc:123
double blitz_sum(const Vt &Arr)
Definition: lua_blitz.cc:679
void blitz_bool_array_2d_set_arr_ri(Array< bool, 2 > &V, Range i, int j, Array< bool, 1 > v)
Definition: lua_blitz.cc:161
blitz::Array< double, 2 > blitz_double_array_5d_slice_irrii(const Array< double, 5 > &V, int i, Range j, Range k, int l, int m)
Definition: lua_blitz.cc:497
double blitz_product(const Vt &Arr)
Definition: lua_blitz.cc:684
void blitz_double_array_5d_set_riirr(Array< double, 5 > &V, Range i, int j, int k, Range l, Range m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:552
blitz::Array< double, 2 > blitz_double_array_5d_slice_iirir(const Array< double, 5 > &V, int i, int j, Range k, int l, Range m)
Definition: lua_blitz.cc:503
void blitz_int_array_3d_set_rrr(Array< int, 3 > &V, Range i, Range j, Range k, int v)
Definition: lua_blitz.cc:261
Array< bool, 3 > ab3
Definition: lua_blitz.cc:722
void blitz_double_array_5d_set_irrii(Array< double, 5 > &V, int i, Range j, Range k, int l, int m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:571
void blitz_bool_array_2d_set_rr(Array< bool, 2 > &V, Range i, Range j, bool v)
Definition: lua_blitz.cc:159
blitz::Array< double, 3 > blitz_double_array_3d_slice_rrr(const Array< double, 3 > &V, Range i, Range j, Range k)
Definition: lua_blitz.cc:179
void blitz_double_array_4d_set_arr_iiir(Array< double, 4 > &V, int i, int j, int k, Range l, Array< double, 1 > &v)
Definition: lua_blitz.cc:435
blitz::Array< double, 3 > blitz_double_array_5d_slice_rrrii(const Array< double, 5 > &V, Range i, Range j, Range k, int l, int m)
Definition: lua_blitz.cc:488
void blitz_bool_array_3d_set_rri(Array< bool, 3 > &V, Range i, Range j, int k, bool v)
Definition: lua_blitz.cc:321
void blitz_bool_array_2d_set_ri(Array< bool, 2 > &V, Range i, int j, bool v)
Definition: lua_blitz.cc:153
blitz::Array< double, 3 > blitz_double_array_4d_slice_rrir(const Array< double, 4 > &V, Range i, Range j, int k, Range l)
Definition: lua_blitz.cc:348
blitz::Array< double, 3 > blitz_double_array_5d_slice_irrir(const Array< double, 5 > &V, int i, Range j, Range k, int l, Range m)
Definition: lua_blitz.cc:474
double blitz_double_array_3d_read(const Array< double, 3 > &V, int i, int j, int k)
Definition: lua_blitz.cc:176
void blitz_double_array_5d_set_iirir(Array< double, 5 > &V, int i, int j, Range k, int l, Range m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:577
blitz::Array< double, 2 > blitz_double_array_5d_slice_iirri(const Array< double, 5 > &V, int i, int j, Range k, Range l, int m)
Definition: lua_blitz.cc:501
void blitz_double_array_5d_set_iirii(Array< double, 5 > &V, int i, int j, Range k, int l, int m, blitz::Array< double, 1 > v)
Definition: lua_blitz.cc:586
std::string blitz_int_array_2d_tostring(const Array< int, 2 > &V)
Definition: lua_blitz.cc:128
void blitz_double_array_2d_set_rr(Array< double, 2 > &V, Range i, Range j, double v)
Definition: lua_blitz.cc:80
void blitz_double_array_2d_set_ri(Array< double, 2 > &V, Range i, int j, double v)
Definition: lua_blitz.cc:75
blitz::Array< double, 1 > blitz_double_array_3d_slice_iir(const Array< double, 3 > &V, int i, int j, Range k)
Definition: lua_blitz.cc:192
Array< int, 1 > ai1
Definition: lua_blitz.cc:723
std::string blitz_bool_array_1d_tostring(const Array< bool, 1 > &V)
Definition: lua_blitz.cc:52
blitz::Array< double, 4 > blitz_double_array_5d_slice_rirrr(const Array< double, 5 > &V, Range i, int j, Range k, Range l, Range m)
Definition: lua_blitz.cc:461
void blitz_double_array_5d_set_irrir(Array< double, 5 > &V, int i, Range j, Range k, int l, Range m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:548
void blitz_double_array_4d_set_irri(Array< double, 4 > &V, int i, Range j, Range k, int l, double v)
Definition: lua_blitz.cc:391
blitz::Array< double, 2 > blitz_double_array_4d_slice_rrii(const Array< double, 4 > &V, Range i, Range j, int k, int l)
Definition: lua_blitz.cc:357
double blitz_double_array_1d_read(const Array< double, 1 > &V, int i)
Register various Blitz array types into Lua.
Definition: lua_blitz.cc:11
Array< double, 2 > ad2
Definition: lua_blitz.cc:716
void blitz_double_array_5d_set_riiii(Array< double, 5 > &V, Range i, int j, int k, int l, int m, blitz::Array< double, 1 > v)
Definition: lua_blitz.cc:592
void blitz_bool_array_3d_set_iir(Array< bool, 3 > &V, int i, int j, Range k, bool v)
Definition: lua_blitz.cc:311
void blitz_double_array_4d_set_arr_irrr(Array< double, 4 > &V, int i, Range j, Range k, Range l, Array< double, 3 > &v)
Definition: lua_blitz.cc:407
void blitz_int_array_3d_set_rii(Array< int, 3 > &V, Range i, int j, int k, int v)
Definition: lua_blitz.cc:275
blitz::Array< int, 2 > blitz_int_array_2d_slice_rr(const Array< int, 2 > &V, Range i, Range j)
Definition: lua_blitz.cc:101
void blitz_double_array_5d_set_riiri(Array< double, 5 > &V, Range i, int j, int k, Range l, int m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:569
void blitz_int_array_3d_set_arr_irr(Array< int, 3 > &V, int i, Range j, Range k, Array< int, 2 > v)
Definition: lua_blitz.cc:284
void blitz_int_array_2d_set_ir(Array< int, 2 > &V, int i, Range j, int v)
Definition: lua_blitz.cc:117
void blitz_double_array_4d_set_arr_irii(Array< double, 4 > &V, int i, Range j, int k, int l, Array< double, 1 > &v)
Definition: lua_blitz.cc:431
void blitz_double_array_4d_set_iiir(Array< double, 4 > &V, int i, int j, int k, Range l, double v)
Definition: lua_blitz.cc:402
blitz::Array< double, 2 > blitz_double_array_4d_slice_irir(const Array< double, 4 > &V, int i, Range j, int k, Range l)
Definition: lua_blitz.cc:359
void blitz_double_array_5d_set_iiiri(Array< double, 5 > &V, int i, int j, int k, Range l, int m, blitz::Array< double, 1 > v)
Definition: lua_blitz.cc:588
void blitz_double_array_3d_set_arr_rrr(Array< double, 3 > &V, Range i, Range j, Range k, Array< double, 3 > v)
Definition: lua_blitz.cc:216
blitz::Array< double, 2 > blitz_double_array_5d_slice_riiri(const Array< double, 5 > &V, Range i, int j, int k, Range l, int m)
Definition: lua_blitz.cc:495
blitz::Array< double, 2 > blitz_double_array_3d_slice_rri(const Array< double, 3 > &V, Range i, Range j, int k)
Definition: lua_blitz.cc:185
void blitz_int_array_3d_set_arr_rri(Array< int, 3 > &V, Range i, Range j, int k, Array< int, 2 > v)
Definition: lua_blitz.cc:288
Vt blitz_oper_mul_array(const Vt &Arr, const Vt v)
Definition: lua_blitz.cc:655
void blitz_bool_array_3d_set_iii(Array< bool, 3 > &V, int i, int j, int k, bool v)
Definition: lua_blitz.cc:309
int blitz_double_array_4d_extent_4(const Array< double, 4 > &V)
Definition: lua_blitz.cc:334
void blitz_double_array_4d_set_arr_rrii(Array< double, 4 > &V, Range i, Range j, int k, int l, Array< double, 2 > &v)
Definition: lua_blitz.cc:420
blitz::Array< int, 3 > blitz_int_array_3d_slice_rrr(const Array< int, 3 > &V, Range i, Range j, Range k)
Definition: lua_blitz.cc:244
Vt double_oper_add_blitz(const double v, const Vt &Arr)
Definition: lua_blitz.cc:613
std::string blitz_double_array_3d_tostring(const Array< double, 3 > &V)
Definition: lua_blitz.cc:233
void blitz_bool_array_2d_set_ir(Array< bool, 2 > &V, int i, Range j, bool v)
Definition: lua_blitz.cc:156
void blitz_double_array_5d_set_iriri(Array< double, 5 > &V, int i, Range j, int k, Range l, int m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:573
blitz::Array< int, 1 > blitz_int_array_3d_slice_rii(const Array< int, 3 > &V, Range i, int j, int k)
Definition: lua_blitz.cc:253
void blitz_double_array_3d_set_arr_iri(Array< double, 3 > &V, int i, Range j, int k, Array< double, 1 > v)
Definition: lua_blitz.cc:228
void blitz_double_array_5d_set_ririi(Array< double, 5 > &V, Range i, int j, Range k, int l, int m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:567
blitz::Array< double, 2 > blitz_double_array_5d_slice_iriri(const Array< double, 5 > &V, int i, Range j, int k, Range l, int m)
Definition: lua_blitz.cc:499
void blitz_double_array_3d_set_iii(Array< double, 3 > &V, int i, int j, int k, double v)
Definition: lua_blitz.cc:213
blitz::Array< double, 3 > blitz_double_array_4d_slice_rrri(const Array< double, 4 > &V, Range i, Range j, Range k, int l)
Definition: lua_blitz.cc:350
blitz::Array< int, 1 > blitz_int_array_2d_slice_ir(const Array< int, 2 > &V, int i, Range j)
Definition: lua_blitz.cc:103
Vt blitz_oper_sub_double(const Vt &Arr, const double v)
Definition: lua_blitz.cc:625
blitz::Array< double, 2 > blitz_double_array_4d_slice_riir(const Array< double, 4 > &V, Range i, int j, int k, Range l)
Definition: lua_blitz.cc:355
void blitz_double_array_4d_set_arr_riii(Array< double, 4 > &V, Range i, int j, int k, int l, Array< double, 1 > &v)
Definition: lua_blitz.cc:429
std::string blitz_bool_array_2d_tostring(const Array< bool, 2 > &V)
Definition: lua_blitz.cc:168
bool blitz_bool_array_2d_read(const Array< bool, 2 > &V, int i, int j)
Definition: lua_blitz.cc:136
void blitz_int_array_3d_set_arr_iri(Array< int, 3 > &V, int i, Range j, int k, Array< int, 1 > v)
Definition: lua_blitz.cc:293
void blitz_double_array_5d_set_iiiir(Array< double, 5 > &V, int i, int j, int k, int l, Range m, blitz::Array< double, 1 > v)
Definition: lua_blitz.cc:590
blitz::Array< double, 4 > blitz_double_array_5d_slice_rrrir(const Array< double, 5 > &V, Range i, Range j, Range k, int l, Range m)
Definition: lua_blitz.cc:465
void blitz_double_array_5d_set_iirri(Array< double, 5 > &V, int i, int j, Range k, Range l, int m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:575
double blitz_mean(const Vt &Arr)
Definition: lua_blitz.cc:689
blitz::Array< double, 3 > blitz_double_array_5d_slice_iirrr(const Array< double, 5 > &V, int i, int j, Range k, Range l, Range m)
Definition: lua_blitz.cc:470
void blitz_double_array_5d_set_rrrri(Array< double, 5 > &V, Range i, Range j, Range k, Range l, int m, blitz::Array< double, 4 > v)
Definition: lua_blitz.cc:541
void blitz_double_array_2d_set_arr_ri(Array< double, 2 > &V, Range i, int j, Array< double, 1 > v)
Definition: lua_blitz.cc:82
void blitz_double_array_5d_set_rirrr(Array< double, 5 > &V, Range i, int j, Range k, Range l, Range m, blitz::Array< double, 4 > v)
Definition: lua_blitz.cc:535
blitz::Array< bool, 1 > blitz_bool_array_2d_slice_ri(const Array< bool, 2 > &V, Range i, int j)
Definition: lua_blitz.cc:145
blitz::Array< double, 2 > blitz_double_array_3d_slice_irr(const Array< double, 3 > &V, int i, Range j, Range k)
Definition: lua_blitz.cc:181
void blitz_double_array_5d_set_iiiii(Array< double, 5 > &V, int i, int j, int k, int l, int m, double v)
Definition: lua_blitz.cc:524
void blitz_int_array_2d_set_rr(Array< int, 2 > &V, Range i, Range j, int v)
Definition: lua_blitz.cc:119
blitz::Array< double, 3 > blitz_double_array_5d_slice_ririr(const Array< double, 5 > &V, Range i, int j, Range k, int l, Range m)
Definition: lua_blitz.cc:480
blitz::Array< double, 4 > blitz_double_array_5d_slice_irrrr(const Array< double, 5 > &V, int i, Range j, Range k, Range l, Range m)
Definition: lua_blitz.cc:459
STL namespace.
blitz::Array< double, 3 > blitz_double_array_5d_slice_irirr(const Array< double, 5 > &V, int i, Range j, int k, Range l, Range m)
Definition: lua_blitz.cc:472
std::string blitz_double_array_4d_tostring(const Array< double, 4 > &V)
Definition: lua_blitz.cc:438
void blitz_double_array_4d_set_irii(Array< double, 4 > &V, int i, Range j, int k, int l, double v)
Definition: lua_blitz.cc:398
void blitz_double_array_2d_set_ir(Array< double, 2 > &V, int i, Range j, double v)
Definition: lua_blitz.cc:78
void blitz_int_array_1d_set_i(Array< int, 1 > &V, int i, int v)
Definition: lua_blitz.cc:32
double blitz_double_array_2d_read(const Array< double, 2 > &V, int i, int j)
Definition: lua_blitz.cc:60
blitz::Array< double, 2 > blitz_double_array_5d_slice_riiir(const Array< double, 5 > &V, Range i, int j, int k, int l, Range m)
Definition: lua_blitz.cc:505
blitz::Array< double, 3 > blitz_double_array_5d_slice_rirri(const Array< double, 5 > &V, Range i, int j, Range k, Range l, int m)
Definition: lua_blitz.cc:482
void blitz_double_array_1d_set_r_arr(Array< double, 1 > &V, Range r, Array< double, 1 > &v)
Definition: lua_blitz.cc:19
blitz::Array< double, 4 > blitz_double_array_5d_slice_rrirr(const Array< double, 5 > &V, Range i, Range j, int k, Range l, Range m)
Definition: lua_blitz.cc:463
Array< bool, 2 > ab2
Definition: lua_blitz.cc:721
void blitz_double_array_3d_set_arr_rii(Array< double, 3 > &V, Range i, int j, int k, Array< double, 1 > v)
Definition: lua_blitz.cc:230
blitz::Array< double, 2 > blitz_double_array_4d_slice_irri(const Array< double, 4 > &V, int i, Range j, Range k, int l)
Definition: lua_blitz.cc:361
void blitz_double_array_3d_set_rri(Array< double, 3 > &V, Range i, Range j, int k, double v)
Definition: lua_blitz.cc:203
blitz::Array< int, 1 > blitz_int_array_3d_slice_iri(const Array< int, 3 > &V, int i, Range j, int k)
Definition: lua_blitz.cc:255
Vt blitz_oper_add_array(const Vt &Arr, const Vt v)
Definition: lua_blitz.cc:619
std::string blitz_int_array_3d_tostring(const Array< int, 3 > &V)
Definition: lua_blitz.cc:298
void blitz_double_array_5d_set_rriir(Array< double, 5 > &V, Range i, Range j, int k, int l, Range m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:558
Vt blitz_exp(const Vt &Arr)
Definition: lua_blitz.cc:710
void blitz_double_array_4d_set_arr_riir(Array< double, 4 > &V, Range i, int j, int k, Range l, Array< double, 2 > &v)
Definition: lua_blitz.cc:418
void blitz_int_array_3d_set_iii(Array< int, 3 > &V, int i, int j, int k, int v)
Definition: lua_blitz.cc:278
void blitz_int_array_1d_set_r(Array< int, 1 > &V, Range r, int v)
Definition: lua_blitz.cc:34
void blitz_int_array_3d_set_irr(Array< int, 3 > &V, int i, Range j, Range k, int v)
Definition: lua_blitz.cc:264
void blitz_double_array_4d_set_arr_irri(Array< double, 4 > &V, int i, Range j, Range k, int l, Array< double, 2 > &v)
Definition: lua_blitz.cc:424
void blitz_double_array_3d_set_arr_irr(Array< double, 3 > &V, int i, Range j, Range k, Array< double, 2 > v)
Definition: lua_blitz.cc:219
Vt blitz_log(const Vt &Arr)
Definition: lua_blitz.cc:704
Array< double, 5 > ad5
Definition: lua_blitz.cc:719
void blitz_double_array_3d_set_arr_rir(Array< double, 3 > &V, Range i, int j, Range k, Array< double, 2 > v)
Definition: lua_blitz.cc:221
blitz::Array< int, 2 > blitz_int_array_3d_slice_irr(const Array< int, 3 > &V, int i, Range j, Range k)
Definition: lua_blitz.cc:246
blitz::Array< double, 2 > blitz_double_array_3d_slice_rir(const Array< double, 3 > &V, Range i, int j, Range k)
Definition: lua_blitz.cc:183
void blitz_bool_array_3d_set_iri(Array< bool, 3 > &V, int i, Range j, int k, bool v)
Definition: lua_blitz.cc:313
blitz::Array< double, 2 > blitz_double_array_4d_slice_riri(const Array< double, 4 > &V, Range i, int j, Range k, int l)
Definition: lua_blitz.cc:363
std::string blitz_double_array_5d_tostring(const Array< double, 5 > &V)
Definition: lua_blitz.cc:597
Vt double_oper_mul_blitz(const double v, const Vt &Arr)
Definition: lua_blitz.cc:649
blitz::Array< double, 3 > blitz_double_array_4d_slice_irrr(const Array< double, 4 > &V, int i, Range j, Range k, Range l)
Definition: lua_blitz.cc:344
blitz::Array< double, 1 > blitz_double_array_5d_slice_iirii(const Array< double, 5 > &V, int i, int j, Range k, int l, int m)
Definition: lua_blitz.cc:512
void blitz_double_array_4d_set_riir(Array< double, 4 > &V, Range i, int j, int k, Range l, double v)
Definition: lua_blitz.cc:385
void blitz_double_array_4d_set_rrii(Array< double, 4 > &V, Range i, Range j, int k, int l, double v)
Definition: lua_blitz.cc:387
void blitz_double_array_5d_set_iriii(Array< double, 5 > &V, int i, Range j, int k, int l, int m, blitz::Array< double, 1 > v)
Definition: lua_blitz.cc:594
blitz::Array< double, 1 > blitz_double_array_4d_slice_iiir(const Array< double, 4 > &V, int i, int j, int k, Range l)
Definition: lua_blitz.cc:366
std::string blitz_double_array_1d_tostring(const Array< double, 1 > &V)
Definition: lua_blitz.cc:22
Vt blitz_oper_div_array(const Vt &Arr, const Vt &v)
Definition: lua_blitz.cc:673
void blitz_double_array_4d_set_arr_irir(Array< double, 4 > &V, int i, Range j, int k, Range l, Array< double, 2 > &v)
Definition: lua_blitz.cc:422
double blitz_double_array_5d_read(const Array< double, 5 > &V, int i, int j, int k, int l, int m)
Definition: lua_blitz.cc:453
Apply value function to a blitz array.
int blitz_int_array_2d_read(const Array< int, 2 > &V, int i, int j)
Definition: lua_blitz.cc:97
blitz::Array< int, 2 > blitz_int_array_3d_slice_rir(const Array< int, 3 > &V, Range i, int j, Range k)
Definition: lua_blitz.cc:248
blitz::Array< double, 1 > blitz_double_array_5d_slice_riiii(const Array< double, 5 > &V, Range i, int j, int k, int l, int m)
Definition: lua_blitz.cc:518
void blitz_double_array_4d_set_iiii(Array< double, 4 > &V, int i, int j, int k, int l, double v)
Definition: lua_blitz.cc:404
void blitz_double_array_3d_set_arr_rri(Array< double, 3 > &V, Range i, Range j, int k, Array< double, 2 > v)
Definition: lua_blitz.cc:223
Vt double_oper_div_blitz(const double v, const Vt &Arr)
Definition: lua_blitz.cc:667
blitz::Array< double, 2 > blitz_double_array_5d_slice_rriii(const Array< double, 5 > &V, Range i, Range j, int k, int l, int m)
Definition: lua_blitz.cc:491
double blitz_min(const Vt &Arr)
Definition: lua_blitz.cc:694
int blitz_int_array_3d_read(const Array< int, 3 > &V, int i, int j, int k)
Definition: lua_blitz.cc:241
void blitz_int_array_2d_set_ii(Array< int, 2 > &V, int i, int j, int v)
Definition: lua_blitz.cc:110
blitz::Array< double, 1 > blitz_double_array_1d_slice(const Array< double, 1 > &V, Range i)
Definition: lua_blitz.cc:13
#define REGISTER_LUA_CLASS_NAME(X, Y)
Definition: register_lua.h:129
void blitz_double_array_3d_set_rii(Array< double, 3 > &V, Range i, int j, int k, double v)
Definition: lua_blitz.cc:210
Array< double, 1 > ad1
Definition: lua_blitz.cc:715
blitz::Array< double, 4 > blitz_double_array_4d_slice_rrrr(const Array< double, 4 > &V, Range i, Range j, Range k, Range l)
Definition: lua_blitz.cc:341
void blitz_bool_array_3d_set_irr(Array< bool, 3 > &V, int i, Range j, Range k, bool v)
Definition: lua_blitz.cc:315
void blitz_double_array_4d_set_iirr(Array< double, 4 > &V, int i, int j, Range k, Range l, double v)
Definition: lua_blitz.cc:383
void blitz_double_array_5d_set_rriri(Array< double, 5 > &V, Range i, Range j, int k, Range l, int m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:560
void blitz_double_array_5d_set_rrrii(Array< double, 5 > &V, Range i, Range j, Range k, int l, int m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:562
int blitz_int_array_1d_read(const Array< int, 1 > &V, int i)
Definition: lua_blitz.cc:30
blitz::Array< double, 1 > blitz_double_array_5d_slice_iriii(const Array< double, 5 > &V, int i, Range j, int k, int l, int m)
Definition: lua_blitz.cc:520
void blitz_double_array_4d_set_rrrr(Array< double, 4 > &V, Range i, Range j, Range k, Range l, double v)
Definition: lua_blitz.cc:371
void blitz_int_array_3d_set_arr_rrr(Array< int, 3 > &V, Range i, Range j, Range k, Array< int, 3 > v)
Definition: lua_blitz.cc:281
void blitz_double_array_4d_set_riii(Array< double, 4 > &V, Range i, int j, int k, int l, double v)
Definition: lua_blitz.cc:396
blitz::Array< double, 2 > blitz_double_array_5d_slice_iiirr(const Array< double, 5 > &V, int i, int j, int k, Range l, Range m)
Definition: lua_blitz.cc:509
void blitz_bool_array_2d_set_arr_ir(Array< bool, 2 > &V, int i, Range j, Array< bool, 1 > v)
Definition: lua_blitz.cc:163
void blitz_double_array_1d_set_i(Array< double, 1 > &V, int i, double v)
Definition: lua_blitz.cc:15
double blitz_max(const Vt &Arr)
Definition: lua_blitz.cc:699
blitz::Array< int, 2 > blitz_int_array_3d_slice_rri(const Array< int, 3 > &V, Range i, Range j, int k)
Definition: lua_blitz.cc:250
void blitz_double_array_4d_set_rirr(Array< double, 4 > &V, Range i, int j, Range k, Range l, double v)
Definition: lua_blitz.cc:376
void blitz_double_array_4d_set_riri(Array< double, 4 > &V, Range i, int j, Range k, int l, double v)
Definition: lua_blitz.cc:393
void blitz_double_array_5d_set_riiir(Array< double, 5 > &V, Range i, int j, int k, int l, Range m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:579
void blitz_double_array_3d_set_iri(Array< double, 3 > &V, int i, Range j, int k, double v)
Definition: lua_blitz.cc:208
double blitz_double_array_4d_read(const Array< double, 4 > &V, int i, int j, int k, int l)
Definition: lua_blitz.cc:338
blitz::Array< double, 2 > blitz_double_array_2d_slice_rr(const Array< double, 2 > &V, Range i, Range j)
Definition: lua_blitz.cc:64
Vt blitz_oper_mul_double(const Vt &Arr, const double v)
Definition: lua_blitz.cc:643
bool blitz_bool_array_3d_read(const Array< bool, 1 > &V, int i, int j, int k)
Definition: lua_blitz.cc:306
const Unit m("m", 1.0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Vt blitz_oper_div_double(const Vt &Arr, const double v)
Definition: lua_blitz.cc:661
void blitz_double_array_5d_set_rirri(Array< double, 5 > &V, Range i, int j, Range k, Range l, int m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:556
Vt blitz_oper_sub_array(const Vt &Arr, const Vt v)
Definition: lua_blitz.cc:637
void blitz_int_array_2d_set_ri(Array< int, 2 > &V, Range i, int j, int v)
Definition: lua_blitz.cc:114
blitz::Array< bool, 1 > blitz_bool_array_2d_slice_ir(const Array< bool, 2 > &V, int i, Range j)
Definition: lua_blitz.cc:142
void blitz_int_array_3d_set_rir(Array< int, 3 > &V, Range i, int j, Range k, int v)
Definition: lua_blitz.cc:266
void blitz_bool_array_1d_set_i(Array< bool, 1 > &V, int i, bool v)
Definition: lua_blitz.cc:47
blitz::Array< double, 1 > blitz_double_array_3d_slice_iri(const Array< double, 3 > &V, int i, Range j, int k)
Definition: lua_blitz.cc:190
void blitz_double_array_5d_set_ririr(Array< double, 5 > &V, Range i, int j, Range k, int l, Range m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:554
blitz::Array< double, 1 > blitz_double_array_2d_slice_ri(const Array< double, 2 > &V, Range i, int j)
Definition: lua_blitz.cc:68
void blitz_bool_array_3d_set_rrr(Array< bool, 3 > &V, Range i, Range j, Range k, bool v)
Definition: lua_blitz.cc:323
void blitz_int_array_3d_set_arr_iir(Array< int, 3 > &V, int i, int j, Range k, Array< int, 1 > v)
Definition: lua_blitz.cc:291
blitz::Array< int, 1 > blitz_int_array_3d_slice_iir(const Array< int, 3 > &V, int i, int j, Range k)
Definition: lua_blitz.cc:257
blitz::Array< double, 1 > blitz_double_array_5d_slice_iiiir(const Array< double, 5 > &V, int i, int j, int k, int l, Range m)
Definition: lua_blitz.cc:516
void blitz_double_array_3d_set_irr(Array< double, 3 > &V, int i, Range j, Range k, double v)
Definition: lua_blitz.cc:199
void blitz_double_array_2d_set_arr_rr(Array< double, 2 > &V, Range i, Range j, Array< double, 2 > v)
Definition: lua_blitz.cc:86
void blitz_double_array_4d_set_rrri(Array< double, 4 > &V, Range i, Range j, Range k, int l, double v)
Definition: lua_blitz.cc:380
void blitz_int_array_2d_set_arr_rr(Array< int, 2 > &V, Range i, Range j, Array< int, 2 > v)
Definition: lua_blitz.cc:125
Array< double, 3 > ad3
Definition: lua_blitz.cc:717
void blitz_double_array_5d_set_iiirr(Array< double, 5 > &V, int i, int j, int k, Range l, Range m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:583
blitz::Array< double, 2 > blitz_double_array_4d_slice_iirr(const Array< double, 4 > &V, int i, int j, Range k, Range l)
Definition: lua_blitz.cc:353
int blitz_double_array_5d_extent_4(const Array< double, 5 > &V)
Definition: lua_blitz.cc:445
void blitz_double_array_5d_set_rrrrr_val(Array< double, 5 > &V, Range i, Range j, Range k, Range l, Range m, double v)
Definition: lua_blitz.cc:527
void blitz_double_array_5d_set_irirr(Array< double, 5 > &V, int i, Range j, int k, Range l, Range m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:546
blitz::Array< double, 2 > blitz_double_array_5d_slice_iriir(const Array< double, 5 > &V, int i, Range j, int k, int l, Range m)
Definition: lua_blitz.cc:507
void blitz_double_array_5d_set_iriir(Array< double, 5 > &V, int i, Range j, int k, int l, Range m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:581
blitz::Array< double, 3 > blitz_double_array_5d_slice_riirr(const Array< double, 5 > &V, Range i, int j, int k, Range l, Range m)
Definition: lua_blitz.cc:478
int blitz_double_array_5d_extent_5(const Array< double, 5 > &V)
Definition: lua_blitz.cc:449
void blitz_double_array_2d_set_arr_ir(Array< double, 2 > &V, int i, Range j, Array< double, 1 > v)
Definition: lua_blitz.cc:84
Vt double_oper_sub_blitz(const double v, const Vt &Arr)
Definition: lua_blitz.cc:631
blitz::Array< bool, 2 > blitz_bool_array_2d_slice_rr(const Array< bool, 2 > &V, Range i, Range j)
Definition: lua_blitz.cc:140
blitz::Array< double, 2 > blitz_double_array_5d_slice_ririi(const Array< double, 5 > &V, Range i, int j, Range k, int l, int m)
Definition: lua_blitz.cc:493
void blitz_double_array_4d_set_arr_rrir(Array< double, 4 > &V, Range i, Range j, int k, Range l, Array< double, 3 > &v)
Definition: lua_blitz.cc:411
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
void blitz_double_array_5d_set_rrrir(Array< double, 5 > &V, Range i, Range j, Range k, int l, Range m, blitz::Array< double, 4 > v)
Definition: lua_blitz.cc:539
void blitz_double_array_5d_set_iirrr(Array< double, 5 > &V, int i, int j, Range k, Range l, Range m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:544
void blitz_double_array_4d_set_arr_rrri(Array< double, 4 > &V, Range i, Range j, Range k, int l, Array< double, 3 > &v)
Definition: lua_blitz.cc:413
#define REGISTER_LUA_END()
Definition: register_lua.h:134
def(luabind::constructor< int >()) .def("rows"
void blitz_double_array_3d_set_arr_iir(Array< double, 3 > &V, int i, int j, Range k, Array< double, 1 > v)
Definition: lua_blitz.cc:226
blitz::Array< double, 3 > blitz_double_array_5d_slice_irrri(const Array< double, 5 > &V, int i, Range j, Range k, Range l, int m)
Definition: lua_blitz.cc:476
void blitz_double_array_5d_set_rriii(Array< double, 5 > &V, Range i, Range j, int k, int l, int m, blitz::Array< double, 2 > v)
Definition: lua_blitz.cc:565
std::string blitz_bool_array_3d_tostring(const Array< bool, 3 > &V)
Definition: lua_blitz.cc:326
void blitz_double_array_3d_set_iir(Array< double, 3 > &V, int i, int j, Range k, double v)
Definition: lua_blitz.cc:206
blitz::Array< double, 1 > blitz_double_array_5d_slice_iiiri(const Array< double, 5 > &V, int i, int j, int k, Range l, int m)
Definition: lua_blitz.cc:514
blitz::Array< double, 4 > blitz_double_array_5d_slice_rrrri(const Array< double, 5 > &V, Range i, Range j, Range k, Range l, int m)
Definition: lua_blitz.cc:467
Array< bool, 1 > ab1
Definition: lua_blitz.cc:720
blitz::Array< double, 3 > blitz_double_array_4d_slice_rirr(const Array< double, 4 > &V, Range i, int j, Range k, Range l)
Definition: lua_blitz.cc:346
void blitz_int_array_3d_set_arr_rir(Array< int, 3 > &V, Range i, int j, Range k, Array< int, 2 > v)
Definition: lua_blitz.cc:286
void blitz_double_array_3d_set_rrr(Array< double, 3 > &V, Range i, Range j, Range k, double v)
Definition: lua_blitz.cc:196
Array< int, 3 > ai3
Definition: lua_blitz.cc:725
blitz::Array< double, 3 > blitz_double_array_5d_slice_rriri(const Array< double, 5 > &V, Range i, Range j, int k, Range l, int m)
Definition: lua_blitz.cc:486
blitz::Array< int, 1 > blitz_int_array_2d_slice_ri(const Array< int, 2 > &V, Range i, int j)
Definition: lua_blitz.cc:106
void blitz_double_array_4d_set_arr_iirr(Array< double, 4 > &V, int i, int j, Range k, Range l, Array< double, 2 > &v)
Definition: lua_blitz.cc:416
void blitz_double_array_5d_set_irrri(Array< double, 5 > &V, int i, Range j, Range k, Range l, int m, blitz::Array< double, 3 > v)
Definition: lua_blitz.cc:550
void blitz_double_array_4d_set_irrr(Array< double, 4 > &V, int i, Range j, Range k, Range l, double v)
Definition: lua_blitz.cc:374
Vt blitz_oper_add_double(const Vt &Arr, const double v)
Definition: lua_blitz.cc:607
void blitz_bool_array_3d_set_rir(Array< bool, 3 > &V, Range i, int j, Range k, bool v)
Definition: lua_blitz.cc:319
double value(const FullPhysics::AutoDerivative< double > &Ad)
void blitz_int_array_3d_set_arr_rii(Array< int, 3 > &V, Range i, int j, int k, Array< int, 1 > v)
Definition: lua_blitz.cc:295
std::string blitz_double_array_2d_tostring(const Array< double, 2 > &V)
Definition: lua_blitz.cc:89
void blitz_double_array_4d_set_arr_riri(Array< double, 4 > &V, Range i, int j, Range k, int l, Array< double, 2 > &v)
Definition: lua_blitz.cc:426
void blitz_double_array_1d_set_r_val(Array< double, 1 > &V, Range r, double v)
Definition: lua_blitz.cc:17
void blitz_bool_array_3d_set_rii(Array< bool, 3 > &V, Range i, int j, int k, bool v)
Definition: lua_blitz.cc:317
blitz::Array< double, 3 > blitz_double_array_5d_slice_rriir(const Array< double, 5 > &V, Range i, Range j, int k, int l, Range m)
Definition: lua_blitz.cc:484
blitz::Array< double, 5 > blitz_double_array_5d_slice_rrrrr(const Array< double, 5 > &V, Range i, Range j, Range k, Range l, Range m)
Definition: lua_blitz.cc:456
blitz::Array< double, 1 > blitz_double_array_3d_slice_rii(const Array< double, 3 > &V, Range i, int j, int k)
Definition: lua_blitz.cc:188
bool blitz_bool_array_1d_read(const Array< bool, 1 > &V, int i)
Definition: lua_blitz.cc:45
void blitz_double_array_5d_set_rrrrr_arr(Array< double, 5 > &V, Range i, Range j, Range k, Range l, Range m, blitz::Array< double, 5 > v)
Definition: lua_blitz.cc:530
void blitz_double_array_4d_set_iiri(Array< double, 4 > &V, int i, int j, Range k, int l, double v)
Definition: lua_blitz.cc:400
void blitz_double_array_2d_set_ii(Array< double, 2 > &V, int i, int j, double v)
Definition: lua_blitz.cc:71
void blitz_bool_array_2d_set_ii(Array< bool, 2 > &V, int i, int j, bool v)
Definition: lua_blitz.cc:149
void blitz_double_array_4d_set_arr_rirr(Array< double, 4 > &V, Range i, int j, Range k, Range l, Array< double, 3 > &v)
Definition: lua_blitz.cc:409
std::string blitz_int_array_1d_tostring(const Array< int, 1 > &V)
Definition: lua_blitz.cc:37
void blitz_int_array_3d_set_rri(Array< int, 3 > &V, Range i, Range j, int k, int v)
Definition: lua_blitz.cc:268
void blitz_double_array_5d_set_rrirr(Array< double, 5 > &V, Range i, Range j, int k, Range l, Range m, blitz::Array< double, 4 > v)
Definition: lua_blitz.cc:537
blitz::Array< double, 1 > blitz_double_array_4d_slice_riii(const Array< double, 4 > &V, Range i, int j, int k, int l)
Definition: lua_blitz.cc:368
void blitz_int_array_3d_set_iir(Array< int, 3 > &V, int i, int j, Range k, int v)
Definition: lua_blitz.cc:271
void blitz_int_array_2d_set_arr_ri(Array< int, 2 > &V, Range i, int j, Array< int, 1 > v)
Definition: lua_blitz.cc:121
blitz::Array< double, 1 > blitz_double_array_2d_slice_ir(const Array< double, 2 > &V, int i, Range j)
Definition: lua_blitz.cc:66
void blitz_double_array_4d_set_arr_iiri(Array< double, 4 > &V, int i, int j, Range k, int l, Array< double, 1 > &v)
Definition: lua_blitz.cc:433
void blitz_bool_array_1d_set_r(Array< bool, 1 > &V, Range r, bool v)
Definition: lua_blitz.cc:49
void blitz_int_array_3d_set_iri(Array< int, 3 > &V, int i, Range j, int k, int v)
Definition: lua_blitz.cc:273
void blitz_bool_array_2d_set_arr_rr(Array< bool, 2 > &V, Range i, Range j, Array< bool, 2 > v)
Definition: lua_blitz.cc:165

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:10