![]() |
|
Q: How does apop_data_set(in, row, col, data) differ from gsl_matrix_set(in->matrix, row, col, data)?
A: It's seven characters shorter.
There are a few other differences: the apop_data set has names, so we can get/set elements using those names, and it has both matrix and vector elements.
The _ptr functions return a pointer to the given cell. Those functions follow the lead of gsl_vector_ptr and gsl_matrix_ptr, and like those functions, return a pointer to the appropriate double.
| double apop_data_get | ( | const apop_data * | in, | |
| size_t | row, | |||
| int | col | |||
| ) |
Returns the data element at the given point, using numeric indices. See the set/get page for details.
| double apop_data_get_it | ( | const apop_data * | in, | |
| size_t | row, | |||
| char * | col | |||
| ) |
Get an element from an apop_data set, using the column name but the row number See the set/get page for details.
| double apop_data_get_ti | ( | const apop_data * | in, | |
| char * | row, | |||
| int | col | |||
| ) |
Get an element from an apop_data set, using the row name but the column number See the set/get page for details.
| double apop_data_get_tt | ( | const apop_data * | in, | |
| char * | row, | |||
| char * | col | |||
| ) |
Get an element from an apop_data set, using the row and column name. See the set/get page for details.
| double* apop_data_ptr | ( | const apop_data * | data, | |
| const int | i, | |||
| const int | j | |||
| ) |
Get a pointer to an element of an apop_data set. See the set/get page for details.
| double* apop_data_ptr_it | ( | const apop_data * | in, | |
| size_t | row, | |||
| char * | col | |||
| ) |
Get a pointer to an element from an apop_data set, using the column name but the row number. See the set/get page for details.
| double* apop_data_ptr_ti | ( | const apop_data * | in, | |
| char * | row, | |||
| int | col | |||
| ) |
Get a pointer to an element from an apop_data set, using the row name but the column number. See the set/get page for details.
| double* apop_data_ptr_tt | ( | const apop_data * | in, | |
| char * | row, | |||
| char * | col | |||
| ) |
Get a pointer to an element from an apop_data set, using the row and column name. See the set/get page for details.
| void apop_data_set | ( | apop_data * | in, | |
| size_t | row, | |||
| int | col, | |||
| double | data | |||
| ) |
Set a data element using two numeric indices.
| void apop_data_set_it | ( | apop_data * | in, | |
| size_t | row, | |||
| char * | col, | |||
| double | data | |||
| ) |
Set an element from an apop_data set, using the column name but the row number
| void apop_data_set_ti | ( | apop_data * | in, | |
| char * | row, | |||
| int | col, | |||
| double | data | |||
| ) |
Set an element from an apop_data set, using the row name but the column number