| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.4 Data filling
- MGL command: list DAT
v1 ... Creates new variable with name dat and fills it by numeric values of command arguments
v1 .... Command can create one-dimensional and two-dimensional arrays with arbitrary values. For creating 2d array the user should use delimiter ‘|’ which means that the following values lie in next row. Array sizes are [maximal of row sizes * number of rows]. For example, commandlist 1 | 2 3creates the array [1 0; 2 3]. Note, that the maximal number of arguments is 1000.
- MGL command: list DAT d1 ...
Creates new variable with name dat and fills it by data values of arrays of command arguments d1 .... Command can create two-dimensional or three-dimensional (if arrays in arguments are 2d arrays) arrays with arbitrary values. Minor dimensions of all arrays in arguments should be equal to dimensions of first array d1. In the opposite case the argument will be ignored. Note, that the maximal number of arguments is 1000.
- Method on
mglData:voidSet (const float *A,intNX,intNY=1,intNZ=1) - Method on
mglData:voidSet (const double *A,intNX,intNY=1,intNZ=1) - C function:
voidmgl_data_set_float (HMDTdat,const float *A,intNX,intNY,intNZ) - C function:
voidmgl_data_set_double (HMDTdat,const double *A,intNX,intNY,intNZ) Allocates memory and copies the data from the flat
float*ordouble*array.
- Method on
mglData:voidSet (const float **A,intN1,intN2) - Method on
mglData:voidSet (const double **A,intN1,intN2) - C function:
voidmgl_data_set_float2 (HMDTdat,const float **A,intN1,intN2) - C function:
voidmgl_data_set_double2 (HMDTdat,const double **A,intN1,intN2) Allocates memory and copies the data from the
float**ordouble**array with dimensions N1, N2, i.e. from array defined asfloat a[N1][N2];.
- Method on
mglData:voidSet (const float ***A,intN1,intN2) - Method on
mglData:voidSet (const double ***A,intN1,intN2) - C function:
voidmgl_data_set_float3 (HMDTdat,const float ***A,intN1,intN2) - C function:
voidmgl_data_set_double3 (HMDTdat,const double ***A,intN1,intN2) Allocates memory and copies the data from the
float***ordouble***array with dimensions N1, N2, N3, i.e. from array defined asfloat a[N1][N2][N3];.
- Method on
mglData:voidSet (gsl_vector *v) - C function:
voidmgl_data_set_vector (HMDTdat,gsl_vector *v) Allocates memory and copies the data from the
gsl_vector *structure.
- Method on
mglData:voidSet (gsl_matrix *m) - C function:
voidmgl_data_set_matrix (HMDTdat,gsl_matrix *m) Allocates memory and copies the data from the
gsl_matrix *structure.
- Method on
mglData:voidSet (const mglData &from) - Method on
mglData:voidSet (HCDTfrom) - C function:
voidmgl_data_set (HMDTdat,HCDTfrom) Copies the data from
mglData(ormglDataA) instance from.
- Method on
mglData:voidSet (const std::vector<int> &d) - Method on
mglData:voidSet (const std::vector<float> &d) - Method on
mglData:voidSet (const std::vector<double> &d) Allocates memory and copies the data from the
std::vector<T>array.
- Method on
mglData:voidSet (const char *str,intNX,intNY=1,intNZ=1) - C function:
voidmgl_data_set_values (const char *str,intNX,intNY,intNZ) Allocates memory and scanf the data from the string.
- Method on
mglData:voidLink (const mglData &from) - Method on
mglData:voidLink (const float *A,intNX,intNY=1,intNZ=1) - C function:
voidmgl_data_link (HMDTdat,const float *A,intNX,intNY,intNZ) Links external data array, i.e. don’t delete it at exit.
- MGL command: var DAT
num v1 [v2=nan] Creates new variable with name dat for one-dimensional array of size num. Array elements are equidistantly distributed in range [v1, v2]. If v2=
nanthen v2=v1 is used.
- MGL command: fill dat v1 v2 ['dir'='x']
- Method on
mglData:voidFill (floatv1,floatv2,chardir='x') - C function:
voidmgl_data_fill (HMDTdat,floatv1,floatv2,chardir) Equidistantly fills the data values to range [v1, v2] in direction dir={‘x’,‘y’,‘z’}.
- MGL command: fill dat 'eq'
- MGL command: fill dat 'eq' vdat
- MGL command: fill dat 'eq' vdat wdat
- Method on
mglData:voidFill (HMGLgr,const char *eq,const char *opt="") - Method on
mglData:voidFill (HMGLgr,const char *eq,const mglData &vdat,const char *opt="") - Method on
mglData:voidFill (HMGLgr,const char *eq,const mglData &vdat,const mglData &wdat,const char *opt="") - C function:
voidmgl_data_fill_eq (HMGLgr,HMDTdat,const char *eq,const HMDT *vdat,const HMDT *wdat,const char *opt) Fills the value of array according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’. Coordinates ‘x’, ‘y’, ‘z’ are supposed to be normalized in axis range of canvas gr (in difference from
Modifyfunctions). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat which can beNULL(i.e. can be omitted).
- MGL command: modify dat 'eq' [
dim=0] - MGL command: modify dat 'eq' vdat
- MGL command: modify dat 'eq' vdat wdat
- Method on
mglData:voidModify (const char *eq,intdim=0) - Method on
mglData:voidModify (const char *eq,const mglData &v) - Method on
mglData:voidModify (const char *eq,const mglData &v,const mglData &w) - C function:
voidmgl_data_modify (HMDTdat,const char *eq,intdim) - C function:
voidmgl_data_modify_vw (HMDTdat,const char *eq,HCDTv,HCDTw) 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.
- MGL command: fillsample dat 'how'
- Method on
mglData:voidFillSample (const char *how) - mglData:
voidmgl_data_fill_sample (HMDTa,const char *how) Fills data by ’x’ or ’k’ samples for Hankel (’h’) or Fourier (’f’) transform.
- MGL command: put dat
val [i=: j=: k=:] - Method on
mglData:voidPut (floatval,inti=-1,intj=-1,intk=-1) - mglData:
voidmgl_data_put_val (HMDTa,floatval,inti,intj,intk) 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).
- MGL command: put dat vdat [
i=: j=: k=:] - Method on
mglData:voidPut (const mglData &v,inti=-1,intj=-1,intk=-1) - mglData:
voidmgl_data_put_dat (HMDTa,HCDTv,inti,intj,intk) 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.
- MGL command: idset dat 'ids'
- Method on
mglData:voidSetColumnId (const char *ids) - mglData:
voidmgl_data_set_id (const char *ids) Sets the symbol ids for data columns. The string should contain one symbol ’a’...’z’ per column. These ids are used in column function.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 13, 2012 using texi2html 5.0.
