File numerics/src/tools/NM_conversions.h

Go to the source code of this file

Conversion related functions for the various matrix storages in Numerics.

Functions

CSparseMatrix *NM_csc_to_csr(CSparseMatrix *csc)

Convert from csc to csr.

Return

the matrix in csr format

Parameters
  • csc: the matrix to convert

CSparseMatrix *NM_csc_to_half_triplet(CSparseMatrix *csc)

Convert from csc to half triplet for symmetric matrices.

Return

the matrix in triplet format

Parameters
  • csc: the matrix to convert

CSparseMatrix *NM_csc_to_triplet(CSparseMatrix *csc)

Convert from csc to triplet (aka coo)

Return

the matrix in triplet format

Parameters
  • csc: the matrix to convert

CSparseMatrix *NM_csr_to_csc(CSparseMatrix *csr)

Convert from csr to csc.

Return

the matrix in csc format

Parameters
  • csr: the matrix to convert

CSparseMatrix *NM_csr_to_triplet(CSparseMatrix *csr)

Convert from csr to triplet (aka coo)

Return

the matrix in triplet format

Parameters
  • csr: the matrix to convert

CSparseMatrix *NM_triplet_to_csr(CSparseMatrix *triplet)

Convert from triplet (aka coo) to csr.

Return

the matrix in csr format

Parameters
  • triplet: the matrix to convert