| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.6 Make another data
- Method on mglData:
mglDataSubData (intxx,intyy=-1,intzz=-1)const 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. The most convenient way is to use this function as initialization of othermglDatavariable likemglData a1(a.SubData(-1,-1,3)).
- Method on mglData:
mglDataColumn (const char *eq)const Get column (or slice) of the data filled by formula eq of other named columns. For example,
Column("n*w^2/exp(t)");. The column ids must be defined first bySetColumnId()function.
- Method on mglData:
voidSetColumnId (const char *ids) Set the symbol id for data columns. The string must contain one symbol 'a'...'z' per column (without spaces).
- Method on mglData:
mglDataHist (intn,floatv1=0,floatv2=1,intnsub=0)const Creates n-th points distribution of the data values in range [v1, v2]. Parameter nsub define the number of additional interpolated points (for smoothness of histogram).
- Method on mglData:
mglDataHist (const mglData &w,intn,floatv1=0,floatv2=1,intnsub=0)const Creates n-th points distribution of the data values in range [v1, v2]. Array w specifies weights of the data elements. Parameter nsub define the number of additional interpolated points (for smoothness of histogram).
- Method on mglData:
mglDataMomentum (chardir,const char *how)const Get momentum (1D-array) of the data along direction dir. String how contain kind of momentum. The momentum is defined like as res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij if var=‘z’ and so on. Coordinates ‘x’, ‘y’, ‘z’ are data indexes normalized in range [0,1].
- Method on mglData:
mglDataSum (const char *dir)const Gets array which is the result of summation in given direction or direction(s).
- Method on mglData:
mglDataMax (const char *dir)const Gets array which is the maximal data values in given direction or direction(s).
- Method on mglData:
mglDataMin (const char *dir)const Gets array which is the maximal data values in given direction or direction(s).
- Method on mglData:
mglDataCombine (const mglData &a)const Return direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on).
- Method on mglData:
mglDataEvaluate (const mglData &idat,boolnorm=true)const - Method on mglData:
mglDataEvaluate (const mglData &idat,const mglData &jdat,boolnorm=true)const - Method on mglData:
mglDataEvaluate (const mglData &idat,const mglData &jdat,const mglData &kdat,boolnorm=true)const Get 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 range [0,nx], [0,ny], [0,nz] correspondingly.
- Method on mglData:
mglDataResize (intmx,intmy=1,intmz=1,floatx1=0,floatx2=1,floaty1=0,floaty2=1,floatz1=0,floatz2=1)const 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].
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
