Next: , Previous: Sparse Matrices Finding Maximum and Minimum Elements, Up: Sparse Matrices   [Index]


41.11 Compressed Format

GSL supports compressed column storage (CCS) and compressed row storage (CRS) formats.

Function: gsl_spmatrix * gsl_spmatrix_ccs (const gsl_spmatrix * T)

This function creates a sparse matrix in compressed column format from the input sparse matrix T which must be in triplet format. A pointer to a newly allocated matrix is returned. The calling function should free the newly allocated matrix when it is no longer needed.

Function: gsl_spmatrix * gsl_spmatrix_crs (const gsl_spmatrix * T)

This function creates a sparse matrix in compressed row format from the input sparse matrix T which must be in triplet format. A pointer to a newly allocated matrix is returned. The calling function should free the newly allocated matrix when it is no longer needed.