mathgl 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,10 @@
1
1
  # This document is converted from data_en.texi.
2
- class MglDataC
2
+
3
+ # MglData class
4
+ class MglData
3
5
 
4
6
  # Public variables.
5
- # Gets or sets the value in by "flat" index i without border checking. Index i should be in range [0, nx*ny*nz-1].
6
- # @overload get_val(i)
7
- # @param [long] i
8
- # @return [Float]
7
+ # Gets or sets the value in by "flat" index i without border checking. Index i should be in range (0, nx*ny*nz-1).
9
8
  # @overload get_val(i)
10
9
  # @param [long] i
11
10
  # @return [Float]
@@ -13,11 +12,7 @@ class MglDataC
13
12
  # @param [Float] val
14
13
  # @param [long] i
15
14
  # @return [nil]
16
- # @overload set_val(val,i)
17
- # @param [Float] val
18
- # @param [long] i
19
- # @return [nil]
20
- def set_val
15
+ def get_val
21
16
  end
22
17
 
23
18
 
@@ -25,17 +20,11 @@ end
25
20
  # Gets the x-, y-, z-size of the data.
26
21
  # @overload get_nx()
27
22
  # @return [long]
28
- # @overload get_nx()
29
- # @return [long]
30
23
  # @overload get_ny()
31
24
  # @return [long]
32
- # @overload get_ny()
33
- # @return [long]
34
- # @overload get_nz()
35
- # @return [long]
36
25
  # @overload get_nz()
37
26
  # @return [long]
38
- def get_nz
27
+ def get_nx
39
28
  end
40
29
 
41
30
 
@@ -46,11 +35,6 @@ end
46
35
  # @param [Integer] my default=1
47
36
  # @param [Integer] mz default=1
48
37
  # @return [MglData]
49
- # @overload initialize(mx=1,my=1,mz=1)
50
- # @param [Integer] mx default=1
51
- # @param [Integer] my default=1
52
- # @param [Integer] mz default=1
53
- # @return [MglDataC]
54
38
  def initialize
55
39
  end
56
40
 
@@ -90,39 +74,6 @@ end
90
74
  # @param [Integer] size
91
75
  # @param [Integer] cols
92
76
  # @return [MglData]
93
- # @overload initialize(dat2)
94
- # @param [MglData] dat2
95
- # @return [MglDataC]
96
- # @overload initialize(dat2)
97
- # @param [MglData] dat2
98
- # @return [MglDataC]
99
- # @overload initialize(size,dat2)
100
- # @param [Integer] size
101
- # @param [float] dat2
102
- # @return [MglDataC]
103
- # @overload initialize(size,cols,dat2)
104
- # @param [Integer] size
105
- # @param [Integer] cols
106
- # @param [float] dat2
107
- # @return [MglDataC]
108
- # @overload initialize(size,dat2)
109
- # @param [Integer] size
110
- # @param [Float] dat2
111
- # @return [MglDataC]
112
- # @overload initialize(size,cols,dat2)
113
- # @param [Integer] size
114
- # @param [Integer] cols
115
- # @param [Float] dat2
116
- # @return [MglDataC]
117
- # @overload initialize(size,dat2)
118
- # @param [Integer] size
119
- # @param [dual] dat2
120
- # @return [MglDataC]
121
- # @overload initialize(size,cols,dat2)
122
- # @param [Integer] size
123
- # @param [Integer] cols
124
- # @param [dual] dat2
125
- # @return [MglDataC]
126
77
  def initialize
127
78
  end
128
79
 
@@ -132,9 +83,6 @@ end
132
83
  # @overload initialize(fname)
133
84
  # @param [String] fname
134
85
  # @return [MglData]
135
- # @overload initialize(fname)
136
- # @param [String] fname
137
- # @return [MglDataC]
138
86
  def initialize
139
87
  end
140
88
 
@@ -146,11 +94,6 @@ end
146
94
  # @param [Integer] my default=1
147
95
  # @param [Integer] mz default=1
148
96
  # @return [nil]
149
- # @overload create(mx,my=1,mz=1)
150
- # @param [Integer] mx
151
- # @param [Integer] my default=1
152
- # @param [Integer] mz default=1
153
- # @return [nil]
154
97
  def create
155
98
  end
156
99
 
@@ -162,11 +105,6 @@ end
162
105
  # @param [Integer] my default=0
163
106
  # @param [Integer] mz default=0
164
107
  # @return [nil]
165
- # @overload rearrange(mx,my=0,mz=0)
166
- # @param [Integer] mx
167
- # @param [Integer] my default=0
168
- # @param [Integer] mz default=0
169
- # @return [nil]
170
108
  def rearrange
171
109
  end
172
110
 
@@ -176,9 +114,6 @@ end
176
114
  # @overload transpose(dim="yx")
177
115
  # @param [String] dim default="yx"
178
116
  # @return [nil]
179
- # @overload transpose(dim="yx")
180
- # @param [String] dim default="yx"
181
- # @return [nil]
182
117
  def transpose
183
118
  end
184
119
 
@@ -189,10 +124,6 @@ end
189
124
  # @param [Integer] n1
190
125
  # @param [Integer] n2 default=0
191
126
  # @return [nil]
192
- # @overload extend(n1,n2=0)
193
- # @param [Integer] n1
194
- # @param [Integer] n2 default=0
195
- # @return [nil]
196
127
  def extend
197
128
  end
198
129
 
@@ -205,23 +136,12 @@ end
205
136
  # @param [Integer] rz default=1
206
137
  # @param [bool] smooth default=false
207
138
  # @return [nil]
208
- # @overload squeeze(rx,ry=1,rz=1,smooth=false)
209
- # @param [Integer] rx
210
- # @param [Integer] ry default=1
211
- # @param [Integer] rz default=1
212
- # @param [bool] smooth default=false
213
- # @return [nil]
214
139
  def squeeze
215
140
  end
216
141
 
217
142
 
218
143
  # Data resizing.
219
- # Cuts off edges of the data i<n1 and i>n2 if n2>0 or i>n[xyz]-n2 if n2<=0 along direction dir.
220
- # @overload crop(n1,n2,dir='x')
221
- # @param [Integer] n1
222
- # @param [Integer] n2
223
- # @param [String] dir default='x'
224
- # @return [nil]
144
+ # Cuts off edges of the data i<n1 and i>n2 if n2>0 or i>n(xyz)-n2 if n2<=0 along direction dir.
225
145
  # @overload crop(n1,n2,dir='x')
226
146
  # @param [Integer] n1
227
147
  # @param [Integer] n2
@@ -238,11 +158,6 @@ end
238
158
  # @param [Integer] pos default=0
239
159
  # @param [Integer] num default=1
240
160
  # @return [nil]
241
- # @overload insert(dir,pos=0,num=1)
242
- # @param [String] dir
243
- # @param [Integer] pos default=0
244
- # @param [Integer] num default=1
245
- # @return [nil]
246
161
  def insert
247
162
  end
248
163
 
@@ -254,20 +169,31 @@ end
254
169
  # @param [Integer] pos default=0
255
170
  # @param [Integer] num default=1
256
171
  # @return [nil]
257
- # @overload delete(dir,pos=0,num=1)
258
- # @param [String] dir
259
- # @param [Integer] pos default=0
260
- # @param [Integer] num default=1
261
- # @return [nil]
262
172
  def delete
263
173
  end
264
174
 
265
175
 
266
176
  # Data resizing.
267
- # Join data cells from vdat to dat. At this, function increase dat sizes according following: z-size for 3D data arrays arrays with equal x-,y-sizes; or y-size for 2D data arrays with equal x-sizes; or x-size otherwise.
268
- # @overload join(vdat)
269
- # @param [MglData] vdat
177
+ # Sort data rows (or slices in 3D case) by values of specified column idx (or cell (idx,idy) for 3D case). Note, this function is not thread safe!
178
+ # @overload sort(idx,idy=-1)
179
+ # @param [lond] idx
180
+ # @param [long] idy default=-1
181
+ # @return [nil]
182
+ def sort
183
+ end
184
+
185
+
186
+ # Data resizing.
187
+ # Delete rows which values are equal to next row for given column idx.
188
+ # @overload clean(idx)
189
+ # @param [lond] idx
270
190
  # @return [nil]
191
+ def clean
192
+ end
193
+
194
+
195
+ # Data resizing.
196
+ # Join data cells from vdat to dat. At this, function increase dat sizes according following: z-size for 3D data arrays arrays with equal x-,y-sizes; or y-size for 2D data arrays with equal x-sizes; or x-size otherwise.
271
197
  # @overload join(vdat)
272
198
  # @param [MglData] vdat
273
199
  # @return [nil]
@@ -276,7 +202,7 @@ end
276
202
 
277
203
 
278
204
  # Data filling.
279
- # Allocates memory and copies the data from the float* or double* array.
205
+ # Allocates memory and copies the data from the flat float* or double* array.
280
206
  # @overload set(a,nx,ny=1,nz=1)
281
207
  # @param [float] a
282
208
  # @param [Integer] nx
@@ -289,23 +215,37 @@ end
289
215
  # @param [Integer] ny default=1
290
216
  # @param [Integer] nz default=1
291
217
  # @return [nil]
292
- # @overload set(a,nx,ny=1,nz=1)
218
+ def set
219
+ end
220
+
221
+
222
+ # Data filling.
223
+ # Allocates memory and copies the data from the float** or double** array with dimensions N1, N2, i.e. from array defined as mreal a(N1)(N2);.
224
+ # @overload set(a,n1,n2)
293
225
  # @param [float] a
294
- # @param [Integer] nx
295
- # @param [Integer] ny default=1
296
- # @param [Integer] nz default=1
226
+ # @param [Integer] n1
227
+ # @param [Integer] n2
297
228
  # @return [nil]
298
- # @overload set(a,nx,ny=1,nz=1)
229
+ # @overload set(a,n1,n2)
299
230
  # @param [Float] a
300
- # @param [Integer] nx
301
- # @param [Integer] ny default=1
302
- # @param [Integer] nz default=1
231
+ # @param [Integer] n1
232
+ # @param [Integer] n2
303
233
  # @return [nil]
304
- # @overload set(a,nx,ny=1,nz=1)
305
- # @param [dual] a
306
- # @param [Integer] nx
307
- # @param [Integer] ny default=1
308
- # @param [Integer] nz default=1
234
+ def set
235
+ end
236
+
237
+
238
+ # Data filling.
239
+ # Allocates memory and copies the data from the float*** or double*** array with dimensions N1, N2, N3, i.e. from array defined as mreal a(N1)(N2)(N3);.
240
+ # @overload set(a,n1,n2)
241
+ # @param [float] a
242
+ # @param [Integer] n1
243
+ # @param [Integer] n2
244
+ # @return [nil]
245
+ # @overload set(a,n1,n2)
246
+ # @param [Float] a
247
+ # @param [Integer] n1
248
+ # @param [Integer] n2
309
249
  # @return [nil]
310
250
  def set
311
251
  end
@@ -316,9 +256,6 @@ end
316
256
  # @overload set(v)
317
257
  # @param [gsl_vector] v
318
258
  # @return [nil]
319
- # @overload set(v)
320
- # @param [gsl_vector] v
321
- # @return [nil]
322
259
  def set
323
260
  end
324
261
 
@@ -328,9 +265,6 @@ end
328
265
  # @overload set(m)
329
266
  # @param [gsl_matrix] m
330
267
  # @return [nil]
331
- # @overload set(m)
332
- # @param [gsl_matrix] m
333
- # @return [nil]
334
268
  def set
335
269
  end
336
270
 
@@ -340,19 +274,6 @@ end
340
274
  # @overload set(from)
341
275
  # @param [MglData] from
342
276
  # @return [nil]
343
- # @overload set(from)
344
- # @param [MglData] from
345
- # @return [nil]
346
- def set
347
- end
348
-
349
-
350
- # Data filling.
351
- # Copies the data from mglData instances for real and imaginary parts of complex data arrays.
352
- # @overload set(re,im)
353
- # @param [MglData] re
354
- # @param [MglData] im
355
- # @return [nil]
356
277
  def set
357
278
  end
358
279
 
@@ -363,23 +284,11 @@ end
363
284
  # @param [std::vector<int>] d
364
285
  # @return [nil]
365
286
  # @overload set(d)
366
- # @param [std::vector<int>] d
367
- # @return [nil]
368
- # @overload set(d)
369
- # @param [std::vector<float>] d
370
- # @return [nil]
371
- # @overload set(d)
372
287
  # @param [std::vector<float>] d
373
288
  # @return [nil]
374
289
  # @overload set(d)
375
290
  # @param [std::vector<double>] d
376
291
  # @return [nil]
