mathgl 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1645 @@
1
+ # This document is converted from data_en.texi.
2
+ class MglDataC
3
+
4
+ # 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]
9
+ # @overload get_val(i)
10
+ # @param [long] i
11
+ # @return [Float]
12
+ # @overload set_val(val,i)
13
+ # @param [Float] val
14
+ # @param [long] i
15
+ # @return [nil]
16
+ # @overload set_val(val,i)
17
+ # @param [Float] val
18
+ # @param [long] i
19
+ # @return [nil]
20
+ def set_val
21
+ end
22
+
23
+
24
+ # Public variables.
25
+ # Gets the x-, y-, z-size of the data.
26
+ # @overload get_nx()
27
+ # @return [long]
28
+ # @overload get_nx()
29
+ # @return [long]
30
+ # @overload get_ny()
31
+ # @return [long]
32
+ # @overload get_ny()
33
+ # @return [long]
34
+ # @overload get_nz()
35
+ # @return [long]
36
+ # @overload get_nz()
37
+ # @return [long]
38
+ def get_nz
39
+ end
40
+
41
+
42
+ # Data constructor.
43
+ # 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.
44
+ # @overload initialize(mx=1,my=1,mz=1)
45
+ # @param [Integer] mx default=1
46
+ # @param [Integer] my default=1
47
+ # @param [Integer] mz default=1
48
+ # @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
+ def initialize
55
+ end
56
+
57
+
58
+ # Data constructor.
59
+ # 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.
60
+ # @overload initialize(dat2)
61
+ # @param [MglData] dat2
62
+ # @return [MglData]
63
+ # @overload initialize(dat2)
64
+ # @param [MglData] dat2
65
+ # @return [MglData]
66
+ # @overload initialize(size,dat2)
67
+ # @param [Integer] size
68
+ # @param [float] dat2
69
+ # @return [MglData]
70
+ # @overload initialize(size,cols,dat2)
71
+ # @param [Integer] size
72
+ # @param [Integer] cols
73
+ # @param [float] dat2
74
+ # @return [MglData]
75
+ # @overload initialize(size,dat2)
76
+ # @param [Integer] size
77
+ # @param [Float] dat2
78
+ # @return [MglData]
79
+ # @overload initialize(size,cols,dat2)
80
+ # @param [Integer] size
81
+ # @param [Integer] cols
82
+ # @param [Float] dat2
83
+ # @return [MglData]
84
+ # @overload initialize(dat2,size)
85
+ # @param [Float] dat2
86
+ # @param [Integer] size
87
+ # @return [MglData]
88
+ # @overload initialize(dat2,size,cols)
89
+ # @param [Float] dat2
90
+ # @param [Integer] size
91
+ # @param [Integer] cols
92
+ # @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
+ def initialize
127
+ end
128
+
129
+
130
+ # Data constructor.
131
+ # Reads data from tab-separated text file with auto determining sizes of the data.
132
+ # @overload initialize(fname)
133
+ # @param [String] fname
134
+ # @return [MglData]
135
+ # @overload initialize(fname)
136
+ # @param [String] fname
137
+ # @return [MglDataC]
138
+ def initialize
139
+ end
140
+
141
+
142
+ # Data resizing.
143
+ # 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.
144
+ # @overload create(mx,my=1,mz=1)
145
+ # @param [Integer] mx
146
+ # @param [Integer] my default=1
147
+ # @param [Integer] mz default=1
148
+ # @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
+ def create
155
+ end
156
+
157
+
158
+ # Data resizing.
159
+ # 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.
160
+ # @overload rearrange(mx,my=0,mz=0)
161
+ # @param [Integer] mx
162
+ # @param [Integer] my default=0
163
+ # @param [Integer] mz default=0
164
+ # @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
+ def rearrange
171
+ end
172
+
173
+
174
+ # Data resizing.
175
+ # 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.
176
+ # @overload transpose(dim="yx")
177
+ # @param [String] dim default="yx"
178
+ # @return [nil]
179
+ # @overload transpose(dim="yx")
180
+ # @param [String] dim default="yx"
181
+ # @return [nil]
182
+ def transpose
183
+ end
184
+
185
+
186
+ # Data resizing.
187
+ # 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
188
+ # @overload extend(n1,n2=0)
189
+ # @param [Integer] n1
190
+ # @param [Integer] n2 default=0
191
+ # @return [nil]
192
+ # @overload extend(n1,n2=0)
193
+ # @param [Integer] n1
194
+ # @param [Integer] n2 default=0
195
+ # @return [nil]
196
+ def extend
197
+ end
198
+
199
+
200
+ # Data resizing.
201
+ # Reduces the data size by excluding data elements which indexes are not divisible by rx, ry, rz correspondingly. Parameter smooth set to use smoothing
202
+ # @overload squeeze(rx,ry=1,rz=1,smooth=false)
203
+ # @param [Integer] rx
204
+ # @param [Integer] ry default=1
205
+ # @param [Integer] rz default=1
206
+ # @param [bool] smooth default=false
207
+ # @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
+ def squeeze
215
+ end
216
+
217
+
218
+ # 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]
225
+ # @overload crop(n1,n2,dir='x')
226
+ # @param [Integer] n1
227
+ # @param [Integer] n2
228
+ # @param [String] dir default='x'
229
+ # @return [nil]
230
+ def crop
231
+ end
232
+
233
+
234
+ # Data resizing.
235
+ # Insert num slices along dir-direction at position pos and fill it by zeros.
236
+ # @overload insert(dir,pos=0,num=1)
237
+ # @param [String] dir
238
+ # @param [Integer] pos default=0
239
+ # @param [Integer] num default=1
240
+ # @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
+ def insert
247
+ end
248
+
249
+
250
+ # Data resizing.
251
+ # Delete num slices along dir-direction at position pos.
252
+ # @overload delete(dir,pos=0,num=1)
253
+ # @param [String] dir
254
+ # @param [Integer] pos default=0
255
+ # @param [Integer] num default=1
256
+ # @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
+ def delete
263
+ end
264
+
265
+
266
+ # 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
270
+ # @return [nil]
271
+ # @overload join(vdat)
272
+ # @param [MglData] vdat
273
+ # @return [nil]
274
+ def join
275
+ end
276
+
277
+
278
+ # Data filling.
279
+ # Allocates memory and copies the data from the float* or double* array.
280
+ # @overload set(a,nx,ny=1,nz=1)
281
+ # @param [float] a
282
+ # @param [Integer] nx
283
+ # @param [Integer] ny default=1
284
+ # @param [Integer] nz default=1
285
+ # @return [nil]
286
+ # @overload set(a,nx,ny=1,nz=1)
287
+ # @param [Float] a
288
+ # @param [Integer] nx
289
+ # @param [Integer] ny default=1
290
+ # @param [Integer] nz default=1
291
+ # @return [nil]
292
+ # @overload set(a,nx,ny=1,nz=1)
293
+ # @param [float] a
294
+ # @param [Integer] nx
295
+ # @param [Integer] ny default=1
296
+ # @param [Integer] nz default=1
297
+ # @return [nil]
298
+ # @overload set(a,nx,ny=1,nz=1)
299
+ # @param [Float] a
300
+ # @param [Integer] nx
301
+ # @param [Integer] ny default=1
302
+ # @param [Integer] nz default=1
303
+ # @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
309
+ # @return [nil]
310
+ def set
311
+ end
312
+
313
+
314
+ # Data filling.
315
+ # Allocates memory and copies the data from the gsl_vector * structure.
316
+ # @overload set(v)
317
+ # @param [gsl_vector] v
318
+ # @return [nil]
319
+ # @overload set(v)
320
+ # @param [gsl_vector] v
321
+ # @return [nil]
322
+ def set
323
+ end
324
+
325
+
326
+ # Data filling.
327
+ # Allocates memory and copies the data from the gsl_matrix * structure.
328
+ # @overload set(m)
329
+ # @param [gsl_matrix] m
330
+ # @return [nil]
331
+ # @overload set(m)
332
+ # @param [gsl_matrix] m
333
+ # @return [nil]
334
+ def set
335
+ end
336
+
337
+
338
+ # Data filling.
339
+ # Copies the data from mglData (or mglDataA) instance from.
340
+ # @overload set(from)
341
+ # @param [MglData] from
342
+ # @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
+ def set
357
+ end
358
+
359
+
360
+ # Data filling.
361
+ # Allocates memory and copies the data from the std::vector<T> array.
362
+ # @overload set(d)
363
+ # @param [std::vector<int>] d
364
+ # @return [nil]
365
+ # @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
+ # @param [std::vector<float>] d
373
+ # @return [nil]
374
+ # @overload set(d)
375
+ # @param [std::vector<double>] d
376
+ # @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
+ def set
384
+ end
385
+
386
+
387
+ # Data filling.
388
+ # Allocates memory and scanf the data from the string.
389
+ # @overload set(str,nx,ny=1,nz=1)
390
+ # @param [String] str
391
+ # @param [Integer] nx
392
+ # @param [Integer] ny default=1
393
+ # @param [Integer] nz default=1
394
+ # @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
+ def set
402
+ end
403
+
404
+
405
+ # Data filling.
406
+ # Links external data array, i.e. don't delete this array at exit.
407
+ # @overload link(from)
408
+ # @param [MglData] from
409
+ # @return [nil]
410
+ # @overload link(a,nx,ny=1,nz=1)
411
+ # @param [Float] a
412
+ # @param [Integer] nx
413
+ # @param [Integer] ny default=1
414
+ # @param [Integer] nz default=1
415
+ # @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
+ def link
426
+ end
427
+
428
+
429
+ # Data filling.
430
+ # Equidistantly fills the data values to range [v1, v2] in direction dir=(,,).
431
+ # @overload fill(v1,v2,dir='x')
432
+ # @param [Float] v1
433
+ # @param [Float] v2
434
+ # @param [String] dir default='x'
435
+ # @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
+ def fill
442
+ end
443
+
444
+
445
+ # 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.
447
+ # @overload modify(eq,dim=0)
448
+ # @param [String] eq
449
+ # @param [Integer] dim default=0
450
+ # @return [nil]
451
+ # @overload modify(eq,v)
452
+ # @param [String] eq
453
+ # @param [MglData] v
454
+ # @return [nil]
455
+ # @overload modify(eq,v,w)
456
+ # @param [String] eq
457
+ # @param [MglData] v
458
+ # @param [MglData] w
459
+ # @return [nil]
460
+ # @overload modify(eq,dim=0)
461
+ # @param [String] eq
462
+ # @param [Integer] dim default=0
463
+ # @return [nil]
464
+ # @overload modify(eq,v)
465
+ # @param [String] eq
466
+ # @param [MglData] v
467
+ # @return [nil]
468
+ # @overload modify(eq,v,w)
469
+ # @param [String] eq
470
+ # @param [MglData] v
471
+ # @param [MglData] w
472
+ # @return [nil]
473
+ def modify
474
+ end
475
+
476
+
477
+ # File I/O.
478
+ # Reads data from tab-separated text file with auto determining sizes of the data. Double newline means the beginning of new z-slice.
479
+ # @overload read(fname)
480
+ # @param [String] fname
481
+ # @return [bool]
482
+ # @overload read(fname)
483
+ # @param [String] fname
484
+ # @return [bool]
485
+ def read
486
+ end
487
+
488
+
489
+ # File I/O.
490
+ # 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.
491
+ # @overload read(fname,mx,my=1,mz=1)
492
+ # @param [String] fname
493
+ # @param [Integer] mx
494
+ # @param [Integer] my default=1
495
+ # @param [Integer] mz default=1
496
+ # @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
+ def read
504
+ end
505
+
506
+
507
+ # File I/O.
508
+ # Read data from text file with size specified at beginning of the file by first dim numbers. At this, variable dim set data dimensions.
509
+ # @overload read_mat(fname,dim=2)
510
+ # @param [String] fname
511
+ # @param [Integer] dim default=2
512
+ # @return [bool]
513
+ # @overload read_mat(fname,dim=2)
514
+ # @param [String] fname
515
+ # @param [Integer] dim default=2
516
+ # @return [bool]
517
+ def read_mat
518
+ end
519
+
520
+
521
+ # File I/O.
522
+ # 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.
523
+ # @overload read_range(templ,from,to,step=1,as_slice=false)
524
+ # @param [String] templ
525
+ # @param [Float] from
526
+ # @param [Float] to
527
+ # @param [Float] step default=1
528
+ # @param [bool] as_slice default=false
529
+ # @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
+ def read_range
538
+ end
539
+
540
+
541
+ # File I/O.
542
+ # 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.
543
+ # @overload read_all(templ,as_slice=false)
544
+ # @param [String] templ
545
+ # @param [bool] as_slice default=false
546
+ # @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
+ def read_all
552
+ end
553
+
554
+
555
+ # File I/O.
556
+ # Saves the whole data array (for ns=-1) or only ns-th slice to text file.
557
+ # @overload save(fname,ns=-1)
558
+ # @param [String] fname
559
+ # @param [Integer] ns default=-1
560
+ # @return [nil]
561
+ # @overload save(fname,ns=-1)
562
+ # @param [String] fname
563
+ # @param [Integer] ns default=-1
564
+ # @return [nil]
565
+ def save
566
+ end
567
+
568
+
569
+ # File I/O.
570
+ # Reads data array named dname from HDF5 or HDF4 file. This function does nothing if HDF5|HDF4 was disabled during library compilation.
571
+ # @overload read_hdf(fname,dname)
572
+ # @param [String] fname
573
+ # @param [String] dname
574
+ # @return [nil]
575
+ # @overload read_hdf(fname,dname)
576
+ # @param [String] fname
577
+ # @param [String] dname
578
+ # @return [nil]
579
+ def read_hdf
580
+ end
581
+
582
+
583
+ # File I/O.
584
+ # Saves data array named dname to HDF5 file. This function does nothing if HDF5 was disabled during library compilation.
585
+ # @overload save_hdf(fname,dname,rewrite=false)
586
+ # @param [String] fname
587
+ # @param [String] dname
588
+ # @param [bool] rewrite default=false
589
+ # @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
+ def save_hdf
596
+ end
597
+
598
+
599
+ # File I/O.
600
+ # 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.
601
+ # @overload datas_hdf(fname,buf,size)
602
+ # @param [String] fname
603
+ # @param [String] buf
604
+ # @param [long] size
605
+ # @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
+ def datas_hdf
612
+ end
613
+
614
+
615
+ # Make another data.
616
+ # 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
+ # @overload sub_data(xx,yy=-1,zz=-1)
618
+ # @param [Float] xx
619
+ # @param [Float] yy default=-1
620
+ # @param [Float] zz default=-1
621
+ # @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
+ def sub_data
628
+ end
629
+
630
+
631
+ # Make another data.
632
+ # 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).
633
+ # @overload sub_data(xx,yy,zz)
634
+ # @param [MglData] xx
635
+ # @param [MglData] yy
636
+ # @param [MglData] zz
637
+ # @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
+ def sub_data
644
+ end
645
+
646
+
647
+ # Make another data.
648
+ # 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').
649
+ # @overload column(eq)
650
+ # @param [String] eq
651
+ # @return [MglData]
652
+ # @overload column(eq)
653
+ # @param [String] eq
654
+ # @return [MglData]
655
+ def column
656
+ end
657
+
658
+
659
+ # 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]
672
+ # @overload resize(mx,my=1,mz=1,x1=0,x2=1,y1=0,y2=1,z1=0,z2=1)
673
+ # @param [Integer] mx
674
+ # @param [Integer] my default=1
675
+ # @param [Integer] mz default=1
676
+ # @param [Float] x1 default=0
677
+ # @param [Float] x2 default=1
678
+ # @param [Float] y1 default=0
679
+ # @param [Float] y2 default=1
680
+ # @param [Float] z1 default=0
681
+ # @param [Float] z2 default=1
682
+ # @return [MglData]
683
+ def resize
684
+ end
685
+
686
+
687
+ # 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.
689
+ # @overload evaluate(idat,norm=true)
690
+ # @param [MglData] idat
691
+ # @param [bool] norm default=true
692
+ # @return [MglData]
693
+ # @overload evaluate(idat,jdat,norm=true)
694
+ # @param [MglData] idat
695
+ # @param [MglData] jdat
696
+ # @param [bool] norm default=true
697
+ # @return [MglData]
698
+ # @overload evaluate(idat,jdat,kdat,norm=true)
699
+ # @param [MglData] idat
700
+ # @param [MglData] jdat
701
+ # @param [MglData] kdat
702
+ # @param [bool] norm default=true
703
+ # @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
711
+ # @param [bool] norm default=true
712
+ # @return [MglData]
713
+ # @overload evaluate(idat,jdat,kdat,norm=true)
714
+ # @param [MglData] idat
715
+ # @param [MglData] jdat
716
+ # @param [MglData] kdat
717
+ # @param [bool] norm default=true
718
+ # @return [MglData]
719
+ def evaluate
720
+ end
721
+
722
+
723
+ # 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]
738
+ # @overload hist(n,v1=0,v2=1,nsub=0)
739
+ # @param [Integer] n
740
+ # @param [Float] v1 default=0
741
+ # @param [Float] v2 default=1
742
+ # @param [Integer] nsub default=0
743
+ # @return [MglData]
744
+ # @overload hist(w,n,v1=0,v2=1,nsub=0)
745
+ # @param [MglData] w
746
+ # @param [Integer] n
747
+ # @param [Float] v1 default=0
748
+ # @param [Float] v2 default=1
749
+ # @param [Integer] nsub default=0
750
+ # @return [MglData]
751
+ def hist
752
+ end
753
+
754
+
755
+ # Make another data.
756
+ # 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]
762
+ # @overload momentum(dir,how)
763
+ # @param [String] dir
764
+ # @param [String] how
765
+ # @return [MglData]
766
+ def momentum
767
+ end
768
+
769
+
770
+ # Make another data.
771
+ # Gets array which is the result of summation in given direction or direction(s).
772
+ # @overload sum(dir)
773
+ # @param [String] dir
774
+ # @return [MglData]
775
+ # @overload sum(dir)
776
+ # @param [String] dir
777
+ # @return [MglData]
778
+ def sum
779
+ end
780
+
781
+
782
+ # Make another data.
783
+ # Gets array which is the maximal data values in given direction or direction(s).
784
+ # @overload max(dir)
785
+ # @param [String] dir
786
+ # @return [MglData]
787
+ # @overload max(dir)
788
+ # @param [String] dir
789
+ # @return [MglData]
790
+ def max
791
+ end
792
+
793
+
794
+ # Make another data.
795
+ # Gets array which is the maximal data values in given direction or direction(s).
796
+ # @overload min(dir)
797
+ # @param [String] dir
798
+ # @return [MglData]
799
+ # @overload min(dir)
800
+ # @param [String] dir
801
+ # @return [MglData]
802
+ def min
803
+ end
804
+
805
+
806
+ # 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]
811
+ # @overload combine(a)
812
+ # @param [MglData] a
813
+ # @return [MglData]
814
+ def combine
815
+ end
816
+
817
+
818
+ # 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]
822
+ # @overload trace()
823
+ # @return [MglData]
824
+ def trace
825
+ end
826
+
827
+
828
+ # 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()
855
+ # @return [MglData]
856
+ def arg
857
+ end
858
+
859
+
860
+ # Data changing.
861
+ # Cumulative summation of the data in given direction or directions.
862
+ # @overload cum_sum(dir)
863
+ # @param [String] dir
864
+ # @return [nil]
865
+ # @overload cum_sum(dir)
866
+ # @param [String] dir
867
+ # @return [nil]
868
+ def cum_sum
869
+ end
870
+
871
+
872
+ # Data changing.
873
+ # Integrates (like cumulative summation) the data in given direction or directions.
874
+ # @overload integral(dir)
875
+ # @param [String] dir
876
+ # @return [nil]
877
+ # @overload integral(dir)
878
+ # @param [String] dir
879
+ # @return [nil]
880
+ def integral
881
+ end
882
+
883
+
884
+ # Data changing.
885
+ # Differentiates the data in given direction or directions.
886
+ # @overload diff(dir)
887
+ # @param [String] dir
888
+ # @return [nil]
889
+ # @overload diff(dir)
890
+ # @param [String] dir
891
+ # @return [nil]
892
+ def diff
893
+ end
894
+
895
+
896
+ # Data changing.
897
+ # Double-differentiates (like Laplace operator) the data in given direction.
898
+ # @overload diff2(dir)
899
+ # @param [String] dir
900
+ # @return [nil]
901
+ # @overload diff2(dir)
902
+ # @param [String] dir
903
+ # @return [nil]
904
+ def diff2
905
+ end
906
+
907
+
908
+ # 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)
911
+ # @param [String] dir
912
+ # @return [nil]
913
+ def fft
914
+ end
915
+
916
+
917
+ # Data changing.
918
+ # Do Hankel transform of the data in given direction or directions. The Hankel transform is (see ).
919
+ # @overload hankel(dir)
920
+ # @param [String] dir
921
+ # @return [nil]
922
+ # @overload hankel(dir)
923
+ # @param [String] dir
924
+ # @return [nil]
925
+ def hankel
926
+ end
927
+
928
+
929
+ # Data changing.
930
+ # Swaps the left and right part of the data in given direction (useful for Fourier spectrum).
931
+ # @overload swap(dir)
932
+ # @param [String] dir
933
+ # @return [nil]
934
+ # @overload swap(dir)
935
+ # @param [String] dir
936
+ # @return [nil]
937
+ def swap
938
+ end
939
+
940
+
941
+ # 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]
947
+ # @overload roll(dir,error)
948
+ # @param [String] dir
949
+ # @param [unknown] error
950
+ # @return [nil]
951
+ def roll
952
+ end
953
+
954
+
955
+ # 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]
960
+ # @overload mirror(dir)
961
+ # @param [String] dir
962
+ # @return [nil]
963
+ def mirror
964
+ end
965
+
966
+
967
+ # 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
972
+ # @return [nil]
973
+ # @overload smooth(dir="xyz",delta=0)
974
+ # @param [String] dir default="xyz"
975
+ # @param [Float] delta default=0
976
+ # @return [nil]
977
+ def smooth
978
+ end
979
+
980
+
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
994
+ end
995
+
996
+
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
1010
+ end
1011
+
1012
+
1013
+ # 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)
1016
+ # @param [MglPoint] dif
1017
+ # @param [Float] x
1018
+ # @param [Float] y default=0
1019
+ # @param [Float] z default=0
1020
+ # @return [Float]
1021
+ # @overload linear(dif,x,y=0,z=0)
1022
+ # @param [MglPoint] dif
1023
+ # @param [Float] x
1024
+ # @param [Float] y default=0
1025
+ # @param [Float] z default=0
1026
+ # @return [dual]
1027
+ def linear
1028
+ end
1029
+
1030
+
1031
+ # 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)
1034
+ # @param [MglPoint] dif
1035
+ # @param [Float] x
1036
+ # @param [Float] y default=0
1037
+ # @param [Float] z default=0
1038
+ # @return [Float]
1039
+ # @overload linear1(dif,x,y=0,z=0)
1040
+ # @param [MglPoint] dif
1041
+ # @param [Float] x
1042
+ # @param [Float] y default=0
1043
+ # @param [Float] z default=0
1044
+ # @return [dual]
1045
+ def linear1
1046
+ end
1047
+
1048
+
1049
+ # Data information.
1050
+ # Gets or prints to file fp or as message (in MGL) information about the data (sizes, maximum/minimum, momentums and so on).
1051
+ # @overload print_info()
1052
+ # @return [String]
1053
+ # @overload print_info(fp)
1054
+ # @param [FILE] fp
1055
+ # @return [nil]
1056
+ # @overload print_info()
1057
+ # @return [String]
1058
+ # @overload print_info(fp)
1059
+ # @param [FILE] fp
1060
+ # @return [nil]
1061
+ def print_info
1062
+ end
1063
+
1064
+
1065
+ # Data information.
1066
+ # Gets the x-, y-, z-size of the data.
1067
+ # @overload get_nx()
1068
+ # @return [long]
1069
+ # @overload get_ny()
1070
+ # @return [long]
1071
+ # @overload get_nz()
1072
+ # @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
1080
+ end
1081
+
1082
+
1083
+ # Data information.
1084
+ # Gets maximal value of the data.
1085
+ # @overload maximal()
1086
+ # @return [Float]
1087
+ # @overload maximal()
1088
+ # @return [Float]
1089
+ def maximal
1090
+ end
1091
+
1092
+
1093
+ # Data information.
1094
+ # Gets minimal value of the data.
1095
+ # @overload minimal()
1096
+ # @return [Float]
1097
+ # @overload minimal()
1098
+ # @return [Float]
1099
+ def minimal
1100
+ end
1101
+
1102
+
1103
+ # Data information.
1104
+ # Gets position of minimum to variables i, j, k and returns the minimal value.
1105
+ # @overload minimal(i,j,k)
1106
+ # @param [Integer] i
1107
+ # @param [Integer] j
1108
+ # @param [Integer] k
1109
+ # @return [Float]
1110
+ # @overload minimal(i,j,k)
1111
+ # @param [Integer] i
1112
+ # @param [Integer] j
1113
+ # @param [Integer] k
1114
+ # @return [Float]
1115
+ def minimal
1116
+ end
1117
+
1118
+
1119
+ # Data information.
1120
+ # Gets position of maximum to variables i, j, k and returns the maximal value.
1121
+ # @overload maximal(i,j,k)
1122
+ # @param [Integer] i
1123
+ # @param [Integer] j
1124
+ # @param [Integer] k
1125
+ # @return [Float]
1126
+ # @overload maximal(i,j,k)
1127
+ # @param [Integer] i
1128
+ # @param [Integer] j
1129
+ # @param [Integer] k
1130
+ # @return [Float]
1131
+ def maximal
1132
+ end
1133
+
1134
+
1135
+ # Data information.
1136
+ # Gets approximated (interpolated) position of minimum to variables x, y, z and returns the minimal value.
1137
+ # @overload minimal(x,y,z)
1138
+ # @param [Float] x
1139
+ # @param [Float] y
1140
+ # @param [Float] z
1141
+ # @return [Float]
1142
+ # @overload minimal(x,y,z)
1143
+ # @param [Float] x
1144
+ # @param [Float] y
1145
+ # @param [Float] z
1146
+ # @return [Float]
1147
+ def minimal
1148
+ end
1149
+
1150
+
1151
+ # Data information.
1152
+ # Gets approximated (interpolated) position of maximum to variables x, y, z and returns the maximal value.
1153
+ # @overload maximal(x,y,z)
1154
+ # @param [Float] x
1155
+ # @param [Float] y
1156
+ # @param [Float] z
1157
+ # @return [Float]
1158
+ # @overload maximal(x,y,z)
1159
+ # @param [Float] x
1160
+ # @param [Float] y
1161
+ # @param [Float] z
1162
+ # @return [Float]
1163
+ def maximal
1164
+ end
1165
+
1166
+
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
1178
+ end
1179
+
1180
+
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
1187
+ end
1188
+
1189
+
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
1203
+ end
1204
+
1205
+
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
1219
+ end
1220
+
1221
+
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
1232
+ end
1233
+
1234
+
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
1251
+ end
1252
+
1253
+
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
1263
+ end
1264
+
1265
+
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
1274
+ # @return [nil]
1275
+ # @overload set_column_id(ids)
1276
+ # @param [String] ids
1277
+ # @return [nil]
1278
+ # @overload mgl_datac_set_id(a,ids)
1279
+ # @param [HADT] a
1280
+ # @param [String] ids
1281
+ # @return [nil]
1282
+ def mgl_datac_set_id
1283
+ end
1284
+
1285
+
1286
+ # 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)
1289
+ # @param [String] fname
1290
+ # @param [String] scheme
1291
+ # @param [Float] v1 default=0
1292
+ # @param [Float] v2 default=1
1293
+ # @return [nil]
1294
+ def import
1295
+ end
1296
+
1297
+
1298
+ # 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)
1301
+ # @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
1306
+ # @return [nil]
1307
+ def export
1308
+ end
1309
+
1310
+
1311
+ # 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
1316
+ # @param [bool] norm default=true
1317
+ # @return [MglData]
1318
+ # @overload solve(val,dir,idat,norm=true)
1319
+ # @param [Float] val
1320
+ # @param [String] dir
1321
+ # @param [MglData] idat
1322
+ # @param [bool] norm default=true
1323
+ # @return [MglData]
1324
+ def solve
1325
+ end
1326
+
1327
+
1328
+ # 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
1333
+ # @return [MglData]
1334
+ def roots
1335
+ end
1336
+
1337
+
1338
+ # 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
1348
+ # @return [nil]
1349
+ def diff
1350
+ end
1351
+
1352
+
1353
+ # Data changing.
1354
+ # Do Sine transform of the data in given direction or directions. The Sine transform is (see ).
1355
+ # @overload sin_fft(dir)
1356
+ # @param [String] dir
1357
+ # @return [nil]
1358
+ def sin_fft
1359
+ end
1360
+
1361
+
1362
+ # Data changing.
1363
+ # Do Cosine transform of the data in given direction or directions. The Cosine transform is (see ).
1364
+ # @overload cos_fft(dir)
1365
+ # @param [String] dir
1366
+ # @return [nil]
1367
+ def cos_fft
1368
+ end
1369
+
1370
+
1371
+ # 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)
1374
+ # @param [String] dir
1375
+ # @param [mreal da=2] m_pi
1376
+ # @return [nil]
1377
+ def sew
1378
+ end
1379
+
1380
+
1381
+ # Data changing.
1382
+ # Find envelop for data values along direction dir.
1383
+ # @overload envelop(dir='x')
1384
+ # @param [String] dir default='x'
1385
+ # @return [nil]
1386
+ def envelop
1387
+ end
1388
+
1389
+
1390
+ # 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
1397
+ # @return [nil]
1398
+ def norm
1399
+ end
1400
+
1401
+
1402
+ # 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
1410
+ # @return [nil]
1411
+ def norm_sl
1412
+ end
1413
+
1414
+
1415
+ # 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)
1418
+ # @param [Float] x
1419
+ # @param [Float] y default=0
1420
+ # @param [Float] z default=0
1421
+ # @return [Float]
1422
+ def spline
1423
+ end
1424
+
1425
+
1426
+ # 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)
1429
+ # @param [Float] x
1430
+ # @param [Float] y default=0
1431
+ # @param [Float] z default=0
1432
+ # @return [Float]
1433
+ def spline1
1434
+ end
1435
+
1436
+
1437
+ # 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)
1440
+ # @param [MglPoint] dif
1441
+ # @param [Float] x
1442
+ # @param [Float] y default=0
1443
+ # @param [Float] z default=0
1444
+ # @return [Float]
1445
+ def spline
1446
+ end
1447
+
1448
+
1449
+ # 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)
1452
+ # @param [MglPoint] dif
1453
+ # @param [Float] x
1454
+ # @param [Float] y default=0
1455
+ # @param [Float] z default=0
1456
+ # @return [Float]
1457
+ def spline1
1458
+ end
1459
+
1460
+
1461
+ # 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
1476
+ end
1477
+
1478
+
1479
+ # 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
1488
+ end
1489
+
1490
+
1491
+ # 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
1498
+ # @return [Float]
1499
+ def last
1500
+ end
1501
+
1502
+
1503
+ # 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
1513
+ end
1514
+
1515
+
1516
+ # 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
1522
+ end
1523
+
1524
+
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 +
1534
+ end
1535
+
1536
+
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 -
1546
+ end
1547
+
1548
+
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 *
1558
+ end
1559
+
1560
+
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
+
1572
+
1573
+ end # MglData
1574
+
1575
+ class MglExprC
1576
+
1577
+ # Evaluate expression.
1578
+ # Evaluates the formula for 'x','r'=x, 'y','n'=y, 'z','t'=z, 'a','u'=u.
1579
+ # @overload eval(x,y,z)
1580
+ # @param [Float] x
1581
+ # @param [Float] y
1582
+ # @param [Float] z
1583
+ # @return [Float]
1584
+ # @overload eval(x,y,z)
1585
+ # @param [dual] x
1586
+ # @param [dual] y
1587
+ # @param [dual] z
1588
+ # @return [dual]
1589
+ def eval
1590
+ end
1591
+
1592
+
1593
+ # 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
1602
+ end
1603
+
1604
+
1605
+ end # MglExprC
1606
+
1607
+ class MglExpr
1608
+
1609
+ # Evaluate expression.
1610
+ # Evaluates the formula derivation respect to dir for 'x','r'=x, 'y','n'=y, 'z','t'=z, 'a','u'=u.
1611
+ # @overload diff(dir,x,y,z)
1612
+ # @param [String] dir
1613
+ # @param [Float] x
1614
+ # @param [Float] y
1615
+ # @param [Float] z
1616
+ # @return [Float]
1617
+ def diff
1618
+ end
1619
+
1620
+
1621
+ # 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
1628
+ end
1629
+
1630
+
1631
+ end # MglExpr
1632
+
1633
+ class MglVar
1634
+
1635
+ # MGL variables.
1636
+ # Evaluates the formula for 'x','r'=x, 'y','n'=y, 'z','t'=z, 'a','u'=u.
1637
+ # @overload move_after(var)
1638
+ # @param [MglVar] var
1639
+ # @return [nil]
1640
+ def move_after
1641
+ end
1642
+
1643
+
1644
+ end # MglVar
1645
+