1.5.0
CCC
 
Keypair.hpp File Reference
#include "gstlearn_export.hpp"

Functions

GSTLEARN_EXPORT void set_keypair (const char *keyword, int origin, int nrow, int ncol, const double *values)
 
GSTLEARN_EXPORT void app_keypair (const char *keyword, int origin, int nrow, int ncol, double *values)
 
GSTLEARN_EXPORT void set_keypair_int (const char *keyword, int origin, int nrow, int ncol, int *values)
 
GSTLEARN_EXPORT void app_keypair_int (const char *keyword, int origin, int nrow, int ncol, int *values)
 
GSTLEARN_EXPORT double get_keypone (const char *keyword, double valdef)
 
GSTLEARN_EXPORT int get_keypair (const char *keyword, int *nrow, int *ncol, double **values)
 
GSTLEARN_EXPORT int get_keypair_int (const char *keyword, int *nrow, int *ncol, int **values)
 
GSTLEARN_EXPORT void del_keypair (const char *keyword, int flag_exact)
 
GSTLEARN_EXPORT void print_keypair (int flag_short)
 

Function Documentation

◆ app_keypair()

GSTLEARN_EXPORT void app_keypair ( const char *  keyword,
int  origin,
int  nrow,
int  ncol,
double *  values 
)

Deposit a keypair (double values) - Append to existing array

Parameters
[in]keywordKeyword
[in]origin1 from C; 2 from R
[in]nrowNumber of rows
[in]ncolNumber of columns
[in]valuesArray of values (Dimension: nrow * ncol)
Remarks
Appending extends the number of rows but keeps the number of
columns and the origin unchanged... otherwise fatal error is issued
All keypair related function use realloc (rather than mem_realloc)
not to show up in the memory leak calculations

◆ app_keypair_int()

GSTLEARN_EXPORT void app_keypair_int ( const char *  keyword,
int  origin,
int  nrow,
int  ncol,
int *  values 
)

Deposit a keypair (doubleinteger values) - Append to existing array

Parameters
[in]keywordKeyword
[in]origin1 from C; 2 from R
[in]nrowNumber of rows
[in]ncolNumber of columns
[in]valuesArray of values (Dimension: nrow * ncol)
Remarks
Appending extends the number of rows but keeps the number of
columns and the origin unchanged ... otherwise fatal error is issued
All keypair related function use realloc (rather than mem_realloc)
not to show up in the memory leak calculations

◆ del_keypair()

GSTLEARN_EXPORT void del_keypair ( const char *  keyword,
int  flag_exact 
)

Delete a keypair

Parameters
[in]keywordKeyword to be deleted
[in]flag_exact1 if Exact keyword matching is required
Remarks
All keypair related function use malloc (rather than mem_alloc)
not to show up in the memory leak calculations

◆ get_keypair()

GSTLEARN_EXPORT int get_keypair ( const char *  keyword,
int *  nrow,
int *  ncol,
double **  values 
)

Inquiry the keypair

Returns
Error returned code
Parameters
[in]keywordKeyword
[out]nrowNumber of rows
[out]ncolNumber of columns
[out]valuesArray of values attached to the keyword
Remarks
The returned array must be freed by the calling function
All keypair related function use malloc (rather than mem_alloc)
not to show up in the memory leak calculations

◆ get_keypair_int()

GSTLEARN_EXPORT int get_keypair_int ( const char *  keyword,
int *  nrow,
int *  ncol,
int **  values 
)

Inquiry the keypair (integer values)

Returns
Error returned code
Parameters
[in]keywordKeyword
[out]nrowNumber of rows
[out]ncolNumber of columns
[out]valuesArray of values attached to the keyword
Remarks
The returned array must be freed by the calling function
All keypair related function use malloc (rather than mem_alloc)
not to show up in the memory leak calculations

◆ get_keypone()

GSTLEARN_EXPORT double get_keypone ( const char *  keyword,
double  valdef 
)

Inquiry the keypair (for a single value)

Returns
Returned value
Parameters
[in]keywordKeyword
[in]valdefFactory setting value
Remarks
This function will returns systematically the default value
if the targeted keypair contains more than a single value

◆ print_keypair()

GSTLEARN_EXPORT void print_keypair ( int  flag_short)

Print the list of keypairs

Parameters
[in]flag_short1 for a short output

◆ set_keypair()

GSTLEARN_EXPORT void set_keypair ( const char *  keyword,
int  origin,
int  nrow,
int  ncol,
const double *  values 
)

Deposit a keypair (double values)

Parameters
[in]keywordKeyword
[in]origin1 from C; 2 from R
[in]nrowNumber of rows
[in]ncolNumber of columns
[in]valuesArray of values (Dimension: nrow * ncol)
Remarks
All keypair related function use malloc (rather than mem_alloc)
not to show up in the memory leak calculations

◆ set_keypair_int()

GSTLEARN_EXPORT void set_keypair_int ( const char *  keyword,
int  origin,
int  nrow,
int  ncol,
int *  values 
)

Deposit a keypair (integer values)

Parameters
[in]keywordKeyword
[in]origin1 from C; 2 from R
[in]nrowNumber of rows
[in]ncolNumber of columns
[in]valuesArray of values (Dimension: nrow * ncol)
Remarks
All keypair related function use malloc (rather than mem_alloc)
not to show up in the memory leak calculations