377
- # @overload set(d)
378
- # @param [std::vector<double>] d
379
- # @return [nil]
380
- # @overload set(d)
381
- # @param [std::vector<dual>] d
382
- # @return [nil]
383
292
  def set
384
293
  end
385
294
 
@@ -392,12 +301,6 @@ end
392
301
  # @param [Integer] ny default=1
393
302
  # @param [Integer] nz default=1
394
303
  # @return [nil]
395
- # @overload set(str,nx,ny=1,nz=1)
396
- # @param [String] str
397
- # @param [Integer] nx
398
- # @param [Integer] ny default=1
399
- # @param [Integer] nz default=1
400
- # @return [nil]
401
304
  def set
402
305
  end
403
306
 
@@ -413,37 +316,23 @@ end
413
316
  # @param [Integer] ny default=1
414
317
  # @param [Integer] nz default=1
415
318
  # @return [nil]
416
- # @overload link(from)
417
- # @param [MglData] from
418
- # @return [nil]
419
- # @overload link(a,nx,ny=1,nz=1)
420
- # @param [dual] a
421
- # @param [Integer] nx
422
- # @param [Integer] ny default=1
423
- # @param [Integer] nz default=1
424
- # @return [nil]
425
319
  def link
426
320
  end
427
321
 
428
322
 
429
323
  # Data filling.
430
- # Equidistantly fills the data values to range [v1, v2] in direction dir=(,,).
324
+ # Equidistantly fills the data values to range (v1, v2) in direction dir=('x','y','z').
431
325
  # @overload fill(v1,v2,dir='x')
432
326
  # @param [Float] v1
433
327
  # @param [Float] v2
434
328
  # @param [String] dir default='x'
435
329
  # @return [nil]
436
- # @overload fill(v1,v2,dir='x')
437
- # @param [dual] v1
438
- # @param [dual] v2
439
- # @param [String] dir default='x'
440
- # @return [nil]
441
330
  def fill
442
331
  end
443
332
 
444
333
 
445
334
  # Data filling.
446
- # The same as previous ones but coordinates , , are supposed to be normalized in range [0,1]. If dim>0 is specified then modification will be fulfilled only for slices >=dim.
335
+ # The same as previous ones but coordinates 'x', 'y', 'z' are supposed to be normalized in range (0,1). If dim>0 is specified then modification will be fulfilled only for slices >=dim.
447
336
  # @overload modify(eq,dim=0)
448
337
  # @param [String] eq
449
338
  # @param [Integer] dim default=0
@@ -457,20 +346,49 @@ end
457
346
  # @param [MglData] v
458
347
  # @param [MglData] w
459
348
  # @return [nil]
460
- # @overload modify(eq,dim=0)
461
- # @param [String] eq
462
- # @param [Integer] dim default=0
349
+ def modify
350
+ end
351
+
352
+
353
+ # Data filling.
354
+ # Fills data by 'x' or 'k' samples for Hankel ('h') or Fourier ('f') transform.
355
+ # @overload fill_sample(how)
356
+ # @param [String] how
463
357
  # @return [nil]
464
- # @overload modify(eq,v)
465
- # @param [String] eq
466
- # @param [MglData] v
358
+ def fill_sample
359
+ end
360
+
361
+
362
+ # Data filling.
363
+ # Sets value(s) of array a(i, j, k) = val. Negative indexes i, j, k=-1 set the value val to whole range in corresponding direction(s). For example, Put(val,-1,0,-1); sets a(i,0,j)=val for i=0...(nx-1), j=0...(nz-1).
364
+ # @overload put(val,i=-1,j=-1,k=-1)
365
+ # @param [Float] val
366
+ # @param [Integer] i default=-1
367
+ # @param [Integer] j default=-1
368
+ # @param [Integer] k default=-1
467
369
  # @return [nil]
468
- # @overload modify(eq,v,w)
469
- # @param [String] eq
370
+ def put
371
+ end
372
+
373
+
374
+ # Data filling.
375
+ # Copies value(s) from array v to the range of original array. Negative indexes i, j, k=-1 set the range in corresponding direction(s). At this minor dimensions of array v should be large than corresponding dimensions of this array. For example, Put(v,-1,0,-1); sets a(i,0,j)=v.ny>nz ? v(i,j) : v(i), where i=0...(nx-1), j=0...(nz-1) and condition v.nx>=nx is true.
376
+ # @overload put(v,i=-1,j=-1,k=-1)
470
377
  # @param [MglData] v
471
- # @param [MglData] w
378
+ # @param [Integer] i default=-1
379
+ # @param [Integer] j default=-1
380
+ # @param [Integer] k default=-1
472
381
  # @return [nil]
473
- def modify
382
+ def put
383
+ end
384
+
385
+
386
+ # Data filling.
387
+ # Sets the symbol ids for data columns. The string should contain one symbol 'a'...'z' per column. These ids are used in column.
388
+ # @overload set_column_id(ids)
389
+ # @param [String] ids
390
+ # @return [nil]
391
+ def set_column_id
474
392
  end
475
393
 
476
394
 
@@ -479,9 +397,6 @@ end
479
397
  # @overload read(fname)
480
398
  # @param [String] fname
481
399
  # @return [bool]
482
- # @overload read(fname)
483
- # @param [String] fname
484
- # @return [bool]
485
400
  def read
486
401
  end
487
402
 
@@ -494,12 +409,6 @@ end
494
409
  # @param [Integer] my default=1
495
410
  # @param [Integer] mz default=1
496
411
  # @return [bool]
497
- # @overload read(fname,mx,my=1,mz=1)
498
- # @param [String] fname
499
- # @param [Integer] mx
500
- # @param [Integer] my default=1
501
- # @param [Integer] mz default=1
502
- # @return [bool]
503
412
  def read
504
413
  end
505
414
 
@@ -510,10 +419,6 @@ end
510
419
  # @param [String] fname
511
420
  # @param [Integer] dim default=2
512
421
  # @return [bool]
513
- # @overload read_mat(fname,dim=2)
514
- # @param [String] fname
515
- # @param [Integer] dim default=2
516
- # @return [bool]
517
422
  def read_mat
518
423
  end
519
424
 
@@ -527,13 +432,6 @@ end
527
432
  # @param [Float] step default=1
528
433
  # @param [bool] as_slice default=false
529
434
  # @return [nil]
530
- # @overload read_range(templ,from,to,step=1,as_slice=false)
531
- # @param [String] templ
532
- # @param [Float] from
533
- # @param [Float] to
534
- # @param [Float] step default=1
535
- # @param [bool] as_slice default=false
536
- # @return [nil]
537
435
  def read_range
538
436
  end
539
437
 
@@ -544,10 +442,6 @@ end
544
442
  # @param [String] templ
545
443
  # @param [bool] as_slice default=false
546
444
  # @return [nil]
547
- # @overload read_all(templ,as_slice=false)
548
- # @param [String] templ
549
- # @param [bool] as_slice default=false
550
- # @return [nil]
551
445
  def read_all
552
446
  end
553
447
 
@@ -558,10 +452,6 @@ end
558
452
  # @param [String] fname
559
453
  # @param [Integer] ns default=-1
560
454
  # @return [nil]
561
- # @overload save(fname,ns=-1)
562
- # @param [String] fname
563
- # @param [Integer] ns default=-1
564
- # @return [nil]
565
455
  def save
566
456
  end
567
457
 
@@ -572,10 +462,6 @@ end
572
462
  # @param [String] fname
573
463
  # @param [String] dname
574
464
  # @return [nil]
575
- # @overload read_hdf(fname,dname)
576
- # @param [String] fname
577
- # @param [String] dname
578
- # @return [nil]
579
465
  def read_hdf
580
466
  end
581
467
 
@@ -587,11 +473,6 @@ end
587
473
  # @param [String] dname
588
474
  # @param [bool] rewrite default=false
589
475
  # @return [nil]
590
- # @overload save_hdf(fname,dname,rewrite=false)
591
- # @param [String] fname
592
- # @param [String] dname
593
- # @param [bool] rewrite default=false
594
- # @return [nil]
595
476
  def save_hdf
596
477
  end
597
478
 
@@ -603,15 +484,35 @@ end
603
484
  # @param [String] buf
604
485
  # @param [long] size
605
486
  # @return [Integer]
606
- # @overload datas_hdf(fname,buf,size)
607
- # @param [String] fname
608
- # @param [String] buf
609
- # @param [long] size
610
- # @return [Integer]
611
487
  def datas_hdf
612
488
  end
613
489
 
614
490
 
491
+ # File I/O.
492
+ # Reads data from bitmap file (now support only PNG format). The RGB values of bitmap pixels are transformed to mreal values in range (v1, v2) using color scheme scheme (Color scheme).
493
+ # @overload import(fname,scheme,v1=0,v2=1)
494
+ # @param [String] fname
495
+ # @param [String] scheme
496
+ # @param [Float] v1 default=0
497
+ # @param [Float] v2 default=1
498
+ # @return [nil]
499
+ def import
500
+ end
501
+
502
+
503
+ # File I/O.
504
+ # Saves data matrix (or ns-th slice for 3d data) to bitmap file (now support only PNG format). The data values are transformed from range (v1, v2) to RGB pixels of bitmap using color scheme scheme (Color scheme). If v1>=v2 then the values of v1, v2 are automatically determined as minimal and maximal value of the data array.
505
+ # @overload export(fname,scheme,v1=0,v2=0,ns=-1)
506
+ # @param [String] fname
507
+ # @param [String] scheme
508
+ # @param [Float] v1 default=0
509
+ # @param [Float] v2 default=0
510
+ # @param [Integer] ns default=-1
511
+ # @return [nil]
512
+ def export
513
+ end
514
+
515
+
615
516
  # Make another data.
616
517
  # Extracts sub-array data from the original data array keeping fixed positive index. For example SubData(-1,2) extracts 3d row (indexes are zero based), SubData(4,-1) extracts 5th column, SubData(-1,-1,3) extracts 4th slice and so on. If argument(s) are non-integer then linear interpolation between slices is used. In MGL version this command usually is used as inline one dat(xx,yy,zz).
617
518
  # @overload sub_data(xx,yy=-1,zz=-1)
@@ -619,11 +520,6 @@ end
619
520
  # @param [Float] yy default=-1
620
521
  # @param [Float] zz default=-1
621
522
  # @return [MglData]
622
- # @overload sub_data(xx,yy=-1,zz=-1)
623
- # @param [Float] xx
624
- # @param [Float] yy default=-1
625
- # @param [Float] zz default=-1
626
- # @return [MglData]
627
523
  def sub_data
628
524
  end
629
525
 
@@ -635,11 +531,6 @@ end
635
531
  # @param [MglData] yy
636
532
  # @param [MglData] zz
637
533
  # @return [MglData]
638
- # @overload sub_data(xx,yy,zz)
639
- # @param [MglData] xx
640
- # @param [MglData] yy
641
- # @param [MglData] zz
642
- # @return [MglData]
643
534
  def sub_data
644
535
  end
645
536
 
@@ -649,26 +540,12 @@ end
649
540
  # @overload column(eq)
650
541
  # @param [String] eq
651
542
  # @return [MglData]
652
- # @overload column(eq)
653
- # @param [String] eq
654
- # @return [MglData]
655
543
  def column
656
544
  end
657
545
 
658
546
 
659
547
  # Make another data.
660
- # Resizes the data to new size mx, my, mz from box (part) [x1,x2] x [y1,y2] x [z1,z2] of original array. Initially x,y,z coordinates are supposed to be in [0,1].
661
- # @overload resize(mx,my=1,mz=1,x1=0,x2=1,y1=0,y2=1,z1=0,z2=1)
662
- # @param [Integer] mx
663
- # @param [Integer] my default=1
664
- # @param [Integer] mz default=1
665
- # @param [Float] x1 default=0
666
- # @param [Float] x2 default=1
667
- # @param [Float] y1 default=0
668
- # @param [Float] y2 default=1
669
- # @param [Float] z1 default=0
670
- # @param [Float] z2 default=1
671
- # @return [MglData]
548
+ # Resizes the data to new size mx, my, mz from box (part) (x1,x2) x (y1,y2) x (z1,z2) of original array. Initially x,y,z coordinates are supposed to be in (0,1).
672
549
  # @overload resize(mx,my=1,mz=1,x1=0,x2=1,y1=0,y2=1,z1=0,z2=1)
673
550
  # @param [Integer] mx
674
551
  # @param [Integer] my default=1
@@ -685,7 +562,7 @@ end
685
562
 
686
563
 
687
564
  # Make another data.
