8 #ifndef SCAMAC_SPARSEMAT_H 9 #define SCAMAC_SPARSEMAT_H 15 typedef struct scamac_sparsemat_st ScamacMatrix;
20 ScamacErrorCode
scamac_sparsemat_alloc(ScamacInt nr, ScamacInt nc, ScamacInt ne, ScamacValType valtype, ScamacMatrix ** sm);
26 ScamacInt scamac_sparsemat_query_nr(
const ScamacMatrix * sm);
27 ScamacInt scamac_sparsemat_query_nc(
const ScamacMatrix * sm);
28 ScamacValType scamac_sparsemat_query_valtype(
const ScamacMatrix * sm);
ScamacErrorCode scamac_sparsemat_alloc(ScamacInt nr, ScamacInt nc, ScamacInt ne, ScamacValType valtype, ScamacMatrix **sm)
Allocate sparse matrix.
ScamacErrorCode scamac_sparsemat_from_generator(const ScamacGenerator *gen, ScamacMatrix **sm)
Obtain sparse matrix from ScaMaC generator.
bool scamac_sparsemat_check(const ScamacMatrix *sm)
basic sanity check for sparse matrix
generic ScaMaC generator routines
ScamacErrorCode scamac_sparsemat_free(ScamacMatrix *sm)
Free allocated sparse matrix.
ScamacErrorCode scamac_sparsemat_to_dense(const ScamacMatrix *sm, void **dm)
convert sparse matrix to dense matrix
struct scamac_generator_st ScamacGenerator
Abstract generator object.
Definition: scamac_generator.h:24