Macros | |
#define | mirml_vector_copy_complete(src, dst) mirml_vector_copy(src, 0, 0, dst, 0) |
Copy complete vector. | |
#define | mirml_matrix_copy_complete(src, dst) mirml_matrix_copy(src, 0, 0, 0, 0, dst, 0, 0) |
Copy complete matrix. | |
Functions | |
mirkl_error_t * | mirml_vector_alloc (mirml_vector_t **vec, int dtype, unsigned int flags, mirkl_size_t size) |
Creates a vector. More... | |
mirkl_error_t * | mirml_vector_realloc (mirml_vector_t **vec, int dtype, unsigned int flags, mirkl_size_t new_size) |
Reallocates vector. More... | |
mirkl_error_t * | mirml_vector_copy (const mirml_vector_t *src, mirkl_size_t i_src, mirkl_size_t size_src, mirml_vector_t **dst, mirkl_size_t i_dst) |
Copy vector. More... | |
mirkl_error_t * | mirml_matrix_alloc (mirml_matrix_t **mat, int dtype, unsigned int flags, mirkl_size_t rows, mirkl_size_t cols) |
Creates a matrix. More... | |
mirkl_error_t * | mirml_matrix_realloc (mirml_matrix_t **mat, int dtype, unsigned int flags, mirkl_size_t new_rows, mirkl_size_t new_cols) |
Reallocates matrix. More... | |
mirkl_error_t * | mirml_matrix_copy (const mirml_matrix_t *src, mirkl_size_t i_src, mirkl_size_t j_src, mirkl_size_t rows_src, mirkl_size_t cols_src, mirml_matrix_t **dst, mirkl_size_t i_dst, mirkl_size_t j_dst) |
Copy matrix. More... | |
Functions to free objects. | |
void | mirml_vector_free (mirml_vector_t *vec) |
void | mirml_matrix_free (mirml_matrix_t *mat) |
Macros that set pointers to NULL. | |
#define | MIRML_VECTOR_FREE(vec) (mirml_vector_free(vec), (vec)=NULL) |
#define | MIRML_MATRIX_FREE(mat) (mirml_matrix_free(mat), (mat)=NULL) |
mirkl_error_t * mirml_matrix_alloc | ( | mirml_matrix_t ** | mat, |
int | dtype, | ||
unsigned int | flags, | ||
mirkl_size_t | rows, | ||
mirkl_size_t | cols | ||
) |
Creates a matrix.
[out] | mat | Pointer to the matrix structure. |
[in] | dtype | Data type, one of MIRML_DTYPE_... |
[in] | flags | MIRML_DTYPEF_... |
[in] | rows | Number of rows in the matrix. Can be also zero. |
[in] | cols | Number of columns in the matrix. Can be also zero. |
mirkl_error_t * mirml_matrix_copy | ( | const mirml_matrix_t * | src, |
mirkl_size_t | i_src, | ||
mirkl_size_t | j_src, | ||
mirkl_size_t | rows_src, | ||
mirkl_size_t | cols_src, | ||
mirml_matrix_t ** | dst, | ||
mirkl_size_t | i_dst, | ||
mirkl_size_t | j_dst | ||
) |
Copy matrix.
[in] | src | Source matrix. |
[in] | i_src | First row in the source matrix to copy. |
[in] | j_src | First column in the source matrix to copy. |
[in] | rows_src | Number of rows in the source matrix to copy. If zero, then all rows are copied starting from i_src. |
[in] | cols_src | Number of columns in the source matrix to copy. If zero, then all columns are copied starting from j_src. |
[out] | dst | Destination matrix. If NULL, then a new matrix is created. |
[in] | i_dst | First row in the destination matrix, to which the first row from the source matrix will be copied. |
[in] | j_dst | First column in the destination matrix, to which the first column from the source matrix will be copied. |
mirkl_error_t * mirml_matrix_realloc | ( | mirml_matrix_t ** | mat, |
int | dtype, | ||
unsigned int | flags, | ||
mirkl_size_t | new_rows, | ||
mirkl_size_t | new_cols | ||
) |
Reallocates matrix.
[in,out] | mat | Pointer to the pointer of the matrix structure. If the pointer is NULL, then a new matrix is allocated. |
[in] | dtype | Data type, one of MIRML_DTYPE_... May be 0 if the matrix was already allocated before. |
[in] | flags | MIRML_DTYPEF_... |
[in] | new_rows | New number of rows in the matrix. |
[in] | new_cols | New number of columns in the matrix. |
mirkl_error_t * mirml_vector_alloc | ( | mirml_vector_t ** | vec, |
int | dtype, | ||
unsigned int | flags, | ||
mirkl_size_t | size | ||
) |
Creates a vector.
[out] | vec | Pointer to the pointerr of the vector structure. |
[in] | dtype | Data type, one of MIRML_DTYPE_... |
[in] | flags | MIRML_DTYPEF_... |
[in] | size | Number of elements in the vector. Can be also zero. |
mirkl_error_t * mirml_vector_copy | ( | const mirml_vector_t * | src, |
mirkl_size_t | i_src, | ||
mirkl_size_t | size_src, | ||
mirml_vector_t ** | dst, | ||
mirkl_size_t | i_dst | ||
) |
Copy vector.
[in] | src | Source vector. |
[in] | i_src | First element in the source vector to copy. |
[in] | size_src | Number of elements in the source vector to copy. If zero, then all elements are copied starting from i_src. |
[out] | dst | Destination vector. If NULL, then a new vector is created. |
[in] | i_dst | First element in the destination vector, to which the first element from the source vector will be copied. |
mirkl_error_t * mirml_vector_realloc | ( | mirml_vector_t ** | vec, |
int | dtype, | ||
unsigned int | flags, | ||
mirkl_size_t | new_size | ||
) |
Reallocates vector.
[in,out] | vec | Pointer to the pointer of the vector structure. If the pointer is NULL, then a new vector is allocated. |
[in] | dtype | Data type, one of MIRML_DTYPE_... May be 0 if the vector was already allocated before. |
[in] | flags | MIRML_DTYPEF_... |
[in] | new_size | New number of elements in the vector. |