688
- # Gets array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data idat, jdat, kdat. Coordinates from idat, jdat, kdat are supposed to be normalized in range [0,1] (if norm=true) or in ranges [0,nx], [0,ny], [0,nz] correspondingly.
565
+ # Gets array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data idat, jdat, kdat. Coordinates from idat, jdat, kdat are supposed to be normalized in range (0,1) (if norm=true) or in ranges (0,nx), (0,ny), (0,nz) correspondingly.
689
566
  # @overload evaluate(idat,norm=true)
690
567
  # @param [MglData] idat
691
568
  # @param [bool] norm default=true
@@ -701,40 +578,29 @@ end
701
578
  # @param [MglData] kdat
702
579
  # @param [bool] norm default=true
703
580
  # @return [MglData]
704
- # @overload evaluate(idat,norm=true)
705
- # @param [MglData] idat
706
- # @param [bool] norm default=true
707
- # @return [MglData]
708
- # @overload evaluate(idat,jdat,norm=true)
709
- # @param [MglData] idat
710
- # @param [MglData] jdat
581
+ def evaluate
582
+ end
583
+
584
+
585
+ # Make another data.
586
+ # Gets array which values is indexes (roots) along given direction dir, where interpolated values of data dat are equal to val. Output data will have the sizes of dat in directions transverse to dir. If data idat is provided then its values are used as starting points. This allows to find several branches by consequentive calls. Indexes are supposed to be normalized in range (0,1) (if norm=true) or in ranges (0,nx), (0,ny), (0,nz) correspondingly. Solve sample
587
+ # @overload solve(val,dir,norm=true)
588
+ # @param [Float] val
589
+ # @param [String] dir
711
590
  # @param [bool] norm default=true
712
591
  # @return [MglData]
713
- # @overload evaluate(idat,jdat,kdat,norm=true)
592
+ # @overload solve(val,dir,idat,norm=true)
593
+ # @param [Float] val
594
+ # @param [String] dir
714
595
  # @param [MglData] idat
715
- # @param [MglData] jdat
716
- # @param [MglData] kdat
717
596
  # @param [bool] norm default=true
718
597
  # @return [MglData]
719
- def evaluate
598
+ def solve
720
599
  end
721
600
 
722
601
 
723
602
  # Make another data.
724
- # Creates n-th points distribution of the data values in range [v1, v2]. Array w specifies weights of the data elements (by default is 1). Parameter nsub define the number of additional interpolated points (for smoothness of histogram). See also Data manipulation
725
- # @overload hist(n,v1=0,v2=1,nsub=0)
726
- # @param [Integer] n
727
- # @param [Float] v1 default=0
728
- # @param [Float] v2 default=1
729
- # @param [Integer] nsub default=0
730
- # @return [MglData]
731
- # @overload hist(w,n,v1=0,v2=1,nsub=0)
732
- # @param [MglData] w
733
- # @param [Integer] n
734
- # @param [Float] v1 default=0
735
- # @param [Float] v2 default=1
736
- # @param [Integer] nsub default=0
737
- # @return [MglData]
603
+ # Creates n-th points distribution of the data values in range (v1, v2). Array w specifies weights of the data elements (by default is 1). Parameter nsub define the number of additional interpolated points (for smoothness of histogram). See also Data manipulation
738
604
  # @overload hist(n,v1=0,v2=1,nsub=0)
739
605
  # @param [Integer] n
740
606
  # @param [Float] v1 default=0
@@ -754,11 +620,7 @@ end
754
620
 
755
621
  # Make another data.
756
622
  # Gets momentum (1d-array) of the data along direction dir. String how contain kind of momentum. The momentum is defined like as
757
- # if dir= and so on. Coordinates , , are data indexes normalized in range [0,1].
758
- # @overload momentum(dir,how)
759
- # @param [String] dir
760
- # @param [String] how
761
- # @return [MglData]
623
+ # if dir='z' and so on. Coordinates 'x', 'y', 'z' are data indexes normalized in range (0,1).
762
624
  # @overload momentum(dir,how)
763
625
  # @param [String] dir
764
626
  # @param [String] how
@@ -772,9 +634,6 @@ end
772
634
  # @overload sum(dir)
773
635
  # @param [String] dir
774
636
  # @return [MglData]
775
- # @overload sum(dir)
776
- # @param [String] dir
777
- # @return [MglData]
778
637
  def sum
779
638
  end
780
639
 
@@ -784,9 +643,6 @@ end
784
643
  # @overload max(dir)
785
644
  # @param [String] dir
786
645
  # @return [MglData]
787
- # @overload max(dir)
788
- # @param [String] dir
789
- # @return [MglData]
790
646
  def max
791
647
  end
792
648
 
@@ -796,18 +652,12 @@ end
796
652
  # @overload min(dir)
797
653
  # @param [String] dir
798
654
  # @return [MglData]
799
- # @overload min(dir)
800
- # @param [String] dir
801
- # @return [MglData]
802
655
  def min
803
656
  end
804
657
 
805
658
 
806
659
  # Make another data.
807
- # Returns direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on).
808
- # @overload combine(a)
809
- # @param [MglData] a
810
- # @return [MglData]
660
+ # Returns direct multiplication of arrays (like, res(i,j) = this(i)*a(j) and so on).
811
661
  # @overload combine(a)
812
662
  # @param [MglData] a
813
663
  # @return [MglData]
@@ -816,9 +666,7 @@ end
816
666
 
817
667
 
818
668
  # Make another data.
819
- # Gets array of diagonal elements a[i,i] (for 2D case) or a[i,i,i] (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1.
820
- # @overload trace()
821
- # @return [MglData]
669
+ # Gets array of diagonal elements a(i,i) (for 2D case) or a(i,i,i) (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1.
822
670
  # @overload trace()
823
671
  # @return [MglData]
824
672
  def trace
@@ -826,34 +674,12 @@ end
826
674
 
827
675
 
828
676
  # Make another data.
829
- # Gets array of real parts of the data.
830
- # @overload real()
831
- # @return [MglData]
832
- def real
833
- end
834
-
835
-
836
- # Make another data.
837
- # Gets array of imaginary parts of the data.
838
- # @overload imag()
839
- # @return [MglData]
840
- def imag
841
- end
842
-
843
-
844
- # Make another data.
845
- # Gets array of absolute values of the data.
846
- # @overload abs()
847
- # @return [MglData]
848
- def abs
849
- end
850
-
851
-
852
- # Make another data.
853
- # Gets array of arguments of the data.
854
- # @overload arg()
677
+ # Find roots of equation 'func'=0 for variable var with initial guess ini. Secant method is used for root finding.
678
+ # @overload roots(func,var)
679
+ # @param [String] func
680
+ # @param [String] var
855
681
  # @return [MglData]
856
- def arg
682
+ def roots
857
683
  end
858
684
 
859
685
 
@@ -862,9 +688,6 @@ end
862
688
  # @overload cum_sum(dir)
863
689
  # @param [String] dir
864
690
  # @return [nil]
865
- # @overload cum_sum(dir)
866
- # @param [String] dir
867
- # @return [nil]
868
691
  def cum_sum
869
692
  end
870
693
 
@@ -874,9 +697,6 @@ end
874
697
  # @overload integral(dir)
875
698
  # @param [String] dir
876
699
  # @return [nil]
877
- # @overload integral(dir)
878
- # @param [String] dir
879
- # @return [nil]
880
700
  def integral
881
701
  end
882
702
 
@@ -886,8 +706,20 @@ end
886
706
  # @overload diff(dir)
887
707
  # @param [String] dir
888
708
  # @return [nil]
889
- # @overload diff(dir)
890
- # @param [String] dir
709
+ def diff
710
+ end
711
+
712
+
713
+ # Data changing.
714
+ # Differentiates the data specified parametrically in direction x with y, z=constant. Parametrical differentiation uses the formula (for 2D case): da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j) where a_i=da/di, a_j=da/dj denotes usual differentiation along 1st and 2nd dimensions. The similar formula is used for 3D case. Note, that you may change the order of arguments -- for example, if you have 2D data a(i,j) which depend on coordinates (x(i,j), y(i,j)) then usual derivative along 'x' will be Diff(x,y); and usual derivative along 'y' will be Diff(y,x);.
715
+ # @overload diff(x,y)
716
+ # @param [MglData] x
717
+ # @param [MglData] y
718
+ # @return [nil]
719
+ # @overload diff(x,y,z)
720
+ # @param [MglData] x
721
+ # @param [MglData] y
722
+ # @param [MglData] z
891
723
  # @return [nil]
892
724
  def diff
893
725
  end
@@ -898,27 +730,30 @@ end
898
730
  # @overload diff2(dir)
899
731
  # @param [String] dir
900
732
  # @return [nil]
901
- # @overload diff2(dir)
902
- # @param [String] dir
903
- # @return [nil]
904
733
  def diff2
905
734
  end
906
735
 
907
736
 
908
737
  # Data changing.
909
- # Do Fourier transform of the data in given direction or directions. If dir contain then inverse Fourier is used. The Fourier transform is (see ).
910
- # @overload fft(dir)
738
+ # Do Sine transform of the data in given direction or directions. The Sine transform is \sum a_j \sin(k j) (see http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I).
739
+ # @overload sin_fft(dir)
911
740
  # @param [String] dir
912
741
  # @return [nil]
913
- def fft
742
+ def sin_fft
914
743
  end
915
744
 
916
745
 
917
746
  # Data changing.
918
- # Do Hankel transform of the data in given direction or directions. The Hankel transform is (see ).
919
- # @overload hankel(dir)
747
+ # Do Cosine transform of the data in given direction or directions. The Cosine transform is \sum a_j \cos(k j) (see http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I).
748
+ # @overload cos_fft(dir)
920
749
  # @param [String] dir
921
750
  # @return [nil]
751
+ def cos_fft
752
+ end
753
+
754
+
755
+ # Data changing.
756
+ # Do Hankel transform of the data in given direction or directions. The Hankel transform is \sum a_j J_0(k j) (see http://en.wikipedia.org/wiki/Hankel_transform).
922
757
  # @overload hankel(dir)
923
758
  # @param [String] dir
924
759
  # @return [nil]
@@ -931,19 +766,12 @@ end
931
766
  # @overload swap(dir)
932
767
  # @param [String] dir
933
768
  # @return [nil]
934
- # @overload swap(dir)
935
- # @param [String] dir
936
- # @return [nil]
937
769
  def swap
938
770
  end
939
771
 
940
772
 
941
773
  # Data changing.
942
- # Rolls the data along direction dir. Resulting array will be out[i] = ini[(i+num)%nx] if dir='x'.
943
- # @overload roll(dir,error)
944
- # @param [String] dir
945
- # @param [unknown] error
946
- # @return [nil]
774
+ # Rolls the data along direction dir. Resulting array will be out(i) = ini((i+num)%nx) if dir='x'.
947
775
  # @overload roll(dir,error)
948
776
  # @param [String] dir
949
777
  # @param [unknown] error
@@ -953,10 +781,7 @@ end
953
781
 
954
782
 
955
783
  # Data changing.
956
- # Mirror the left-to-right part of the data in given direction. Looks like change the value index i->n-i. Note, that the similar effect in graphics you can reach by using options (), for example, surf dat; xrange 1 -1.
957
- # @overload mirror(dir)
958
- # @param [String] dir
959
- # @return [nil]
784
+ # Mirror the left-to-right part of the data in given direction. Looks like change the value index i->n-i. Note, that the similar effect in graphics you can reach by using options (Command options), for example, surf dat; xrange 1 -1.
960
785
  # @overload mirror(dir)
961
786
  # @param [String] dir
962
787
  # @return [nil]
@@ -965,11 +790,17 @@ end
965
790
 
966
791
 
967
792
  # Data changing.
968
- # Smooths the data on specified direction or directions. String dirs specifies the dimensions which will be smoothed. It may contain characters: for 1st dimension, for 2nd dimension, for 3d dimension. If string dir contain: then does nothing, -- linear averaging over 3 points, -- linear averaging over 5 points. By default quadratic averaging over 5 points is used.
969
- # @overload smooth(dir="xyz",delta=0)
970
- # @param [String] dir default="xyz"
971
- # @param [Float] delta default=0
793
+ # Remove value steps (like phase jumps after inverse trigonometric functions) with period da in given direction.
794
+ # @overload sew(dir,m_pi)
795
+ # @param [String] dir
796
+ # @param [mreal da=2] m_pi
972
797
  # @return [nil]
798
+ def sew
799
+ end
800
+
801
+
802
+ # Data changing.
803
+ # Smooths the data on specified direction or directions. String dirs specifies the dimensions which will be smoothed. It may contain characters: 'x' for 1st dimension, 'y' for 2nd dimension, 'z' for 3d dimension. If string dir contain: '0' then does nothing, '3' -- linear averaging over 3 points, '5' -- linear averaging over 5 points. By default quadratic averaging over 5 points is used.
973
804
  # @overload smooth(dir="xyz",delta=0)
