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 (C++, Python): void Create (int mx, int my=1, int mz=1)
C function: void mgl_data_create (HMDT dat, int mx, int my, int mz)

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 (C++): void Set (const float *A, int NX, int NY=1, int NZ=1)
Method on mglData (C++): void Set (const double *A, int NX, int NY=1, int NZ=1)
C function: void mgl_data_set_float (HMDT dat, const float *A, int NX, int NY, int NZ)
C function: void mgl_data_set_double (HMDT dat, const double *A, int NX, int NY, int NZ)

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

Method on mglData (C++): void Set (const float **A, int N1, int N2)
Method on mglData (C++): void Set (const double **A, int N1, int N2)
C function: void mgl_data_set_float2 (HMDT dat, const float **A, int N1, int N2)
C function: void mgl_data_set_double2 (HMDT dat, const double **A, int N1, int N2)

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

Method on mglData (C++): void Set (const float ***A, int N1, int N2)
Method on mglData (C++): void Set (const double ***A, int N1, int N2)
C function: void mgl_data_set_float3 (HMDT dat, const float ***A, int N1, int N2)
C function: void mgl_data_set_double3 (HMDT dat, const double ***A, int N1, int N2)

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

Method on mglData (C++): void Set (gsl_vector *v)
C function: void mgl_data_set_vector (HMDT dat, gsl_vector *v)

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

Method on mglData (C++): void Set (gsl_matrix *m)
C function: void mgl_data_set_matrix (HMDT dat, gsl_matrix *m)

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

Method on mglData (C++, Python): inline void Set (const mglData &from)
C function: void mgl_data_set (HMDT dat, const HMDT from)

Copies the data from mglData instance from.

Method on mglData (C++): void Set (const std::vector<int> &d)
Method on mglData (C++): void Set (const std::vector<float> &d)
Method on mglData (C++): void Set (const std::vector<double> &d)

Allocates memory and copies the data from the std::vector<T> array.

Method on mglData (C+, Python): void Set (const char *str, int NX, int NY=1, int NZ=1)
C function: void mgl_data_set_values (const char *str, int NX, int NY, int NZ)

Allocates memory and scanf the data from the string.


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