7.1 Public variables

Variable of mglData: mreal * a
Variable of mglDataC: dual * a

Data array itself. The flat data representation is used. For example, matrix [nx x ny] is presented as flat (1d-) array with length nx*ny. The element with indexes {i, j, k} is a[i+nx*j+nx*ny*k] (indexes are zero based).

Variable of mglData: long nx
Variable of mglDataC: long nx

Number of points in 1st dimensions (’x’ dimension).

Variable of mglData: long ny
Variable of mglDataC: long ny

Number of points in 2nd dimensions (’y’ dimension).

Variable of mglData: long nz
Variable of mglDataC: long nz

Number of points in 3d dimensions (’z’ dimension).

Variable of mglData: std::string id
Variable of mglDataC: std::string id

Names of column (or slice if nz>1) – one character per column.

Flag to use external data, i.e. don’t delete it.

Variable of mglDataA: std::wstring s

Name of data. It is used in parsing of MGL scripts.

Variable of mglDataA: bool temp

Flag of temporary variable, which should be deleted.

Variable of mglDataA: void (*)(void *) func

Pointer to callback function which will be called at destroying.

Variable of mglDataA: void * o

Pointer to object for callback function.

Method on mglData: mreal GetVal (long i)
Method on mglDataC: mreal GetVal (long i)
Method on mglData: void SetVal (mreal val, long i)
Method on mglDataC: void SetVal (mreal val, long i)

Gets or sets the value in by "flat" index i without border checking. Index i should be in range [0, nx*ny*nz-1].

Method on mglDataA: long GetNx ()
Method on mglDataA: long GetNy ()
Method on mglDataA: long GetNz ()
C function: long mgl_data_get_nx (HCDT dat)
C function: long mgl_data_get_ny (HCDT dat)
C function: long mgl_data_get_nz (HCDT dat)

Gets the x-, y-, z-size of the data.

C function: mreal mgl_data_get_value (HCDT dat, int i, int j, int k)
C function: dual mgl_datac_get_value (HCDT dat, int i, int j, int k)
C function: mreal * mgl_data_value (HMDT dat, int i, int j, int k)
C function: dual * mgl_datac_value (HADT dat, int i, int j, int k)
C function: void mgl_data_set_value (HMDT dat, mreal v, int i, int j, int k)
C function: void mgl_datac_set_value (HADT dat, dual v, int i, int j, int k)

Gets or sets the value in specified cell of the data with border checking.

C function: const mreal * mgl_data_data (HCDT dat)
C function: const dual * mgl_datac_data (HCDT dat)

Returns pointer to internal data array.

C function only: void mgl_data_set_func (mglDataA *dat, void (*func)(void *), void *par)

Set pointer to callback function which will be called at destroying.

C function: void mgl_data_set_name (mglDataA *dat, const char *name)
C function: void mgl_data_set_name_w (mglDataA *dat, const wchar_t *name)

Set name of data, which used in parsing of MGL scripts.