974
805
  # @param [String] dir default="xyz"
975
806
  # @param [Float] delta default=0
@@ -978,70 +809,128 @@ def smooth
978
809
  end
979
810
 
980
811
 
981
- # Interpolation.
982
- # Interpolates data by linear function to the given point x in [0...nx-1], y in [0...ny-1], z in [0...nz-1].
983
- # @overload linear(x,y=0,z=0)
984
- # @param [Float] x
985
- # @param [Float] y default=0
986
- # @param [Float] z default=0
987
- # @return [Float]
988
- # @overload linear(x,y=0,z=0)
989
- # @param [Float] x
990
- # @param [Float] y default=0
991
- # @param [Float] z default=0
992
- # @return [dual]
993
- def linear
812
+ # Data changing.
813
+ # Find envelop for data values along direction dir.
814
+ # @overload envelop(dir='x')
815
+ # @param [String] dir default='x'
816
+ # @return [nil]
817
+ def envelop
994
818
  end
995
819
 
996
820
 
997
- # Interpolation.
998
- # Interpolates data by linear function to the given point x, y, z which assumed to be normalized in range [0, 1].
999
- # @overload linear1(x,y=0,z=0)
1000
- # @param [Float] x
1001
- # @param [Float] y default=0
1002
- # @param [Float] z default=0
1003
- # @return [Float]
1004
- # @overload linear1(x,y=0,z=0)
1005
- # @param [Float] x
1006
- # @param [Float] y default=0
1007
- # @param [Float] z default=0
1008
- # @return [dual]
1009
- def linear1
821
+ # Data changing.
822
+ # Normalizes the data to range (v1,v2). If flag sym=true then symmetrical interval (-max(|v1|,|v2|), max(|v1|,|v2|)) is used. Modification will be applied only for slices >=dim.
823
+ # @overload norm(v1=0,v2=1,sym=false,dim=0)
824
+ # @param [Float] v1 default=0
825
+ # @param [Float] v2 default=1
826
+ # @param [bool] sym default=false
827
+ # @param [Integer] dim default=0
828
+ # @return [nil]
829
+ def norm
830
+ end
831
+
832
+
833
+ # Data changing.
834
+ # Normalizes data slice-by-slice along direction dir the data in slices to range (v1,v2). If flag sym=true then symmetrical interval (-max(|v1|,|v2|), max(|v1|,|v2|)) is used. If keep_en is set then maximal value of k-th slice will be limited by
835
+ # @overload norm_sl(v1=0,v2=1,dir='z',keep_en=true,sym=false)
836
+ # @param [Float] v1 default=0
837
+ # @param [Float] v2 default=1
838
+ # @param [String] dir default='z'
839
+ # @param [bool] keep_en default=true
840
+ # @param [bool] sym default=false
841
+ # @return [nil]
842
+ def norm_sl
1010
843
  end
1011
844
 
1012
845
 
1013
846
  # Interpolation.
1014
- # Interpolates data by linear function to the given point x in [0...nx-1], y in [0...ny-1], z in [0...nz-1]. The values of derivatives at the point are saved in dif.
1015
- # @overload linear(dif,x,y=0,z=0)
847
+ # Interpolates data by cubic spline to the given point x in (0...nx-1), y in (0...ny-1), z in (0...nz-1).
848
+ # @overload spline(x,y=0,z=0)
849
+ # @param [Float] x
850
+ # @param [Float] y default=0
851
+ # @param [Float] z default=0
852
+ # @return [Float]
853
+ def spline
854
+ end
855
+
856
+
857
+ # Interpolation.
858
+ # Interpolates data by cubic spline to the given point x, y, z which assumed to be normalized in range (0, 1).
859
+ # @overload spline1(x,y=0,z=0)
860
+ # @param [Float] x
861
+ # @param [Float] y default=0
862
+ # @param [Float] z default=0
863
+ # @return [Float]
864
+ def spline1
865
+ end
866
+
867
+
868
+ # Interpolation.
869
+ # Interpolates data by cubic spline to the given point x in (0...nx-1), y in (0...ny-1), z in (0...nz-1). The values of derivatives at the point are saved in dif.
870
+ # @overload spline(dif,x,y=0,z=0)
1016
871
  # @param [MglPoint] dif
1017
872
  # @param [Float] x
1018
873
  # @param [Float] y default=0
1019
874
  # @param [Float] z default=0
1020
875
  # @return [Float]
1021
- # @overload linear(dif,x,y=0,z=0)
876
+ def spline
877
+ end
878
+
879
+
880
+ # Interpolation.
881
+ # Interpolates data by cubic spline to the given point x, y, z which assumed to be normalized in range (0, 1). The values of derivatives at the point are saved in dif.
882
+ # @overload spline1(dif,x,y=0,z=0)
1022
883
  # @param [MglPoint] dif
1023
884
  # @param [Float] x
1024
885
  # @param [Float] y default=0
1025
886
  # @param [Float] z default=0
1026
- # @return [dual]
887
+ # @return [Float]
888
+ def spline1
889
+ end
890
+
891
+
892
+ # Interpolation.
893
+ # Interpolates data by linear function to the given point x in (0...nx-1), y in (0...ny-1), z in (0...nz-1).
894
+ # @overload linear(x,y=0,z=0)
895
+ # @param [Float] x
896
+ # @param [Float] y default=0
897
+ # @param [Float] z default=0
898
+ # @return [Float]
1027
899
  def linear
1028
900
  end
1029
901
 
1030
902
 
1031
903
  # Interpolation.
1032
- # Interpolates data by linear function to the given point x, y, z which assumed to be normalized in range [0, 1]. The values of derivatives at the point are saved in dif.
1033
- # @overload linear1(dif,x,y=0,z=0)
904
+ # Interpolates data by linear function to the given point x, y, z which assumed to be normalized in range (0, 1).
905
+ # @overload linear1(x,y=0,z=0)
906
+ # @param [Float] x
907
+ # @param [Float] y default=0
908
+ # @param [Float] z default=0
909
+ # @return [Float]
910
+ def linear1
911
+ end
912
+
913
+
914
+ # Interpolation.
915
+ # Interpolates data by linear function to the given point x in (0...nx-1), y in (0...ny-1), z in (0...nz-1). The values of derivatives at the point are saved in dif.
916
+ # @overload linear(dif,x,y=0,z=0)
1034
917
  # @param [MglPoint] dif
1035
918
  # @param [Float] x
1036
919
  # @param [Float] y default=0
1037
920
  # @param [Float] z default=0
1038
921
  # @return [Float]
922
+ def linear
923
+ end
924
+
925
+
926
+ # Interpolation.
927
+ # Interpolates data by linear function to the given point x, y, z which assumed to be normalized in range (0, 1). The values of derivatives at the point are saved in dif.
1039
928
  # @overload linear1(dif,x,y=0,z=0)
1040
929
  # @param [MglPoint] dif
1041
930
  # @param [Float] x
1042
931
  # @param [Float] y default=0
1043
932
  # @param [Float] z default=0
1044
- # @return [dual]
933
+ # @return [Float]
1045
934
  def linear1
1046
935
  end
1047
936
 
@@ -1053,11 +942,6 @@ end
1053
942
  # @overload print_info(fp)
1054
943
  # @param [FILE] fp
1055
944
  # @return [nil]
1056
- # @overload print_info()
1057
- # @return [String]
1058
- # @overload print_info(fp)
1059
- # @param [FILE] fp
1060
- # @return [nil]
1061
945
  def print_info
1062
946
  end
1063
947
 
@@ -1070,13 +954,7 @@ end
1070
954
  # @return [long]
1071
955
  # @overload get_nz()
1072
956
  # @return [long]
1073
- # @overload get_nx()
1074
- # @return [long]
1075
- # @overload get_ny()
1076
- # @return [long]
1077
- # @overload get_nz()
1078
- # @return [long]
1079
- def get_nz
957
+ def get_nx
1080
958
  end
1081
959
 
1082
960
 
@@ -1084,8 +962,6 @@ end
1084
962
  # Gets maximal value of the data.
1085
963
  # @overload maximal()
1086
964
  # @return [Float]
1087
- # @overload maximal()
1088
- # @return [Float]
1089
965
  def maximal
1090
966
  end
1091
967
 
@@ -1094,8 +970,6 @@ end
1094
970
  # Gets minimal value of the data.
1095
971
  # @overload minimal()
1096
972
  # @return [Float]
1097
- # @overload minimal()
1098
- # @return [Float]
1099
973
  def minimal
1100
974
  end
1101
975
 
@@ -1107,11 +981,6 @@ end
1107
981
  # @param [Integer] j
1108
982
  # @param [Integer] k
1109
983
  # @return [Float]
1110
- # @overload minimal(i,j,k)
1111
- # @param [Integer] i
1112
- # @param [Integer] j
1113
- # @param [Integer] k
1114
- # @return [Float]
1115
984
  def minimal
1116
985
  end
1117
986
 
@@ -1123,11 +992,6 @@ end
1123
992
  # @param [Integer] j
1124
993
  # @param [Integer] k
1125
994
  # @return [Float]
1126
- # @overload maximal(i,j,k)
1127
- # @param [Integer] i
1128
- # @param [Integer] j
1129
- # @param [Integer] k
1130
- # @return [Float]
1131
995
  def maximal
1132
996
  end
1133
997
 
@@ -1139,11 +1003,6 @@ end
1139
1003
  # @param [Float] y
1140
1004
  # @param [Float] z
1141
1005
  # @return [Float]
1142
- # @overload minimal(x,y,z)
1143
- # @param [Float] x
1144
- # @param [Float] y
1145
- # @param [Float] z
1146
- # @return [Float]
1147
1006
  def minimal
1148
1007
  end
1149
1008
 
@@ -1155,424 +1014,949 @@ end
1155
1014
  # @param [Float] y
1156
1015
  # @param [Float] z
1157
1016
  # @return [Float]
1158
- # @overload maximal(x,y,z)
1159
- # @param [Float] x
1160
- # @param [Float] y
1161
- # @param [Float] z
1162
- # @return [Float]
1163
1017
  def maximal
1164
1018
  end
1165
1019
 
1166
1020
 
1167
- end # MglDataC
1168
-
1169
- class MglData
1170
-
1171
- # Data resizing.
1172
- # Sort data rows (or slices in 3D case) by values of specified column idx (or cell (idx,idy) for 3D case). Note, this function is not thread safe!
1173
- # @overload sort(idx,idy=-1)
1174
- # @param [lond] idx
1175
- # @param [long] idy default=-1
1176
- # @return [nil]
1177
- def sort
1021
+ # Data information.
1022
+ # Gets zero-momentum (energy, I=\sum dat_i) and write first momentum (median, a = \sum \xi_i dat_i/I), second momentum (width, w^2 = \sum (\xi_i-a)^2 dat_i/I), third momentum (skewness, s = \sum (\xi_i-a)^3 dat_i/ I w^3) and fourth momentum (kurtosis, k = \sum (\xi_i-a)^4 dat_i / 3 I w^4) to variables. Here \xi is corresponding coordinate if dir is ''x'', ''y'' or ''z''. Otherwise median is a = \sum dat_i/N, width is w^2 = \sum (dat_i-a)^2/N and so on.
1023
+ # @overload momentum(dir,a,w)
1024
+ # @param [String] dir
1025
+ # @param [Float] a
1026
+ # @param [Float] w
1027
+ # @return [Float]
1028
+ # @overload momentum(dir,m,w,s,k)
1029
+ # @param [String] dir
1030
+ # @param [Float] m
1031
+ # @param [Float] w
1032
+ # @param [Float] s
1033
+ # @param [Float] k
1034
+ # @return [Float]
1035
+ def momentum
1178
1036
  end
1179
1037
 
1180
1038
 
1181
- # Data resizing.
1182
- # Delete rows which values are equal to next row for given column idx.
1183
- # @overload clean(idx)
1184
- # @param [lond] idx
1185
- # @return [nil]
1186
- def clean
1039
+ # Data information.
1040
+ # Find position (after specified in i, j, k) of first nonzero value of formula cond. Function return the data value at found position.
1041
+ # @overload find(cond,i,j,k)
1042
+ # @param [String] cond
1043
+ # @param [Integer] i
1044
+ # @param [Integer] j
1045
+ # @param [Integer] k
1046
+ # @return [Float]
1047
+ def find
1187
1048
  end
1188
1049
 
1189
1050
 
