CMR  1.3.0
Classes | Functions
one_sum.h File Reference
#include <cmr/env.h>
#include "matrix_internal.h"

Go to the source code of this file.

Classes

struct  CMR_ONESUM_COMPONENT
 Information on component of 1-sum of matrices. More...
 

Functions

CMR_ERROR decomposeOneSum (CMR *cmr, CMR_MATRIX *matrix, size_t matrixType, size_t targetType, size_t *pnumComponents, CMR_ONESUM_COMPONENT **components, size_t *rowsToComponents, size_t *columnsToComponents, size_t *rowsToComponentRows, size_t *columnsToComponentColumns)
 Decomposes int matrix into 1-connected submatrices. More...
 

Function Documentation

◆ decomposeOneSum()

CMR_ERROR decomposeOneSum ( CMR cmr,
CMR_MATRIX matrix,
size_t  matrixType,
size_t  targetType,
size_t *  pnumComponents,
CMR_ONESUM_COMPONENT **  components,
size_t *  rowsToComponents,
size_t *  columnsToComponents,
size_t *  rowsToComponentRows,
size_t *  columnsToComponentColumns 
)

Decomposes int matrix into 1-connected submatrices.

Allocates an array components with an entry per 1-connected submatrix. The caller has to free this array and its members.

Parameters
cmrCMR environment
matrixMatrix
matrixTypeSize of base type of matrix.
targetTypeSize of base type of component matrices.
pnumComponentsPointer for storing the number of components.
componentsPointer for storing the array with component information.
rowsToComponentsMapping of rows of matrix to components (may be NULL).
columnsToComponentsMapping of columns of matrix to components (may be NULL).
rowsToComponentRowsMapping of rows to rows of the component (may be NULL).
columnsToComponentColumnsMapping of columns to columns of the component (may be NULL).