# Modulo-2 Matrix Sparse/Dense Conversion

The routines below convert modulo-2 matrices between the form used by the routines for dense modulo-2 matrices and the form used by the routines for sparse modulo-2 matrices.

Header files required: `mod2sparse.h mod2dense.h mod2convert.h`

mod2sparse_to_dense: Convert a modulo-2 matrix from sparse to dense form.

>     void mod2sparse_to_dense
>     ( mod2sparse *m,  /* Sparse matrix to convert */
>       mod2dense *r    /* Place to store result */
>     )

The dense matrix, r, must already have been allocated, and must have at least as many rows and columns as m, the sparse matrix to be converted.

mod2dense_to_sparse: Convert a modulo-2 matrix from dense to sparse form.

>     void mod2dense_to_sparse
>     ( mod2dense *m,  /* Dense matrix to convert */
>       mod2sparse *r  /* Place to store result */
>     )

The sparse matrix, r, must already have been allocated, and must have at least as many rows and columns as m, the dense matrix to be converted.

Back to index for LDPC software