1190
- # Data filling.
1191
- # Allocates memory and copies the data from the float** or double** array with dimensions N1, N2, i.e. from array defined as mreal a[N1][N2];.
1192
- # @overload set(a,n1,n2)
1193
- # @param [float] a
1194
- # @param [Integer] n1
1195
- # @param [Integer] n2
1196
- # @return [nil]
1197
- # @overload set(a,n1,n2)
1198
- # @param [Float] a
1199
- # @param [Integer] n1
1200
- # @param [Integer] n2
1201
- # @return [nil]
1202
- def set
1051
+ # Data information.
1052
+ # Find position (before specified in i, j, k) of last nonzero value of formula cond. Function return the data value at found position.
1053
+ # @overload last(cond,i,j,k)
1054
+ # @param [String] cond
1055
+ # @param [Integer] i
1056
+ # @param [Integer] j
1057
+ # @param [Integer] k
1058
+ # @return [Float]
1059
+ def last
1203
1060
  end
1204
1061
 
1205
1062
 
1206
- # Data filling.
1207
- # Allocates memory and copies the data from the float*** or double*** array with dimensions N1, N2, N3, i.e. from array defined as mreal a[N1][N2][N3];.
1208
- # @overload set(a,n1,n2)
1209
- # @param [float] a
1210
- # @param [Integer] n1
1211
- # @param [Integer] n2
1212
- # @return [nil]
1213
- # @overload set(a,n1,n2)
1214
- # @param [Float] a
1215
- # @param [Integer] n1
1216
- # @param [Integer] n2
1217
- # @return [nil]
1218
- def set
1063
+ # Data information.
1064
+ # Return position of first in direction dir nonzero value of formula cond. The search is started from point (i,j,k).
1065
+ # @overload find(cond,dir,i=0,j=0,k=0)
1066
+ # @param [String] cond
1067
+ # @param [String] dir
1068
+ # @param [Integer] i default=0
1069
+ # @param [Integer] j default=0
1070
+ # @param [Integer] k default=0
1071
+ # @return [Integer]
1072
+ def find
1219
1073
  end
1220
1074
 
1221
1075
 
1222
- # Data filling.
1223
- # Fills data by 'x' or 'k' samples for Hankel ('h') or Fourier ('f') transform.
1224
- # @overload fill_sample(how)
1225
- # @param [String] how
1226
- # @return [nil]
1227
- # @overload mgl_data_fill_sample(a,how)
1228
- # @param [HMDT] a
1229
- # @param [String] how
1230
- # @return [nil]
1231
- def mgl_data_fill_sample
1076
+ # Data information.
1077
+ # Determines if any nonzero value of formula in the data array.
1078
+ # @overload find_any(cond)
1079
+ # @param [String] cond
1080
+ # @return [bool]
1081
+ def find_any
1232
1082
  end
1233
1083
 
1234
1084
 
1235
- # Data filling.
1236
- # Sets value(s) of array a[i, j, k] = val. Negative indexes i, j, k=-1 set the value val to whole range in corresponding direction(s). For example, Put(val,-1,0,-1); sets a[i,0,j]=val for i=0...(nx-1), j=0...(nz-1).
1237
- # @overload put(val,i=-1,j=-1,k=-1)
1238
- # @param [Float] val
1239
- # @param [Integer] i default=-1
1240
- # @param [Integer] j default=-1
1241
- # @param [Integer] k default=-1
1242
- # @return [nil]
1243
- # @overload mgl_data_put_val(a,val,i,j,k)
1244
- # @param [HMDT] a
1245
- # @param [Float] val
1246
- # @param [Integer] i
1247
- # @param [Integer] j
1248
- # @param [Integer] k
1249
- # @return [nil]
1250
- def mgl_data_put_val
1085
+ # Operators.
1086
+ # Adds the other data or the number.
1087
+ # @overload +(b)
1088
+ # @param [MglData] b
1089
+ # @return [MglData]
1090
+ # @overload +(b)
1091
+ # @param [Float] b
1092
+ # @return [MglData]
1093
+ def +
1251
1094
  end
1252
1095
 
1253
1096
 
1254
- # Data filling.
1255
- # Copies value(s) from array v to the range of original array. Negative indexes i, j, k=-1 set the range in corresponding direction(s). At this minor dimensions of array v should be large than corresponding dimensions of this array. For example, Put(v,-1,0,-1); sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(nx-1), j=0...(nz-1) and condition v.nx>=nx is true.
1256
- # @overload put(v,i=-1,j=-1,k=-1)
1257
- # @param [MglData] v
1258
- # @param [Integer] i default=-1
1259
- # @param [Integer] j default=-1
1260
- # @param [Integer] k default=-1
1261
- # @return [nil]
1262
- def put
1097
+ # Operators.
1098
+ # Subtracts the other data or the number.
1099
+ # @overload -(b)
1100
+ # @param [MglData] b
1101
+ # @return [MglData]
1102
+ # @overload -(b)
1103
+ # @param [Float] b
1104
+ # @return [MglData]
1105
+ def -
1263
1106
  end
1264
1107
 
1265
1108
 
1266
- # Data filling.
1267
- # Sets the symbol ids for data columns. The string should contain one symbol 'a'...'z' per column. These ids are used in column.
1268
- # @overload set_column_id(ids)
1269
- # @param [String] ids
1270
- # @return [nil]
1271
- # @overload mgl_data_set_id(a,ids)
1272
- # @param [HMDT] a
1273
- # @param [String] ids
1109
+ # Operators.
1110
+ # Multiplies by the other data or the number.
1111
+ # @overload *(b)
1112
+ # @param [MglData] b
1113
+ # @return [MglData]
1114
+ # @overload *(b)
1115
+ # @param [Float] b
1116
+ # @return [MglData]
1117
+ def *
1118
+ end
1119
+
1120
+
1121
+ # Operators.
1122
+ # Divides by the other data or the number.
1123
+ # @overload /(b)
1124
+ # @param [MglData] b
1125
+ # @return [MglData]
1126
+ # @overload /(b)
1127
+ # @param [Float] b
1128
+ # @return [MglData]
1129
+ def /
1130
+ end
1131
+
1132
+
1133
+ end # MglData
1134
+
1135
+
1136
+ # MglDataC class
1137
+ class MglDataC
1138
+
1139
+ # Public variables.
1140
+ # Gets or sets the value in by "flat" index i without border checking. Index i should be in range (0, nx*ny*nz-1).
1141
+ # @overload get_val(i)
1142
+ # @param [long] i
1143
+ # @return [Float]
1144
+ # @overload set_val(val,i)
1145
+ # @param [Float] val
1146
+ # @param [long] i
1147
+ # @return [nil]
1148
+ def get_val
1149
+ end
1150
+
1151
+
1152
+ # Public variables.
1153
+ # Gets the x-, y-, z-size of the data.
1154
+ # @overload get_nx()
1155
+ # @return [long]
1156
+ # @overload get_ny()
1157
+ # @return [long]
1158
+ # @overload get_nz()
1159
+ # @return [long]
1160
+ def get_nx
1161
+ end
1162
+
1163
+
1164
+ # Data constructor.
1165
+ # Default constructor. Allocates the memory for data array and initializes it by zero. If string eq is specified then data will be filled by corresponding formula as in fill.
1166
+ # @overload initialize(mx=1,my=1,mz=1)
1167
+ # @param [Integer] mx default=1
1168
+ # @param [Integer] my default=1
1169
+ # @param [Integer] mz default=1
1170
+ # @return [MglDataC]
1171
+ def initialize
1172
+ end
1173
+
1174
+
1175
+ # Data constructor.
1176
+ # Copy constructor. Allocates the memory for data array and copy values from other array. At this, if parameter eq is specified then the data will be modified by corresponding formula similarly to fill.
1177
+ # @overload initialize(dat2)
1178
+ # @param [MglData] dat2
1179
+ # @return [MglDataC]
1180
+ # @overload initialize(dat2)
1181
+ # @param [MglData] dat2
1182
+ # @return [MglDataC]
1183
+ # @overload initialize(size,dat2)
1184
+ # @param [Integer] size
1185
+ # @param [float] dat2
1186
+ # @return [MglDataC]
1187
+ # @overload initialize(size,cols,dat2)
1188
+ # @param [Integer] size
1189
+ # @param [Integer] cols
1190
+ # @param [float] dat2
1191
+ # @return [MglDataC]
1192
+ # @overload initialize(size,dat2)
1193
+ # @param [Integer] size
1194
+ # @param [Float] dat2
1195
+ # @return [MglDataC]
1196
+ # @overload initialize(size,cols,dat2)
1197
+ # @param [Integer] size
1198
+ # @param [Integer] cols
1199
+ # @param [Float] dat2
1200
+ # @return [MglDataC]
1201
+ # @overload initialize(size,dat2)
1202
+ # @param [Integer] size
1203
+ # @param [dual] dat2
1204
+ # @return [MglDataC]
1205
+ # @overload initialize(size,cols,dat2)
1206
+ # @param [Integer] size
1207
+ # @param [Integer] cols
1208
+ # @param [dual] dat2
1209
+ # @return [MglDataC]
1210
+ def initialize
1211
+ end
1212
+
1213
+
1214
+ # Data constructor.
1215
+ # Reads data from tab-separated text file with auto determining sizes of the data.
1216
+ # @overload initialize(fname)
1217
+ # @param [String] fname
1218
+ # @return [MglDataC]
1219
+ def initialize
1220
+ end
1221
+
1222
+
1223
+ # Data resizing.
1224
+ # Creates or recreates the array with specified size and fills it by zero. This function does nothing if one of parameters mx, my, mz is zero or negative.
1225
+ # @overload create(mx,my=1,mz=1)
1226
+ # @param [Integer] mx
1227
+ # @param [Integer] my default=1
1228
+ # @param [Integer] mz default=1
1229
+ # @return [nil]
1230
+ def create
1231
+ end
1232
+
1233
+
1234
+ # Data resizing.
1235
+ # Rearrange dimensions without changing data array so that resulting sizes should be mx*my*mz < nx*ny*nz. If some of parameter my or mz are zero then it will be selected to optimal fill of data array. For example, if my=0 then it will be change to my=nx*ny*nz/mx and mz=1.
1236
+ # @overload rearrange(mx,my=0,mz=0)
1237
+ # @param [Integer] mx
1238
+ # @param [Integer] my default=0
1239
+ # @param [Integer] mz default=0
1240
+ # @return [nil]
1241
+ def rearrange
1242
+ end
1243
+
1244
+
1245
+ # Data resizing.
1246
+ # Transposes (shift order of) dimensions of the data. New order of dimensions is specified in string dim. This function can be useful also after reading of one-dimensional data.
1247
+ # @overload transpose(dim="yx")
1248
+ # @param [String] dim default="yx"
1249
+ # @return [nil]
1250
+ def transpose
1251
+ end
1252
+
1253
+
1254
+ # Data resizing.
1255
+ # Increase the dimensions of the data by inserting new (|n1|+1)-th slices after (for n1>0) or before (for n1<0) of existed one. It is possible to insert 2 dimensions simultaneously for 1d data by using parameter n2. Data to new slices is copy from existed one. For example, for n1>0 new array will be
1256
+ # @overload extend(n1,n2=0)
1257
+ # @param [Integer] n1
1258
+ # @param [Integer] n2 default=0
1259
+ # @return [nil]
1260
+ def extend
1261
+ end
1262
+
1263
+
1264
+ # Data resizing.
1265
+ # Reduces the data size by excluding data elements which indexes are not divisible by rx, ry, rz correspondingly. Parameter smooth set to use smoothing
1266
+ # @overload squeeze(rx,ry=1,rz=1,smooth=false)
1267
+ # @param [Integer] rx
1268
+ # @param [Integer] ry default=1
1269
+ # @param [Integer] rz default=1
1270
+ # @param [bool] smooth default=false
1271
+ # @return [nil]
1272
+ def squeeze
1273
+ end
1274
+
1275
+
1276
+ # Data resizing.
1277
+ # Cuts off edges of the data i<n1 and i>n2 if n2>0 or i>n(xyz)-n2 if n2<=0 along direction dir.
1278
+ # @overload crop(n1,n2,dir='x')
1279
+ # @param [Integer] n1
1280
+ # @param [Integer] n2
1281
+ # @param [String] dir default='x'
1282
+ # @return [nil]
1283
+ def crop
1284
+ end
1285
+
1286
+
1287
+ # Data resizing.
1288
+ # Insert num slices along dir-direction at position pos and fill it by zeros.
1289
+ # @overload insert(dir,pos=0,num=1)
1290
+ # @param [String] dir
1291
+ # @param [Integer] pos default=0
1292
+ # @param [Integer] num default=1
1293
+ # @return [nil]
1294
+ def insert
1295
+ end
1296
+
1297
+
1298
+ # Data resizing.
1299
+ # Delete num slices along dir-direction at position pos.
1300
+ # @overload delete(dir,pos=0,num=1)
1301
+ # @param [String] dir
1302
+ # @param [Integer] pos default=0
1303
+ # @param [Integer] num default=1
1304
+ # @return [nil]
1305
+ def delete
1306
+ end
1307
+
1308
+
1309
+ # Data resizing.
1310
+ # Join data cells from vdat to dat. At this, function increase dat sizes according following: z-size for 3D data arrays arrays with equal x-,y-sizes; or y-size for 2D data arrays with equal x-sizes; or x-size otherwise.
1311
+ # @overload join(vdat)
1312
+ # @param [MglData] vdat
1313
+ # @return [nil]
1314
+ def join
1315
+ end
1316
+
1317
+
1318
+ # Data filling.
1319
+ # Allocates memory and copies the data from the flat float* or double* array.
1320
+ # @overload set(a,nx,ny=1,nz=1)
1321
+ # @param [float] a
1322
+ # @param [Integer] nx
1323
+ # @param [Integer] ny default=1
1324
+ # @param [Integer] nz default=1
1325
+ # @return [nil]
1326
+ # @overload set(a,nx,ny=1,nz=1)
1327
+ # @param [Float] a
1328
+ # @param [Integer] nx
1329
+ # @param [Integer] ny default=1
1330
+ # @param [Integer] nz default=1
1331
+ # @return [nil]
1332
+ # @overload set(a,nx,ny=1,nz=1)
1333
+ # @param [dual] a
1334
+ # @param [Integer] nx
1335
+ # @param [Integer] ny default=1
1336
+ # @param [Integer] nz default=1
1337
+ # @return [nil]
1338
+ def set
1339
+ end
1340
+
1341
+
1342
+ # Data filling.
1343
+ # Allocates memory and copies the data from the gsl_vector * structure.
1344
+ # @overload set(v)
1345
+ # @param [gsl_vector] v
1346
+ # @return [nil]
1347
+ def set
1348
+ end
1349
+
1350
+
1351
+ # Data filling.
1352
+ # Allocates memory and copies the data from the gsl_matrix * structure.
1353
+ # @overload set(m)
1354
+ # @param [gsl_matrix] m
1355
+ # @return [nil]
1356
+ def set
1357
+ end
1358
+
1359
+
1360
+ # Data filling.
1361
+ # Copies the data from mglData (or mglDataA) instance from.
1362
+ # @overload set(from)
1363
+ # @param [MglData] from
1364
+ # @return [nil]
1365
+ def set
1366
+ end
1367
+
1368
+
1369
+ # Data filling.
1370
+ # Copies the data from mglData instances for real and imaginary parts of complex data arrays.
1371
+ # @overload set(re,im)
1372
+ # @param [MglData] re
1373
+ # @param [MglData] im
1374
+ # @return [nil]
1375
+ def set
1376
+ end
1377
+
1378
+
1379
+ # Data filling.
1380
+ # Allocates memory and copies the data from the std::vector<T> array.
1381
+ # @overload set(d)
1382
+ # @param [std::vector<int>] d
1383
+ # @return [nil]
1384
+ # @overload set(d)
1385
+ # @param [std::vector<float>] d
1386
+ # @return [nil]
1387
+ # @overload set(d)
1388
+ # @param [std::vector<double>] d
1389
+ # @return [nil]
1390
+ # @overload set(d)
1391
+ # @param [std::vector<dual>] d
1392
+ # @return [nil]
1393
+ def set
1394
+ end
1395
+
1396
+
1397
+ # Data filling.
1398
+ # Allocates memory and scanf the data from the string.
1399
+ # @overload set(str,nx,ny=1,nz=1)
1400
+ # @param [String] str
1401
+ # @param [Integer] nx
1402
+ # @param [Integer] ny default=1
1403
+ # @param [Integer] nz default=1
1404
+ # @return [nil]
1405
+ def set
1406
+ end
1407
+
1408
+
1409
+ # Data filling.
1410
+ # Links external data array, i.e. don't delete this array at exit.
1411
+ # @overload link(from)
1412
+ # @param [MglDataC] from
1413
+ # @return [nil]
1414
+ # @overload link(a,nx,ny=1,nz=1)
1415
+ # @param [dual] a
1416
+ # @param [Integer] nx
1417
+ # @param [Integer] ny default=1
1418
+ # @param [Integer] nz default=1
1419
+ # @return [nil]
1420
+ def link
1421
+ end
1422
+
1423
+
1424
+ # Data filling.
1425
+ # Equidistantly fills the data values to range (v1, v2) in direction dir=('x','y','z').
1426
+ # @overload fill(v1,v2,dir='x')
1427
+ # @param [dual] v1
1428
+ # @param [dual] v2
1429
+ # @param [String] dir default='x'
1430
+ # @return [nil]
1431
+ def fill
1432
+ end
1433
+
1434
+
1435
+ # Data filling.
1436
+ # The same as previous ones but coordinates 'x', 'y', 'z' are supposed to be normalized in range (0,1). If dim>0 is specified then modification will be fulfilled only for slices >=dim.
1437
+ # @overload modify(eq,dim=0)
1438
+ # @param [String] eq
1439
+ # @param [Integer] dim default=0
1440
+ # @return [nil]
1441
+ # @overload modify(eq,v)
1442
+ # @param [String] eq
1443
+ # @param [MglData] v
1444
+ # @return [nil]
1445
+ # @overload modify(eq,v,w)
1446
+ # @param [String] eq
1447
+ # @param [MglData] v
1448
+ # @param [MglData] w
1449
+ # @return [nil]
1450
+ def modify
1451
+ end
1452
+
1453
+
1454
+ # Data filling.
1455
+ # Sets the symbol ids for data columns. The string should contain one symbol 'a'...'z' per column. These ids are used in column.
1456
+ # @overload set_column_id(ids)
1457
+ # @param [String] ids
1458
+ # @return [nil]
1459
+ def set_column_id
1460
+ end
1461
+
1462
+
1463
+ # File I/O.
1464
+ # Reads data from tab-separated text file with auto determining sizes of the data. Double newline means the beginning of new z-slice.
1465
+ # @overload read(fname)
1466
+ # @param [String] fname
1467
+ # @return [bool]
1468
+ def read
1469
+ end
1470
+
1471
+
1472
+ # File I/O.
1473
+ # Reads data from text file with specified data sizes. This function does nothing if one of parameters mx, my or mz is zero or negative.
1474
+ # @overload read(fname,mx,my=1,mz=1)
1475
+ # @param [String] fname
1476
+ # @param [Integer] mx
1477
+ # @param [Integer] my default=1
1478
+ # @param [Integer] mz default=1
1479
+ # @return [bool]
1480
+ def read
1481
+ end
1482
+
1483
+
1484
+ # File I/O.
1485
+ # Read data from text file with size specified at beginning of the file by first dim numbers. At this, variable dim set data dimensions.
1486
+ # @overload read_mat(fname,dim=2)
1487
+ # @param [String] fname
1488
+ # @param [Integer] dim default=2
1489
+ # @return [bool]
1490
+ def read_mat
1491
+ end
1492
+
1493
+
1494
+ # File I/O.
1495
+ # Join data arrays from several text files. The file names are determined by function call sprintf(fname,templ,val);, where val changes from from to to with step step. The data load one-by-one in the same slice if as_slice=false or as slice-by-slice if as_slice=true.
1496
+ # @overload read_range(templ,from,to,step=1,as_slice=false)
1497
+ # @param [String] templ
1498
+ # @param [Float] from
1499
+ # @param [Float] to
1500
+ # @param [Float] step default=1
1501
+ # @param [bool] as_slice default=false
1274
1502
  # @return [nil]
