Tizen Native API
|
Functions | |
Eina_Matrixsparse * | eina_matrixsparse_new (unsigned long rows, unsigned long cols, void(*free_func)(void *user_data, void *cell_data), const void *user_data) |
Creates a new Sparse Matrix. | |
void | eina_matrixsparse_free (Eina_Matrixsparse *m) |
Frees resources allocated to the Sparse Matrix. | |
void | eina_matrixsparse_size_get (const Eina_Matrixsparse *m, unsigned long *rows, unsigned long *cols) |
Gets the current size of the Sparse Matrix. | |
Eina_Bool | eina_matrixsparse_size_set (Eina_Matrixsparse *m, unsigned long rows, unsigned long cols) |
Resizes the Sparse Matrix. | |
Eina_Bool | eina_matrixsparse_cell_idx_get (const Eina_Matrixsparse *m, unsigned long row, unsigned long col, Eina_Matrixsparse_Cell **cell) |
Gets the cell reference inside the Sparse Matrix. | |
void * | eina_matrixsparse_cell_data_get (const Eina_Matrixsparse_Cell *cell) |
Gets the data associated to the given cell reference. | |
void * | eina_matrixsparse_data_idx_get (const Eina_Matrixsparse *m, unsigned long row, unsigned long col) |
Gets the data associated to the given cell given that its indexes are provided. | |
Eina_Bool | eina_matrixsparse_cell_position_get (const Eina_Matrixsparse_Cell *cell, unsigned long *row, unsigned long *col) |
Gets the position (indexes) of the given cell. | |
Eina_Bool | eina_matrixsparse_cell_data_replace (Eina_Matrixsparse_Cell *cell, const void *data, void **p_old) |
Changes the cell reference value without freeing a possible existing old value. | |
Eina_Bool | eina_matrixsparse_cell_data_set (Eina_Matrixsparse_Cell *cell, const void *data) |
Changes the cell value by freeing a possible existing old value. | |
Eina_Bool | eina_matrixsparse_data_idx_replace (Eina_Matrixsparse *m, unsigned long row, unsigned long col, const void *data, void **p_old) |
Changes the cell value without freeing a possible existing old value, using indexes. | |
Eina_Bool | eina_matrixsparse_data_idx_set (Eina_Matrixsparse *m, unsigned long row, unsigned long col, const void *data) |
Changes the cell value by freeing a possible existing old value, using indexes. | |
Eina_Bool | eina_matrixsparse_row_idx_clear (Eina_Matrixsparse *m, unsigned long row) |
Clears (erases) all the cells of the row given that its index is provided. | |
Eina_Bool | eina_matrixsparse_column_idx_clear (Eina_Matrixsparse *m, unsigned long col) |
Clears (erases) all the cells of the column given that its index is provided. | |
Eina_Bool | eina_matrixsparse_cell_idx_clear (Eina_Matrixsparse *m, unsigned long row, unsigned long col) |
Clears (erases) a cell given that its indexes are provided. | |
Eina_Bool | eina_matrixsparse_cell_clear (Eina_Matrixsparse_Cell *cell) |
Clears (erases) a cell given that its referenceis provided. | |
Eina_Iterator * | eina_matrixsparse_iterator_new (const Eina_Matrixsparse *m) |
Creates a new iterator over existing matrix cells. | |
Eina_Iterator * | eina_matrixsparse_iterator_complete_new (const Eina_Matrixsparse *m) |
Creates a new iterator over all the matrix cells. | |
Typedefs | |
typedef struct _Eina_Matrixsparse | Eina_Matrixsparse |
The structure type for a generic sparse matrix. | |
typedef struct _Eina_Matrixsparse_Row | Eina_Matrixsparse_Row |
The structure type for a generic sparse matrix row, opaque for users. | |
typedef struct _Eina_Matrixsparse_Cell | Eina_Matrixsparse_Cell |
The structure type for a generic sparse matrix cell, opaque for users. |
This group discusses the functions to provide matrix sparse management.
Clears (erases) a cell given that its referenceis provided.
[in] | cell | The cell reference, must not be NULL |
EINA_TRUE
on success, otherwise EINA_FALSE
on failure void* eina_matrixsparse_cell_data_get | ( | const Eina_Matrixsparse_Cell * | cell | ) |
Gets the data associated to the given cell reference.
[in] | cell | The given cell reference, must not be NULL |
Eina_Bool eina_matrixsparse_cell_data_replace | ( | Eina_Matrixsparse_Cell * | cell, |
const void * | data, | ||
void ** | p_old | ||
) |
Changes the cell reference value without freeing a possible existing old value.
[in] | cell | The cell reference, must not be NULL |
[in] | data | The new data to set |
[out] | p_old | The old value that is intact (not freed) |
EINA_TRUE
on success, otherwise EINA_FALSE
(cell is NULL
)Eina_Bool eina_matrixsparse_cell_data_set | ( | Eina_Matrixsparse_Cell * | cell, |
const void * | data | ||
) |
Changes the cell value by freeing a possible existing old value.
free_func()
on the existing value.[in] | cell | The cell reference, must not be NULL |
[in] | data | The new data to set |
EINA_TRUE
on success, otherwise EINA_FALSE
(cell is NULL
).Eina_Bool eina_matrixsparse_cell_idx_clear | ( | Eina_Matrixsparse * | m, |
unsigned long | row, | ||
unsigned long | col | ||
) |
Clears (erases) a cell given that its indexes are provided.
free_func()
given to eina_matrixsparse_new().[in] | m | The sparse matrix to operate on |
[in] | row | The new row number to clear |
[in] | col | The new column number to clear |
EINA_TRUE
on success, otherwise EINA_FALSE
on failure Eina_Bool eina_matrixsparse_cell_idx_get | ( | const Eina_Matrixsparse * | m, |
unsigned long | row, | ||
unsigned long | col, | ||
Eina_Matrixsparse_Cell ** | cell | ||
) |
Gets the cell reference inside the Sparse Matrix.
[in] | m | The sparse matrix to operate on |
[in] | row | The new row number to clear |
[in] | col | The new column number to clear |
[out] | cell | A pointer to return the cell reference, if it exists |
1
on success, otherwise 0
on failure *cell
== NULLEina_Bool eina_matrixsparse_cell_position_get | ( | const Eina_Matrixsparse_Cell * | cell, |
unsigned long * | row, | ||
unsigned long * | col | ||
) |
Gets the position (indexes) of the given cell.
[in] | cell | The cell reference, must not be NULL |
[out] | row | The location to store the cell row number, may be NULL |
[out] | col | The location to store the column number, may be NULL |
EINA_TRUE
on success, otherwise EINA_FALSE
(cell
is NULL
) Eina_Bool eina_matrixsparse_column_idx_clear | ( | Eina_Matrixsparse * | m, |
unsigned long | col | ||
) |
Clears (erases) all the cells of the column given that its index is provided.
free_func()
given to eina_matrixsparse_new().[in] | m | The sparse matrix to operate on |
[in] | col | The new column number to clear |
EINA_TRUE
on success, otherwise EINA_FALSE
on failure void* eina_matrixsparse_data_idx_get | ( | const Eina_Matrixsparse * | m, |
unsigned long | row, | ||
unsigned long | col | ||
) |
Gets the data associated to the given cell given that its indexes are provided.
[in] | m | The sparse matrix to operate on |
[in] | row | The new row number to clear |
[in] | col | The new column number to clear |
NULL
if nothing is associatedEina_Bool eina_matrixsparse_data_idx_replace | ( | Eina_Matrixsparse * | m, |
unsigned long | row, | ||
unsigned long | col, | ||
const void * | data, | ||
void ** | p_old | ||
) |
Changes the cell value without freeing a possible existing old value, using indexes.
[in] | m | The sparse matrix, must not be NULL |
[in] | row | The row number to set the value of |
[in] | col | The column number to set the value of |
[in] | data | The new data to set |
[out] | p_old | The old value that is intact (not freed) |
EINA_TRUE
on success, otherwise EINA_FALSE
(m is NULL
, indexes are not valid)Eina_Bool eina_matrixsparse_data_idx_set | ( | Eina_Matrixsparse * | m, |
unsigned long | row, | ||
unsigned long | col, | ||
const void * | data | ||
) |
Changes the cell value by freeing a possible existing old value, using indexes.
free_func()
on the existing value.[in] | m | The sparse matrix, must not be NULL |
[in] | row | The row number to set the value of |
[in] | col | The column number to set the value of |
[in] | data | The new data to set |
EINA_TRUE
on success, otherwise EINA_FALSE
(m is NULL
, indexes are not valid)void eina_matrixsparse_free | ( | Eina_Matrixsparse * | m | ) |
Frees resources allocated to the Sparse Matrix.
[in] | m | The Sparse Matrix instance to free, must not be NULL |
Creates a new iterator over all the matrix cells.
[in] | m | The Sparse Matrix reference, must not be NULL |
Eina_Iterator* eina_matrixsparse_iterator_new | ( | const Eina_Matrixsparse * | m | ) |
Creates a new iterator over existing matrix cells.
[in] | m | The Sparse Matrix reference, must not be NULL |
Eina_Matrixsparse* eina_matrixsparse_new | ( | unsigned long | rows, |
unsigned long | cols, | ||
void(*)(void *user_data, void *cell_data) | free_func, | ||
const void * | user_data | ||
) |
Creates a new Sparse Matrix.
[in] | rows | The number of rows in the matrix Operations with rows greater than this value fail. |
[in] | cols | The number of columns in the matrix Operations with columns greater than this value fail. |
[in] | free_func | The function used to delete cell data contents, used by eina_matrixsparse_free(), eina_matrixsparse_size_set(), eina_matrixsparse_row_idx_clear(), eina_matrixsparse_column_idx_clear(), eina_matrixsparse_cell_idx_clear(), and other possible functions. |
[in] | user_data | The data given to free_func as the first parameter |
NULL
if allocation fails and eina_error is set Eina_Bool eina_matrixsparse_row_idx_clear | ( | Eina_Matrixsparse * | m, |
unsigned long | row | ||
) |
Clears (erases) all the cells of the row given that its index is provided.
free_func()
given to eina_matrixsparse_new().[in] | m | The sparse matrix to operate on |
[in] | row | The new row number to clear |
EINA_TRUE
on success, otherwise EINA_FALSE
on failure void eina_matrixsparse_size_get | ( | const Eina_Matrixsparse * | m, |
unsigned long * | rows, | ||
unsigned long * | cols | ||
) |
Gets the current size of the Sparse Matrix.
NULL
, even if this function fails (ie: m is not a valid matrix instance).[in] | m | The sparse matrix to operate on |
[out] | rows | The number of rows, may be NULL If m is invalid the returned value is zero, otherwise it's a positive integer. |
[out] | cols | The number of columns, may be NULL If m is invalid the returned value is zero, otherwise it's a positive integer. |
Eina_Bool eina_matrixsparse_size_set | ( | Eina_Matrixsparse * | m, |
unsigned long | rows, | ||
unsigned long | cols | ||
) |
Resizes the Sparse Matrix.
This resizes the sparse matrix, possibly freeing cells of rows and columns that cease to exist.
[in] | m | The sparse matrix to operate on |
[in] | rows | The new number of rows, must be greater than zero |
[in] | cols | The new number of columns, must be greater than zero |
EINA_TRUE
on success, otherwise EINA_FALSE
on failure