CMR  1.3.0
Classes | Typedefs | Functions
block_decomposition.c File Reference
#include "block_decomposition.h"
#include <assert.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
#include "env_internal.h"

Classes

struct  GraphNode
 

Typedefs

typedef struct GraphNode GRAPH_NODE
 

Functions

CMR_ERROR CMRdecomposeBlocks (CMR *cmr, CMR_MATRIX *matrix, size_t matrixType, size_t targetType, size_t *pnumBlocks, CMR_BLOCK **pblocks, size_t *rowsToBlock, size_t *columnsToBlock, size_t *rowsToBlockRows, size_t *columnsToBlockColumns)
 Decomposes int matrix into 1-connected submatrices. More...
 

Typedef Documentation

◆ GRAPH_NODE

typedef struct GraphNode GRAPH_NODE

Function Documentation

◆ CMRdecomposeBlocks()

CMR_ERROR CMRdecomposeBlocks ( CMR cmr,
CMR_MATRIX matrix,
size_t  matrixType,
size_t  targetType,
size_t *  pnumBlocks,
CMR_BLOCK **  pblocks,
size_t *  rowsToBlock,
size_t *  columnsToBlock,
size_t *  rowsToBlockRows,
size_t *  columnsToBlockColumns 
)

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.
pnumBlocksPointer for storing the number of components.
pblocksPointer for storing the array with component information.
rowsToBlockMapping of rows of matrix to components (may be NULL).
columnsToBlockMapping of columns of matrix to components (may be NULL).
rowsToBlockRowsMapping of rows to rows of the component (may be NULL).
columnsToBlockColumnsMapping of columns to columns of the component (may be NULL).