1275
- # @overload set_column_id(ids)
1276
- # @param [String] ids
1503
+ def read_range
1504
+ end
1505
+
1506
+
1507
+ # File I/O.
1508
+ # Join data arrays from several text files which filenames satisfied the template templ (for example, templ="t_*.dat"). The data load one-by-one in the same slice if as_slice=false or as slice-by-slice if as_slice=true.
1509
+ # @overload read_all(templ,as_slice=false)
1510
+ # @param [String] templ
1511
+ # @param [bool] as_slice default=false
1277
1512
  # @return [nil]
1278
- # @overload mgl_datac_set_id(a,ids)
1279
- # @param [HADT] a
1280
- # @param [String] ids
1513
+ def read_all
1514
+ end
1515
+
1516
+
1517
+ # File I/O.
1518
+ # Saves the whole data array (for ns=-1) or only ns-th slice to text file.
1519
+ # @overload save(fname,ns=-1)
1520
+ # @param [String] fname
1521
+ # @param [Integer] ns default=-1
1281
1522
  # @return [nil]
1282
- def mgl_datac_set_id
1523
+ def save
1283
1524
  end
1284
1525
 
1285
1526
 
1286
1527
  # File I/O.
1287
- # Reads data from bitmap file (now support only PNG format). The RGB values of bitmap pixels are transformed to mreal values in range [v1, v2] using color scheme scheme ().
1288
- # @overload import(fname,scheme,v1=0,v2=1)
1528
+ # Reads data array named dname from HDF5 or HDF4 file. This function does nothing if HDF5|HDF4 was disabled during library compilation.
1529
+ # @overload read_hdf(fname,dname)
1289
1530
  # @param [String] fname
1290
- # @param [String] scheme
1291
- # @param [Float] v1 default=0
1292
- # @param [Float] v2 default=1
1531
+ # @param [String] dname
1293
1532
  # @return [nil]
1294
- def import
1533
+ def read_hdf
1295
1534
  end
1296
1535
 
1297
1536
 
1298
1537
  # File I/O.
1299
- # Saves data matrix (or ns-th slice for 3d data) to bitmap file (now support only PNG format). The data values are transformed from range [v1, v2] to RGB pixels of bitmap using color scheme scheme (). If v1>=v2 then the values of v1, v2 are automatically determined as minimal and maximal value of the data array.
1300
- # @overload export(fname,scheme,v1=0,v2=0,ns=-1)
1538
+ # Saves data array named dname to HDF5 file. This function does nothing if HDF5 was disabled during library compilation.
1539
+ # @overload save_hdf(fname,dname,rewrite=false)
1301
1540
  # @param [String] fname
1302
- # @param [String] scheme
1303
- # @param [Float] v1 default=0
1304
- # @param [Float] v2 default=0
1305
- # @param [Integer] ns default=-1
1541
+ # @param [String] dname
1542
+ # @param [bool] rewrite default=false
1306
1543
  # @return [nil]
1307
- def export
1544
+ def save_hdf
1545
+ end
1546
+
1547
+
1548
+ # File I/O.
1549
+ # Put data names from HDF5 file fname into buf as '\t' separated fields. In MGL version the list of data names will be printed as message. This function does nothing if HDF5 was disabled during library compilation.
1550
+ # @overload datas_hdf(fname,buf,size)
1551
+ # @param [String] fname
1552
+ # @param [String] buf
1553
+ # @param [long] size
1554
+ # @return [Integer]
1555
+ def datas_hdf
1308
1556
  end
1309
1557
 
1310
1558
 
1311
1559
  # Make another data.
