8 #ifndef SCAMAC_SPARSEROW_H 9 #define SCAMAC_SPARSEROW_H 25 scamac_idxreal_st *row;
26 } scamac_sparserow_real_st;
36 scamac_idxcplx_st *row;
37 } scamac_sparserow_cplx_st;
42 ScamacErrorCode scamac_sparserow_real_alloc(ScamacIdx n, scamac_sparserow_real_st ** srow);
43 ScamacErrorCode scamac_sparserow_cplx_alloc(ScamacIdx n, scamac_sparserow_cplx_st ** srow);
45 ScamacErrorCode scamac_sparserow_real_free(scamac_sparserow_real_st *row);
46 ScamacErrorCode scamac_sparserow_cplx_free(scamac_sparserow_cplx_st *row);
48 ScamacErrorCode scamac_sparserow_real_zero(scamac_sparserow_real_st *row);
49 ScamacErrorCode scamac_sparserow_cplx_zero(scamac_sparserow_cplx_st *row);
52 ScamacErrorCode scamac_sparserow_real_add(scamac_sparserow_real_st *row,
double alpha, ScamacIdx idx);
53 ScamacErrorCode scamac_sparserow_cplx_add(scamac_sparserow_cplx_st *row,
double complex alpha, ScamacIdx idx);
56 ScamacErrorCode scamac_sparserow_real_normalize(scamac_sparserow_real_st *row,
bool keep_zeros);
57 ScamacErrorCode scamac_sparserow_cplx_normalize(scamac_sparserow_cplx_st *row,
bool keep_zeros);
60 ScamacErrorCode scamac_sparserow_real_to_idxval(scamac_sparserow_real_st *row, ScamacIdx maxrowlength, ScamacIdx * nz, ScamacIdx *idx,
double *val);
61 ScamacErrorCode scamac_sparserow_cplx_to_idxval(scamac_sparserow_cplx_st *row, ScamacIdx maxrowlength, ScamacIdx * nz, ScamacIdx *idx,
double complex *val);
65 ScamacErrorCode scamac_sparserow_real_to_idxval_int(scamac_sparserow_real_st *row, ScamacIdx maxrowlength,
int * nz,
int *idx,
double *val);
66 ScamacErrorCode scamac_sparserow_cplx_to_idxval_int(scamac_sparserow_cplx_st *row, ScamacIdx maxrowlength,
int * nz,
int *idx,
double complex *val);
ScaMaC index/integer types.
ScaMaC data structure and macro definitions.