CMR  1.3.0
Functions
regularity.c File Reference
#include "env_internal.h"
#include "regularity_internal.h"
#include <time.h>

Functions

CMR_ERROR CMRregularityTaskCreateRoot (CMR *cmr, CMR_MATROID_DEC *dec, DecompositionTask **ptask, CMR_REGULAR_PARAMS *params, CMR_REGULAR_STATS *stats, clock_t startClock, double timeLimit)
 Creates a decomposition task for the root of the decomposition. More...
 
CMR_ERROR CMRregularityTaskFree (CMR *cmr, DecompositionTask **ptask)
 Frees a decomposition task. More...
 
CMR_ERROR CMRregularityQueueCreate (CMR *cmr, DecompositionQueue **pqueue)
 Initializes a decomposition queue. More...
 
CMR_ERROR CMRregularityQueueFree (CMR *cmr, DecompositionQueue **pqueue)
 Frees the decomposition queue. More...
 
bool CMRregularityQueueEmpty (DecompositionQueue *queue)
 Returns whether a queue is empty. More...
 
DecompositionTaskCMRregularityQueueRemove (DecompositionQueue *queue)
 Removes a task from a decomposition queue. More...
 
void CMRregularityQueueAdd (DecompositionQueue *queue, DecompositionTask *task)
 Adds a task to a decomposition queue. More...
 
static CMR_ERROR CMRregularityTaskRun (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Runs a task for processing the associated decomposition node. More...
 
CMR_ERROR CMRregularityTest (CMR *cmr, CMR_CHRMAT *matrix, bool ternary, bool *pisRegular, CMR_MATROID_DEC **pdec, CMR_MINOR **pminor, CMR_REGULAR_PARAMS *params, CMR_REGULAR_STATS *stats, double timeLimit)
 Tests ternary or binary linear matroid for regularity. More...
 
CMR_ERROR CMRregularityCompleteDecomposition (CMR *cmr, CMR_MATROID_DEC *subtree, CMR_REGULAR_PARAMS *params, CMR_REGULAR_STATS *stats, double timeLimit)
 Replaces the subtree of a matroid decomposition tree by a new one. More...
 

Function Documentation

◆ CMRregularityCompleteDecomposition()

CMR_ERROR CMRregularityCompleteDecomposition ( CMR cmr,
CMR_MATROID_DEC subtree,
CMR_REGULAR_PARAMS params,
CMR_REGULAR_STATS stats,
double  timeLimit 
)

Replaces the subtree of a matroid decomposition tree by a new one.

Parameters
cmrCMR environment.
subtreeDecomposition node of the subtree root.
paramsParameters for the computation.
statsStatistics for the computation (may be NULL).
timeLimitTime limit to impose.

◆ CMRregularityQueueAdd()

void CMRregularityQueueAdd ( DecompositionQueue queue,
DecompositionTask task 
)

Adds a task to a decomposition queue.

Parameters
queueQueue.
taskTask.

◆ CMRregularityQueueCreate()

CMR_ERROR CMRregularityQueueCreate ( CMR cmr,
DecompositionQueue **  pqueue 
)

Initializes a decomposition queue.

Parameters
cmrCMR environment.
pqueuePointer for storing the queue.

◆ CMRregularityQueueEmpty()

bool CMRregularityQueueEmpty ( DecompositionQueue queue)

Returns whether a queue is empty.

Parameters
queueQueue.

◆ CMRregularityQueueFree()

CMR_ERROR CMRregularityQueueFree ( CMR cmr,
DecompositionQueue **  pqueue 
)

Frees the decomposition queue.

Parameters
cmrCMR environment.
pqueuePointer to queue.

◆ CMRregularityQueueRemove()

DecompositionTask* CMRregularityQueueRemove ( DecompositionQueue queue)

Removes a task from a decomposition queue.

Parameters
queueQueue.

◆ CMRregularityTaskCreateRoot()

CMR_ERROR CMRregularityTaskCreateRoot ( CMR cmr,
CMR_MATROID_DEC dec,
DecompositionTask **  ptask,
CMR_REGULAR_PARAMS params,
CMR_REGULAR_STATS stats,
clock_t  startClock,
double  timeLimit 
)

Creates a decomposition task for the root of the decomposition.

Parameters
cmrCMR environment.
decDecomposition node.
ptaskPointer for storing the new task.
paramsParameters for the computation.
statsStatistics for the computation (may be NULL).
startClockClock for the start time.
timeLimitTime limit to impose.

◆ CMRregularityTaskFree()

CMR_ERROR CMRregularityTaskFree ( CMR cmr,
DecompositionTask **  ptask 
)

Frees a decomposition task.

Parameters
cmrCMR environment.
ptaskPointer to task.

◆ CMRregularityTaskRun()

static CMR_ERROR CMRregularityTaskRun ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)
static

Runs a task for processing the associated decomposition node.

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

◆ CMRregularityTest()

CMR_ERROR CMRregularityTest ( CMR cmr,
CMR_CHRMAT matrix,
bool  ternary,
bool *  pisRegular,
CMR_MATROID_DEC **  pdec,
CMR_MINOR **  pminor,
CMR_REGULAR_PARAMS params,
CMR_REGULAR_STATS stats,
double  timeLimit 
)

Tests ternary or binary linear matroid for regularity.

If pdec is not NULL, *pdec will be a (partial) decomposition tree.

If pminor is not NULL and matrix is not regular, then an \( F_7 \) or \( F_7^\star \) minor or a submatrix with non-ternary determinant is searched. This causes additional computational effort!

Parameters
cmrCMR environment.
matrixInput matrix.
ternaryWhether the matrix shall be considered ternary.
pisRegularPointer for storing whether matrix is regular.
pdecPointer for storing the decomposition tree (may be NULL).
pminorPointer for storing an \( F_7 \) or \( F_7^\star \) minor.
paramsParameters for the computation.
statsStatistics for the computation (may be NULL).
timeLimitTime limit to impose.