1312
- # Gets array which values is indexes (roots) along given direction dir, where interpolated values of data dat are equal to val. Output data will have the sizes of dat in directions transverse to dir. If data idat is provided then its values are used as starting points. This allows to find several branches by consequentive calls. Indexes are supposed to be normalized in range [0,1] (if norm=true) or in ranges [0,nx], [0,ny], [0,nz] correspondingly.
1313
- # @overload solve(val,dir,norm=true)
1314
- # @param [Float] val
1315
- # @param [String] dir
1560
+ # Extracts sub-array data from the original data array keeping fixed positive index. For example SubData(-1,2) extracts 3d row (indexes are zero based), SubData(4,-1) extracts 5th column, SubData(-1,-1,3) extracts 4th slice and so on. If argument(s) are non-integer then linear interpolation between slices is used. In MGL version this command usually is used as inline one dat(xx,yy,zz).
1561
+ # @overload sub_data(xx,yy=-1,zz=-1)
1562
+ # @param [Float] xx
1563
+ # @param [Float] yy default=-1
1564
+ # @param [Float] zz default=-1
1565
+ # @return [MglData]
1566
+ def sub_data
1567
+ end
1568
+
1569
+
1570
+ # Make another data.
1571
+ # Extracts sub-array data from the original data array for indexes specified by arrays xx, yy, zz (indirect access). This function work like previous one for 1D arguments or numbers, and resulting array dimensions are equal dimensions of 1D arrays for corresponding direction. For 2D and 3D arrays in arguments, the resulting array have the same dimensions as input arrays. The dimensions of all argument must be the same (or to be scalar 1*1*1) if they are 2D or 3D arrays. In MGL version this command usually is used as inline one dat(xx,yy,zz).
1572
+ # @overload sub_data(xx,yy,zz)
1573
+ # @param [MglData] xx
1574
+ # @param [MglData] yy
1575
+ # @param [MglData] zz
1576
+ # @return [MglData]
1577
+ def sub_data
1578
+ end
1579
+
1580
+
1581
+ # Make another data.
1582
+ # Get column (or slice) of the data filled by formula eq on column ids. For example, Column("n*w^2/exp(t)");. The column ids must be defined first by idset function or read from files. In MGL version this command usually is used as inline one dat('eq').
1583
+ # @overload column(eq)
1584
+ # @param [String] eq
1585
+ # @return [MglData]
1586
+ def column
1587
+ end
1588
+
1589
+
1590
+ # Make another data.
1591
+ # Resizes the data to new size mx, my, mz from box (part) (x1,x2) x (y1,y2) x (z1,z2) of original array. Initially x,y,z coordinates are supposed to be in (0,1).
1592
+ # @overload resize(mx,my=1,mz=1,x1=0,x2=1,y1=0,y2=1,z1=0,z2=1)
1593
+ # @param [Integer] mx
1594
+ # @param [Integer] my default=1
1595
+ # @param [Integer] mz default=1
1596
+ # @param [Float] x1 default=0
1597
+ # @param [Float] x2 default=1
1598
+ # @param [Float] y1 default=0
1599
+ # @param [Float] y2 default=1
1600
+ # @param [Float] z1 default=0
1601
+ # @param [Float] z2 default=1
1602
+ # @return [MglData]
1603
+ def resize
1604
+ end
1605
+
1606
+
1607
+ # Make another data.
1608
+ # Gets array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data idat, jdat, kdat. Coordinates from idat, jdat, kdat are supposed to be normalized in range (0,1) (if norm=true) or in ranges (0,nx), (0,ny), (0,nz) correspondingly.
1609
+ # @overload evaluate(idat,norm=true)
1610
+ # @param [MglData] idat
1316
1611
  # @param [bool] norm default=true
1317
1612
  # @return [MglData]
1318
- # @overload solve(val,dir,idat,norm=true)
1319
- # @param [Float] val
1320
- # @param [String] dir
1613
+ # @overload evaluate(idat,jdat,norm=true)
1614
+ # @param [MglData] idat
1615
+ # @param [MglData] jdat
1616
+ # @param [bool] norm default=true
1617
+ # @return [MglData]
1618
+ # @overload evaluate(idat,jdat,kdat,norm=true)
1321
1619
  # @param [MglData] idat
1620
+ # @param [MglData] jdat
1621
+ # @param [MglData] kdat
1322
1622
  # @param [bool] norm default=true
1323
1623
  # @return [MglData]
1324
- def solve
1624
+ def evaluate
1325
1625
  end
1326
1626
 
1327
1627
 
1328
1628
  # Make another data.
1329
- # Find roots of equation 'func'=0 for variable var with initial guess ini. Secant method is used for root finding.
1330
- # @overload roots(func,var)
1331
- # @param [String] func
1332
- # @param [String] var
1629
+ # Creates n-th points distribution of the data values in range (v1, v2). Array w specifies weights of the data elements (by default is 1). Parameter nsub define the number of additional interpolated points (for smoothness of histogram). See also Data manipulation
1630
+ # @overload hist(n,v1=0,v2=1,nsub=0)
1631
+ # @param [Integer] n
1632
+ # @param [Float] v1 default=0
1633
+ # @param [Float] v2 default=1
1634
+ # @param [Integer] nsub default=0
1333
1635
  # @return [MglData]
1334
- def roots
1636
+ # @overload hist(w,n,v1=0,v2=1,nsub=0)
1637
+ # @param [MglData] w
1638
+ # @param [Integer] n
1639
+ # @param [Float] v1 default=0
1640
+ # @param [Float] v2 default=1
1641
+ # @param [Integer] nsub default=0
1642
+ # @return [MglData]
1643
+ def hist
1644
+ end
1645
+
1646
+
1647
+ # Make another data.
1648
+ # Gets momentum (1d-array) of the data along direction dir. String how contain kind of momentum. The momentum is defined like as
1649
+ # if dir='z' and so on. Coordinates 'x', 'y', 'z' are data indexes normalized in range (0,1).
1650
+ # @overload momentum(dir,how)
1651
+ # @param [String] dir
1652
+ # @param [String] how
1653
+ # @return [MglData]
1654
+ def momentum
1655
+ end
1656
+
1657
+
1658
+ # Make another data.
1659
+ # Gets array which is the result of summation in given direction or direction(s).
1660
+ # @overload sum(dir)
1661
+ # @param [String] dir
1662
+ # @return [MglData]
1663
+ def sum
1664
+ end
1665
+
1666
+
1667
+ # Make another data.
1668
+ # Gets array which is the maximal data values in given direction or direction(s).
1669
+ # @overload max(dir)
1670
+ # @param [String] dir
1671
+ # @return [MglData]
1672
+ def max
1673
+ end
1674
+
1675
+
1676
+ # Make another data.
1677
+ # Gets array which is the maximal data values in given direction or direction(s).
1678
+ # @overload min(dir)
1679
+ # @param [String] dir
1680
+ # @return [MglData]
1681
+ def min
1682
+ end
1683
+
1684
+
1685
+ # Make another data.
1686
+ # Returns direct multiplication of arrays (like, res(i,j) = this(i)*a(j) and so on).
1687
+ # @overload combine(a)
1688
+ # @param [MglData] a
1689
+ # @return [MglData]
1690
+ def combine
1691
+ end
1692
+
1693
+
1694
+ # Make another data.
1695
+ # Gets array of diagonal elements a(i,i) (for 2D case) or a(i,i,i) (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1.
1696
+ # @overload trace()
1697
+ # @return [MglData]
1698
+ def trace
1699
+ end
1700
+
1701
+
1702
+ # Make another data.
1703
+ # Gets array of real parts of the data.
1704
+ # @overload real()
1705
+ # @return [MglData]
1706
+ def real
1707
+ end
1708
+
1709
+
1710
+ # Make another data.
1711
+ # Gets array of imaginary parts of the data.
1712
+ # @overload imag()
1713
+ # @return [MglData]
1714
+ def imag
1715
+ end
1716
+
1717
+
1718
+ # Make another data.
1719
+ # Gets array of absolute values of the data.
1720
+ # @overload abs()
1721
+ # @return [MglData]
1722
+ def abs
1723
+ end
1724
+
1725
+
1726
+ # Make another data.
1727
+ # Gets array of arguments of the data.
1728
+ # @overload arg()
1729
+ # @return [MglData]
1730
+ def arg
1731
+ end
1732
+
1733
+
1734
+ # Data changing.
1735
+ # Cumulative summation of the data in given direction or directions.
1736
+ # @overload cum_sum(dir)
1737
+ # @param [String] dir
1738
+ # @return [nil]
1739
+ def cum_sum
1740
+ end
1741
+
1742
+
1743
+ # Data changing.
1744
+ # Integrates (like cumulative summation) the data in given direction or directions.
1745
+ # @overload integral(dir)
1746
+ # @param [String] dir
1747
+ # @return [nil]
1748
+ def integral
1749
+ end
1750
+
1751
+
1752
+ # Data changing.
1753
+ # Differentiates the data in given direction or directions.
1754
+ # @overload diff(dir)
1755
+ # @param [String] dir
1756
+ # @return [nil]
1757
+ def diff
1335
1758
  end
1336
1759
 
1337
1760
 
1338
1761
  # Data changing.
1339
- # Differentiates the data specified parametrically in direction x with y, z=constant. Parametrical differentiation uses the formula (for 2D case): where denotes usual differentiation along 1st and 2nd dimensions. The similar formula is used for 3D case. Note, that you may change the order of arguments -- for example, if you have 2D data a(i,j) which depend on coordinates (x(i,j), y(i,j)) then usual derivative along will be Diff(x,y); and usual derivative along will be Diff(y,x);.
1340
- # @overload diff(x,y)
1341
- # @param [MglData] x
1342
- # @param [MglData] y
1343
- # @return [nil]
1344
- # @overload diff(x,y,z)
1345
- # @param [MglData] x
1346
- # @param [MglData] y
1347
- # @param [MglData] z
1762
+ # Double-differentiates (like Laplace operator) the data in given direction.
1763
+ # @overload diff2(dir)
1764
+ # @param [String] dir
1348
1765
  # @return [nil]
1349
- def diff
1766
+ def diff2
1350
1767
  end
1351
1768
 
1352
1769
 
1353
1770
  # Data changing.
1354
- # Do Sine transform of the data in given direction or directions. The Sine transform is (see ).
1355
- # @overload sin_fft(dir)
1771
+ # Do Fourier transform of the data in given direction or directions. If dir contain 'i' then inverse Fourier is used. The Fourier transform is \sum a_j \exp(i k j) (see http://en.wikipedia.org/wiki/Discrete_Fourier_transform).
1772
+ # @overload fft(dir)
1356
1773
  # @param [String] dir
1357
1774
  # @return [nil]
1358
- def sin_fft
1775
+ def fft
1359
1776
  end
1360
1777
 
1361
1778
 
1362
1779
  # Data changing.
1363
- # Do Cosine transform of the data in given direction or directions. The Cosine transform is (see ).
1364
- # @overload cos_fft(dir)
1780
+ # Do Hankel transform of the data in given direction or directions. The Hankel transform is \sum a_j J_0(k j) (see http://en.wikipedia.org/wiki/Hankel_transform).
1781
+ # @overload hankel(dir)
1365
1782
  # @param [String] dir
1366
1783
  # @return [nil]
1367
- def cos_fft
1784
+ def hankel
1368
1785
  end
1369
1786
 
1370
1787
 
1371
1788
  # Data changing.
1372
- # Remove value steps (like phase jumps after inverse trigonometric functions) with period da in given direction.
1373
- # @overload sew(dir,m_pi)
1789
+ # Swaps the left and right part of the data in given direction (useful for Fourier spectrum).
1790
+ # @overload swap(dir)
1374
1791
  # @param [String] dir
1375
- # @param [mreal da=2] m_pi
1376
1792
  # @return [nil]
1377
- def sew
1793
+ def swap
1378
1794
  end
1379
1795
 
1380
1796
 
1381
1797
  # Data changing.
1382
- # Find envelop for data values along direction dir.
1383
- # @overload envelop(dir='x')
1384
- # @param [String] dir default='x'
1798
+ # Rolls the data along direction dir. Resulting array will be out(i) = ini((i+num)%nx) if dir='x'.
1799
+ # @overload roll(dir,error)
1800
+ # @param [String] dir
1801
+ # @param [unknown] error
1385
1802
  # @return [nil]
1386
- def envelop
1803
+ def roll
1387
1804
  end
1388
1805
 
1389
1806
 
1390
1807
  # Data changing.
1391
- # Normalizes the data to range [v1,v2]. If flag sym=true then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. Modification will be applied only for slices >=dim.
1392
- # @overload norm(v1=0,v2=1,sym=false,dim=0)
1393
- # @param [Float] v1 default=0
1394
- # @param [Float] v2 default=1
1395
- # @param [bool] sym default=false
1396
- # @param [Integer] dim default=0
1808
+ # Mirror the left-to-right part of the data in given direction. Looks like change the value index i->n-i. Note, that the similar effect in graphics you can reach by using options (Command options), for example, surf dat; xrange 1 -1.
1809
+ # @overload mirror(dir)
1810
+ # @param [String] dir
1397
1811
  # @return [nil]
1398
- def norm
1812
+ def mirror
1399
1813
  end
1400
1814
 
1401
1815
 
1402
1816
  # Data changing.
1403
- # Normalizes data slice-by-slice along direction dir the data in slices to range [v1,v2]. If flag sym=true then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. If keep_en is set then maximal value of k-th slice will be limited by
1404
- # @overload norm_sl(v1=0,v2=1,dir='z',keep_en=true,sym=false)
1405
- # @param [Float] v1 default=0
1406
- # @param [Float] v2 default=1
1407
- # @param [String] dir default='z'
1408
- # @param [bool] keep_en default=true
1409
- # @param [bool] sym default=false
1817
+ # Smooths the data on specified direction or directions. String dirs specifies the dimensions which will be smoothed. It may contain characters: 'x' for 1st dimension, 'y' for 2nd dimension, 'z' for 3d dimension. If string dir contain: '0' then does nothing, '3' -- linear averaging over 3 points, '5' -- linear averaging over 5 points. By default quadratic averaging over 5 points is used.
1818
+ # @overload smooth(dir="xyz",delta=0)
1819
+ # @param [String] dir default="xyz"
1820
+ # @param [Float] delta default=0
1410
1821
  # @return [nil]
