| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are a set of functions for obtaining data properties in MGL language. However most of them can be found using "suffixes". Suffix can get some numerical value of the data array (like its size, maximal or minimal value, the sum of elements and so on) as number. Later it can be used as usual number in command arguments. The suffixes start from point ‘.’ right after (without spaces) variable name or its sub-array. For example, a.nx give the x-size of data a, b(1).max give maximal value of second row of variable b, (c(:,0)^2).sum give the sum of squares of elements in the first column of c and so on.
mglData: const char * PrintInfo () constmglData: void PrintInfo (FILE *fp) constconst char * mgl_data_info (HCDT dat)Gets or prints to file fp or as message (in MGL) information about the data (sizes, maximum/minimum, momentums and so on).
Prints string txt as message.
mglData: long GetNx ()mglData: long GetNy ()mglData: long GetNz ()long mgl_data_get_nx (HCDT dat)long mgl_data_get_ny (HCDT dat)long mgl_data_get_nz (HCDT dat)Gets the x-, y-, z-size of the data.
mglData: float Maximal () constfloat mgl_data_max (HCDT dat)Gets maximal value of the data.
mglData: float Minimal () constfloat mgl_data_min (HMDT dat) constGets minimal value of the data.
mglData: float Minimal (int &i, int &j, int &k) constfloat mgl_data_min_int (HCDT dat, int *i, int *j, int *k)Gets position of minimum to variables i, j, k and returns the minimal value.
mglData: float Maximal (int &i, int &j, int &k) constfloat mgl_data_max_int (HCDT dat, int *i, int *j, int *k)Gets position of maximum to variables i, j, k and returns the maximal value.
mglData: float Minimal (float &x, float &y, float &z) constfloat mgl_data_min_real (HCDT dat, float *x, float *y, float *z)Gets approximated (interpolated) position of minimum to variables x, y, z and returns the minimal value.
mglData: float Maximal (float &x, float &y, float &z) constfloat mgl_data_max_real (HCDT dat, float *x, float *y, float *z)Gets approximated (interpolated) position of maximum to variables x, y, z and returns the maximal value.
mglData: float Momentum (char dir, float &a, float &w) constmglData: float Momentum (char dir, float &m, float &w, float &s, float &k) constfloat mgl_data_momentum_val (HCDT dat, char dir, float *a, float *w, float *s, float *k)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.
mglData: float Find (const char *cond, int &i, int &j, int &k) constfloat mgl_data_first (HCDT dat, const char *cond, int *i, int *j, int *k)Find position (after specified in i, j, k) of first nonzero value of formula cond. Function return the data value at found position.
mglData: float Last (const char *cond, int &i, int &j, int &k) constfloat mgl_data_last (HCDT dat, const char *cond, int *i, int *j, int *k)Find position (before specified in i, j, k) of last nonzero value of formula cond. Function return the data value at found position.
mglData: int Find (const char *cond, char dir, int i=0, int j=0, int k=0) constfloat mgl_data_find (HCDT dat, const char *cond, int i, int j, int k)Return position of first in direction dir nonzero value of formula cond. The search is started from point {i,j,k}.
mglData: bool FindAny (const char *cond) constfloat mgl_data_find_any (HCDT dat, const char *cond)Determines if any nonzero value of formula in the data array.
Give first (for .a, i.e. dat->a[0]).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Autobuild on July 16, 2012 using texi2html 1.82.