manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.6 Make another data

Method on mglData (C++, Python): mglData SubData (int xx, int yy=-1, int zz=-1) const
C function: HMDT mgl_data_subdata (const HMDT dat, int xx, int yy, int zz)

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.

Method on mglData (C++, Python): mglData SubData (const mglData &xx, const mglData &yy, const mglData &zz) const
C function: HMDT mgl_data_subdata_ext (const HMDT dat, const HMDT xx, const HMDT yy, const HMDT zz)

Extracts sub-array data from the original data array for indexes specified by arrays xx, yy, zz (indirect access). The resulting array have the same dimensions as input arrays for 2D and 3D arguments. This function work like previous one for 1D arguments (or numbers). The dimensions of all argument must be the same if they are 2D or 3D arrays.

Method on mglData (C++, Python): mglData Column (const char *eq) const
C function: HMDT mgl_data_column (const HMDT dat, const char *eq)

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 by SetColumnId() function.

Method on mglData (C++, Python): void SetColumnId (const char *ids)
C function: void mgl_data_set_id (HMDT dat, 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 (C++, Python): mglData Trace () const

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.

Method on mglData (C++, Python): mglData Hist (int n, float v1=0, float v2=1, int nsub=0) const
C function: HMDT mgl_data_hist (const HMDT dat, int n, float v1, float v2, int nsub)

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 (C++, Python): mglData Hist (const mglData &w, int n, float v1=0, float v2=1, int nsub=0) const
C function: HMDT mgl_data_hist_w (const HMDT dat, const HMDT w, int n, float v1, float v2, int nsub)

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 (C++, Python): mglData Momentum (char dir, const char *how) const
C function: HMDT mgl_data_momentum (const HMDT dat, char dir, const char *how)

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 (C++, Python): mglData Sum (const char *dir) const
C function: HMDT mgl_data_sum (const HMDT dat, const char *dir)

Gets array which is the result of summation in given direction or direction(s).

Method on mglData (C++, Python): mglData Max (const char *dir) const
C function: HMDT mgl_data_max_dir (const HMDT dat, const char *dir)

Gets array which is the maximal data values in given direction or direction(s).

Method on mglData (C++, Python): mglData Min (const char *dir) const
C function: HMDT mgl_data_min_dir (const HMDT dat, const char *dir)

Gets array which is the maximal data values in given direction or direction(s).

Method on mglData (C++, Python): mglData Combine (const mglData &a) const
C function: HMDT mgl_data_combine (const HMDT dat, const HMDT a)

Return direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on).

Method on mglData (C++, Python): mglData Evaluate (const mglData &idat, bool norm=true) const
Method on mglData (C++, Python): mglData Evaluate (const mglData &idat, const mglData &jdat, bool norm=true) const
Method on mglData (C++, Python): mglData Evaluate (const mglData &idat, const mglData &jdat, const mglData &kdat, bool norm=true) const
C function: HMDT mgl_data_evaluate_i (const HMDT dat, const HMDT idat, int norm)
C function: HMDT mgl_data_evaluate_ij (const HMDT dat, const HMDT idat, const HMDT jdat, int norm)
C function: HMDT mgl_data_evaluate_ijk (const HMDT dat, const HMDT idat, const HMDT jdat, const HMDT kdat, int norm)

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 ranges [0,nx], [0,ny], [0,nz] correspondingly.

Method on mglData (C++, Python): mglData Resize (int mx, int my=1, int mz=1, float x1=0, float x2=1, float y1=0, float y2=1, float z1=0, float z2=1) const
C function: HMDT mgl_data_resize (const HMDT dat, int mx, int my, int mz)
C function: HMDT mgl_data_resize_box (const HMDT dat, int mx, int my, int mz, float x1, float x2, float y1, float y2, float z1, float z2)

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] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.