1411
- def norm_sl
1822
+ def smooth
1412
1823
  end
1413
1824
 
1414
1825
 
1415
1826
  # Interpolation.
1416
- # Interpolates data by cubic spline to the given point x in [0...nx-1], y in [0...ny-1], z in [0...nz-1].
1417
- # @overload spline(x,y=0,z=0)
1827
+ # Interpolates data by linear function to the given point x in (0...nx-1), y in (0...ny-1), z in (0...nz-1).
1828
+ # @overload linear(x,y=0,z=0)
1418
1829
  # @param [Float] x
1419
1830
  # @param [Float] y default=0
1420
1831
  # @param [Float] z default=0
1421
- # @return [Float]
1422
- def spline
1832
+ # @return [dual]
1833
+ def linear
1423
1834
  end
1424
1835
 
1425
1836
 
1426
1837
  # Interpolation.
1427
- # Interpolates data by cubic spline to the given point x, y, z which assumed to be normalized in range [0, 1].
1428
- # @overload spline1(x,y=0,z=0)
1838
+ # Interpolates data by linear function to the given point x, y, z which assumed to be normalized in range (0, 1).
1839
+ # @overload linear1(x,y=0,z=0)
1429
1840
  # @param [Float] x
1430
1841
  # @param [Float] y default=0
1431
1842
  # @param [Float] z default=0
1432
- # @return [Float]
1433
- def spline1
1843
+ # @return [dual]
1844
+ def linear1
1434
1845
  end
1435
1846
 
1436
1847
 
1437
1848
  # Interpolation.
1438
- # Interpolates data by cubic spline to the given point x in [0...nx-1], y in [0...ny-1], z in [0...nz-1]. The values of derivatives at the point are saved in dif.
1439
- # @overload spline(dif,x,y=0,z=0)
1849
+ # Interpolates data by linear function to the given point x in (0...nx-1), y in (0...ny-1), z in (0...nz-1). The values of derivatives at the point are saved in dif.
1850
+ # @overload linear(dif,x,y=0,z=0)
1440
1851
  # @param [MglPoint] dif
1441
1852
  # @param [Float] x
1442
1853
  # @param [Float] y default=0
1443
1854
  # @param [Float] z default=0
1444
- # @return [Float]
1445
- def spline
1855
+ # @return [dual]
1856
+ def linear
1446
1857
  end
1447
1858
 
1448
1859
 
1449
1860
  # Interpolation.
1450
- # Interpolates data by cubic spline to the given point x, y, z which assumed to be normalized in range [0, 1]. The values of derivatives at the point are saved in dif.
1451
- # @overload spline1(dif,x,y=0,z=0)
1861
+ # Interpolates data by linear function to the given point x, y, z which assumed to be normalized in range (0, 1). The values of derivatives at the point are saved in dif.
1862
+ # @overload linear1(dif,x,y=0,z=0)
1452
1863
  # @param [MglPoint] dif
1453
1864
  # @param [Float] x
1454
1865
  # @param [Float] y default=0
1455
1866
  # @param [Float] z default=0
1456
- # @return [Float]
1457
- def spline1
1867
+ # @return [dual]
1868
+ def linear1
1458
1869
  end
1459
1870
 
1460
1871
 
1461
1872
  # Data information.
1462
- # Gets zero-momentum (energy, ) and write first momentum (median, ), second momentum (width, ), third momentum (skewness, ) and fourth momentum (kurtosis, ) to variables. Here is corresponding coordinate if dir is , or . Otherwise median is , width is and so on.
1463
- # @overload momentum(dir,a,w)
1464
- # @param [String] dir
1465
- # @param [Float] a
1466
- # @param [Float] w
1467
- # @return [Float]
1468
- # @overload momentum(dir,m,w,s,k)
1469
- # @param [String] dir
1470
- # @param [Float] m
1471
- # @param [Float] w
1472
- # @param [Float] s
1473
- # @param [Float] k
1474
- # @return [Float]
1475
- def momentum
1873
+ # Gets or prints to file fp or as message (in MGL) information about the data (sizes, maximum/minimum, momentums and so on).
1874
+ # @overload print_info()
1875
+ # @return [String]
1876
+ # @overload print_info(fp)
1877
+ # @param [FILE] fp
1878
+ # @return [nil]
1879
+ def print_info
1476
1880
  end
1477
1881
 
1478
1882
 
1479
1883
  # Data information.
1480
- # Find position (after specified in i, j, k) of first nonzero value of formula cond. Function return the data value at found position.
1481
- # @overload find(cond,i,j,k)
1482
- # @param [String] cond
1483
- # @param [Integer] i
1484
- # @param [Integer] j
1485
- # @param [Integer] k
1486
- # @return [Float]
1487
- def find
1884
+ # Gets the x-, y-, z-size of the data.
1885
+ # @overload get_nx()
1886
+ # @return [long]
1887
+ # @overload get_ny()
1888
+ # @return [long]
1889
+ # @overload get_nz()
1890
+ # @return [long]
1891
+ def get_nx
1488
1892
  end
1489
1893
 
1490
1894
 
1491
1895
  # Data information.
1492
- # Find position (before specified in i, j, k) of last nonzero value of formula cond. Function return the data value at found position.
1493
- # @overload last(cond,i,j,k)
1494
- # @param [String] cond
1495
- # @param [Integer] i
1496
- # @param [Integer] j
1497
- # @param [Integer] k
1896
+ # Gets maximal value of the data.
1897
+ # @overload maximal()
1498
1898
  # @return [Float]
1499
- def last
1899
+ def maximal
1500
1900
  end
1501
1901
 
1502
1902
 
1503
1903
  # Data information.
1504
- # Return position of first in direction dir nonzero value of formula cond. The search is started from point (i,j,k).
1505
- # @overload find(cond,dir,i=0,j=0,k=0)
1506
- # @param [String] cond
1507
- # @param [String] dir
1508
- # @param [Integer] i default=0
1509
- # @param [Integer] j default=0
1510
- # @param [Integer] k default=0
1511
- # @return [Integer]
1512
- def find
1904
+ # Gets minimal value of the data.
1905
+ # @overload minimal()
1906
+ # @return [Float]
1907
+ def minimal
1513
1908
  end
1514
1909
 
1515
1910
 
1516
1911
  # Data information.
1517
- # Determines if any nonzero value of formula in the data array.
1518
- # @overload find_any(cond)
1519
- # @param [String] cond
1520
- # @return [bool]
1521
- def find_any
1912
+ # Gets position of minimum to variables i, j, k and returns the minimal value.
1913
+ # @overload minimal(i,j,k)
1914
+ # @param [Integer] i
1915
+ # @param [Integer] j
1916
+ # @param [Integer] k
1917
+ # @return [Float]
1918
+ def minimal
1522
1919
  end
1523
1920
 
1524
1921
 
1525
- # Operators.
1526
- # Adds the other data or the number.
1527
- # @overload +(b)
1528
- # @param [MglData] b
1529
- # @return [MglData]
1530
- # @overload +(b)
1531
- # @param [Float] b
1532
- # @return [MglData]
1533
- def +
1922
+ # Data information.
1923
+ # Gets position of maximum to variables i, j, k and returns the maximal value.
1924
+ # @overload maximal(i,j,k)
1925
+ # @param [Integer] i
1926
+ # @param [Integer] j
1927
+ # @param [Integer] k
1928
+ # @return [Float]
1929
+ def maximal
1534
1930
  end
1535
1931
 
1536
1932
 
1537
- # Operators.
1538
- # Subtracts the other data or the number.
1539
- # @overload -(b)
1540
- # @param [MglData] b
1541
- # @return [MglData]
1542
- # @overload -(b)
1543
- # @param [Float] b
1544
- # @return [MglData]
1545
- def -
1933
+ # Data information.
1934
+ # Gets approximated (interpolated) position of minimum to variables x, y, z and returns the minimal value.
1935
+ # @overload minimal(x,y,z)
1936
+ # @param [Float] x
1937
+ # @param [Float] y
1938
+ # @param [Float] z
1939
+ # @return [Float]
1940
+ def minimal
1546
1941
  end
1547
1942
 
1548
1943
 
1549
- # Operators.
1550
- # Multiplies by the other data or the number.
1551
- # @overload *(b)
1552
- # @param [MglData] b
1553
- # @return [MglData]
1554
- # @overload *(b)
1555
- # @param [Float] b
1556
- # @return [MglData]
1557
- def *
1944
+ # Data information.
1945
+ # Gets approximated (interpolated) position of maximum to variables x, y, z and returns the maximal value.
1946
+ # @overload maximal(x,y,z)
1947
+ # @param [Float] x
1948
+ # @param [Float] y
1949
+ # @param [Float] z
1950
+ # @return [Float]
1951
+ def maximal
1558
1952
  end
1559
1953
 
1560
1954
 
1561
- # Operators.
1562
- # Divides by the other data or the number.
1563
- # @overload /(b)
1564
- # @param [MglData] b
1565
- # @return [MglData]
1566
- # @overload /(b)
1567
- # @param [Float] b
1568
- # @return [MglData]
1569
- def /
1570
- end
1571
-
1955
+ end # MglDataC
1572
1956
 
1573
- end # MglData
1574
1957
 
1575
- class MglExprC
1958
+ # MglExpr class
1959
+ class MglExpr
1576
1960
 
1577
1961
  # Evaluate expression.
1578
1962
  # Evaluates the formula for 'x','r'=x, 'y','n'=y, 'z','t'=z, 'a','u'=u.
@@ -1581,31 +1965,19 @@ class MglExprC
1581
1965
  # @param [Float] y
1582
1966
  # @param [Float] z
1583
1967
  # @return [Float]
1584
- # @overload eval(x,y,z)
1585
- # @param [dual] x
1586
- # @param [dual] y
1587
- # @param [dual] z
1588
- # @return [dual]
1589
1968
  def eval
1590
1969
  end
1591
1970
 
1592
1971
 
1593
1972
  # Evaluate expression.
1594
- # Evaluates the formula for variables in array var[0,...,'z'-'a'].
1595
- # @overload eval(var)
1596
- # @param [Float] var
1597
- # @return [Float]
1598
- # @overload eval(var)
1599
- # @param [dual] var
1600
- # @return [dual]
1601
- def eval
1973
+ # Evaluates the formula for variables in array var(0,...,'z'-'a').
1974
+ # @overload var(error)
1975
+ # @param [unknown] error
1976
+ # @return [mreal Eval (mreal]
1977
+ def var
1602
1978
  end
1603
1979
 
1604
1980
 
1605
- end # MglExprC
1606
-
1607
- class MglExpr
1608
-
1609
1981
  # Evaluate expression.
1610
1982
  # Evaluates the formula derivation respect to dir for 'x','r'=x, 'y','n'=y, 'z','t'=z, 'a','u'=u.
1611
1983
  # @overload diff(dir,x,y,z)
@@ -1619,17 +1991,44 @@ end
1619
1991
 
1620
1992
 
1621
1993
  # Evaluate expression.
1622
- # Evaluates the formula derivation respect to dir for variables in array var[0,...,'z'-'a'].
1623
- # @overload diff(dir,var)
1624
- # @param [String] dir
1625
- # @param [Float] var
1626
- # @return [Float]
1627
- def diff
1994
+ # Evaluates the formula derivation respect to dir for variables in array var(0,...,'z'-'a').
1995
+ # @overload var(error)
1996
+ # @param [unknown] error
1997
+ # @return [mreal Diff (char dir, mreal]
1998
+ def var
1628
1999
  end
1629
2000
 
1630
2001
 
1631
2002
  end # MglExpr
1632
2003
 
2004
+
2005
+ # MglExprC class
2006
+ class MglExprC
2007
+
2008
+ # Evaluate expression.
2009
+ # Evaluates the formula for 'x','r'=x, 'y','n'=y, 'z','t'=z, 'a','u'=u.
2010
+ # @overload eval(x,y,z)
2011
+ # @param [dual] x
2012
+ # @param [dual] y
2013
+ # @param [dual] z
2014
+ # @return [dual]
2015
+ def eval
2016
+ end
2017
+
2018
+
2019
+ # Evaluate expression.
2020
+ # Evaluates the formula for variables in array var(0,...,'z'-'a').
2021
+ # @overload var(error)
2022
+ # @param [unknown] error
2023
+ # @return [dual Eval (dual]
2024
+ def var
2025
+ end
2026
+
2027
+
2028
+ end # MglExprC
2029
+
2030
+
2031
+ # MglVar class
1633
2032
  class MglVar
1634
2033
 
1635
2034
  # MGL variables.