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

6.2 Create and delete

Constructor on mglData: mglData (int mx=1, int my=1, int mz=1)

Default constructor. Allocates the memory for data array and initializes it by zero.

Constructor on mglData: mglData (const char *fname)

Initializes the data by reading from file.

Constructor on mglData: mglData (const mglData &dat)

Initiates by other mglData instance.

Method on mglData: void Create (int mx, int my=1, int mz=1)

Creates or recreates the array with specified size and fills it by zero. This function does nothing if one of parameters mx, my, mz is zero or negative.

Method on mglData: void Set (const float *A, int NX, int NY=1, int NZ=1)

Allocates memory and copies the data from the flat float* array.

Method on mglData: void Set (const double *A, int NX, int NY=1, int NZ=1)

Allocates memory and copies the data from the flat double* array.

Method on mglData: void Set (const float **A, int N1, int N2)

Allocates memory and copies the data from the float** array with dimensions N1, N2, i.e. from array defined as float a[N1][N2];.

Method on mglData: void Set (const double **A, int N1, int N2)

Allocates memory and copies the data from the double** array with dimensions N1, N2, i.e. from array defined as double a[N1][N2];.

Method on mglData: void Set (const float ***A, int N1, int N2)

Allocates memory and copies the data from the float*** array with dimensions N1, N2, N3, i.e. from array defined as float a[N1][N2][N3];.

Method on mglData: void Set (const double ***A, int N1, int N2)

Allocates memory and copies the data from the double*** array with dimensions N1, N2, N3, i.e. from array defined as double a[N1][N2][N3];.

Method on mglData: void Set (gsl_vector *v)

Allocates memory and copies the data from the gsl_vector * structure.

Method on mglData: void Set (gsl_matrix *m)

Allocates memory and copies the data from the gsl_matrix * structure.

Method on mglData: inline void Set (const mglData &dat)

Copies the data from mglData instance dat.

Method on mglData: void Set (const char *str, int NX, int NY=1, int NZ=1)

Allocates memory and scanf the data from the string.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.