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 "seymour_internal.h"

Classes

struct  GraphNode
 

Enumerations

enum  ElementType {
  ELEMENT_TYPE_NONE , ELEMENT_TYPE_1 , ELEMENT_TYPE_2 , ELEMENT_TYPE_3 ,
  ELEMENT_TYPE_NORMAL , 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_1 

Row/column is a source/target of type 1.

ELEMENT_TYPE_2 

Row/column is a source/target of type 2.

ELEMENT_TYPE_3 

Row/column is a source/target of type 3.

ELEMENT_TYPE_NORMAL 

Row/column belongs to the submatrix.

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.