CMR  1.3.0
Classes | Enumerations | Functions
regularity_threesum.c File Reference
#include <cmr/regular.h>
#include <assert.h>
#include <stdlib.h>
#include "env_internal.h"
#include "matroid_internal.h"
#include "regularity_internal.h"

Classes

struct  GraphNode
 

Enumerations

enum  ElementType {
  ELEMENT_TYPE_NONE , ELEMENT_TYPE_NORMAL , ELEMENT_TYPE_SOURCE , ELEMENT_TYPE_TARGET ,
  REMOVED = 0 , ZERO = 1 , BLOCK = 2 , OTHER = 3
}
 

Functions

static CMR_ERROR findSubmatrixCycle (CMR *cmr, CMR_CHRMAT *matrix, CMR_CHRMAT *transpose, ElementType *rowTypes, ElementType *columnTypes, CMR_ELEMENT *ppathSource, CMR_ELEMENT *ppathTarget, int *pentrySum)
 Finds a shortest path from any source to any target element. More...
 
CMR_ERROR CMRregularityDecomposeThreeSum (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue, CMR_SEPA *separation)
 Applies a 3-sum decomposition. More...
 

Enumeration Type Documentation

◆ ElementType

Enumerator
ELEMENT_TYPE_NONE 

Row/column does not belong to the submatrix.

ELEMENT_TYPE_NORMAL 

Row/column belongs to the submatrix.

ELEMENT_TYPE_SOURCE 

Row/column is a source.

ELEMENT_TYPE_TARGET 

Row/column is a target.

REMOVED 
ZERO 
BLOCK 
OTHER 

Function Documentation

◆ CMRregularityDecomposeThreeSum()

CMR_ERROR CMRregularityDecomposeThreeSum ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue,
CMR_SEPA separation 
)

Applies a 3-sum decomposition.

Parameters
cmrCMR environment.
taskTask to be processed; already removed from the list of unprocessed tasks.
queueQueue of unprocessed nodes.
separation3-separation.

◆ findSubmatrixCycle()

static CMR_ERROR findSubmatrixCycle ( CMR cmr,
CMR_CHRMAT matrix,
CMR_CHRMAT transpose,
ElementType rowTypes,
ElementType columnTypes,
CMR_ELEMENT ppathSource,
CMR_ELEMENT ppathTarget,
int *  pentrySum 
)
static

Finds a shortest path from any source to any target element.

Parameters
cmrCMR environment.
matrixMatrix.
transposeTranspose of matrix.
rowTypesArray with rows' types.
columnTypesArray with columns' types.
ppathSourcePointer for storing the source row/column.
ppathTargetPointer for storing the target row/column.
pentrySumPointer for storing the sum of the path's entries.