Two-dimensional matrix of arbitrary values.
Typedefs | |
| typedef struct mat | mat_t |
| The mat data type. | |
Functions | |
| FTS_API fts_schema_t * | mat_get_schema (mat_t *self, int dim) |
| Get row or column schema of mat. | |
| FTS_API void | mat_set_schema (mat_t *self, int dim, fts_schema_t *schema) |
| Set row or column schema of mat. | |
| FTS_API int | mat_set_size_nogrow (mat_t *mat, int m, int n) |
| Set dimensions (number of row and columns) of a mat. | |
| FTS_API int | mat_insert_rows_nogrow (mat_t *mat, int pos, int num) |
| Insert rows at given position of a mat. | |
| FTS_API int | mat_insert_columns_nogrow (mat_t *mat, int pos, int num) |
| Insert columns at given position of a mat. | |
| FTS_API int | mat_delete_rows (mat_t *mat, int pos, int num) |
| Delete given number of rows starting from given position. | |
| FTS_API int | mat_delete_columns (mat_t *mat, int pos, int num) |
| Delete given number of columns starting from given position. | |
| float * | mat_lock (mat_t *mat) |
| Get a thread-safe shared pointer to the raw float data vector of an mat. | |
| void | mat_unlock (mat_t *mat) |
| Unlock an mat after a previous lock. | |
| int | mat_get_m (mat_t *mat) |
| Get number of rows of an mat. | |
| int | mat_get_n (mat_t *mat) |
| Get number of columns of an mat. | |
| FTS_API void | mat_set_element (mat_t *mat, int i, int j, const fts_atom_t *atom) |
| Set mat value at given index (row and column). | |
| fts_atom_t * | mat_get_element (mat_t *mat, int i, int j) |
| Get mat value at given index (row and column). | |
| fts_atom_t * | mat_get_row (mat_t *mat, int i) |
| Get pointer to values corresponing to a given row of a mat. | |
| FTS_API void | mat_set_const (mat_t *mat, const fts_atom_t *atom) |
| Set all mat values to a given constant. | |
| FTS_API void | mat_copy_locked (mat_t *orig, mat_t *copy) |
| Copy values (and dimensions) of one mat to another. | |
| FTS_API void | mat_set_from_atoms (mat_t *mat, int onset, int step, int ac, const fts_atom_t *at) |
| Set mat values at a given index from a list of values. | |
Variables | |
| FTS_API fts_class_t * | mat_class |
| The mat class identifier (pointer to class instance). | |
Copy values (and dimensions) of one mat to another.
| orig | original mat | |
| copy | copy mat |
| FTS_API int mat_delete_columns | ( | mat_t * | mat, | |
| int | pos, | |||
| int | num | |||
| ) |
Delete given number of columns starting from given position.
| mat | the mat | |
| pos | start position | |
| num | number of columns to be deleted |
| FTS_API int mat_delete_rows | ( | mat_t * | mat, | |
| int | pos, | |||
| int | num | |||
| ) |
Delete given number of rows starting from given position.
| mat | the mat | |
| pos | start position | |
| num | number of rows to be deleted |
| fts_atom_t* mat_get_element | ( | mat_t * | mat, | |
| int | i, | |||
| int | j | |||
| ) |
Get mat value at given index (row and column).
| mat | the mat | |
| i | row index | |
| j | column index |
| int mat_get_m | ( | mat_t * | mat | ) |
Get number of rows of an mat.
| mat | the mat |
| int mat_get_n | ( | mat_t * | mat | ) |
Get number of columns of an mat.
| mat | the mat |
| fts_atom_t* mat_get_row | ( | mat_t * | mat, | |
| int | i | |||
| ) |
Get pointer to values corresponing to a given row of a mat.
| mat | the mat | |
| i | row index |
| FTS_API fts_schema_t* mat_get_schema | ( | mat_t * | self, | |
| int | dim | |||
| ) |
Get row or column schema of mat.
| dim | get row schema if dim == 1, column schema if dim == 2 |
| FTS_API int mat_insert_columns_nogrow | ( | mat_t * | mat, | |
| int | pos, | |||
| int | num | |||
| ) |
Insert columns at given position of a mat.
| mat | the mat | |
| pos | insert position | |
| num | number fs columns to insert |
| FTS_API int mat_insert_rows_nogrow | ( | mat_t * | mat, | |
| int | pos, | |||
| int | num | |||
| ) |
Insert rows at given position of a mat.
| mat | the mat | |
| pos | insert position | |
| num | number of rows to insert |
| float* mat_lock | ( | mat_t * | mat | ) |
Get a thread-safe shared pointer to the raw float data vector of an mat.
This function puts a shared lock (read lock) on the mat. The mat has be unlocked by a call to mat_unlock().
| mat | the mat |
| FTS_API void mat_set_const | ( | mat_t * | mat, | |
| const fts_atom_t * | atom | |||
| ) |
Set all mat values to a given constant.
| mat | the mat | |
| atom | the const value |
| FTS_API void mat_set_element | ( | mat_t * | mat, | |
| int | i, | |||
| int | j, | |||
| const fts_atom_t * | atom | |||
| ) |
Set mat value at given index (row and column).
| mat | the mat | |
| i | row index | |
| j | column index | |
| atom | new value |
| FTS_API void mat_set_from_atoms | ( | mat_t * | mat, | |
| int | onset, | |||
| int | step, | |||
| int | ac, | |||
| const fts_atom_t * | at | |||
| ) |
Set mat values at a given index from a list of values.
| mat | the mat | |
| onset | the onset | |
| step | stride | |
| ac | arguments count | |
| at | arguments |
| FTS_API void mat_set_schema | ( | mat_t * | self, | |
| int | dim, | |||
| fts_schema_t * | schema | |||
| ) |
Set row or column schema of mat.
| schema | pointer to schema | |
| dim | set row schema if dim == 1, column schema if dim == 2 |
| FTS_API int mat_set_size_nogrow | ( | mat_t * | mat, | |
| int | m, | |||
| int | n | |||
| ) |
Set dimensions (number of row and columns) of a mat.
| mat | the mat | |
| m | new rows count | |
| n | new columns count |
| void mat_unlock | ( | mat_t * | mat | ) |
Unlock an mat after a previous lock.
This function has to be calles after a call to mat_lock().
| mat | the mat |
1.5.6