CMR  1.3.0
Classes | Typedefs | Functions
regularity_internal.h File Reference
#include <time.h>
#include <cmr/regular.h>
#include "matroid_internal.h"

Go to the source code of this file.

Classes

struct  DecompositionTask
 
struct  DecompositionQueue
 

Typedefs

typedef struct DecompositionTask DecompositionTask
 
typedef struct DecompositionQueue DecompositionQueue
 

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...
 
CMR_ERROR CMRregularityDecomposeThreeSum (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue, CMR_SEPA *separation)
 Applies a 3-sum decomposition. More...
 
CMR_ERROR CMRregularityNestedMinorSequenceSearchThreeSeparation (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Searches for 3-separations along the sequence of nested minors and decomposes as a 3-sum. More...
 
CMR_ERROR CMRregularityNestedMinorSequenceGraphicness (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Tests each minor of the sequence of nested 3-connected minors for graphicness. More...
 
CMR_ERROR CMRregularityNestedMinorSequenceCographicness (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Tests each minor of the sequence of nested 3-connected minors for graphicness. More...
 
CMR_ERROR CMRregularityExtendNestedMinorSequence (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Extends an incomplete sequence of nested 3-connected minors for the matrix of a decomposition node. More...
 
CMR_ERROR CMRregularityTestR10 (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Tests matrix for representing \( R_{10} \). More...
 
CMR_ERROR CMRregularityInitNestedMinorSequence (CMR *cmr, DecompositionTask *task, CMR_SUBMAT *wheelSubmatrix)
 Initializes a sequence of nested minors with one minor, for a given wheelSubmatrix. More...
 
CMR_ERROR CMRregularityDecomposeSeriesParallel (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Splits off series-parallel elements from the matrix of the decomposition node. More...
 
CMR_ERROR CMRregularityTestGraphicness (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Tests matrix for graphicness/network and stores it in dec. More...
 
CMR_ERROR CMRregularityTestCographicness (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Tests matrix for cographicness/conetwork and stores it in dec. More...
 
CMR_ERROR CMRregularitySearchOneSum (CMR *cmr, DecompositionTask *task, DecompositionQueue *queue)
 Performs a 1-sum decomposition of matrix and stores it in dec. 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...
 

Typedef Documentation

◆ DecompositionQueue

◆ DecompositionTask

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.

◆ CMRregularityDecomposeSeriesParallel()

CMR_ERROR CMRregularityDecomposeSeriesParallel ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Splits off series-parallel elements from the matrix of the decomposition node.

In case the matrix is Series-Parallel Matroids, then the node is declared to be planar.

In case the matrix does not admit series-parallel reductions, then the node remains remain unchanged. Otherwise, a child node is created whose matrix is the series-parallel-reduced one. For that child node, a 2-separation may be found, and corresponding children will be created.

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

◆ 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.

◆ CMRregularityExtendNestedMinorSequence()

CMR_ERROR CMRregularityExtendNestedMinorSequence ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Extends an incomplete sequence of nested 3-connected minors for the matrix of a decomposition node.

In case the matrix is not 3-connected, a 2-separation is applied to dec and the function terminates, filling the relevant variables of dec.

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

◆ CMRregularityInitNestedMinorSequence()

CMR_ERROR CMRregularityInitNestedMinorSequence ( CMR cmr,
DecompositionTask task,
CMR_SUBMAT wheelSubmatrix 
)

Initializes a sequence of nested minors with one minor, for a given wheelSubmatrix.

Parameters
cmrCMR environment.
taskTask to be processed; already removed from the list of unprocessed tasks.
wheelSubmatrixWheel submatrix of task->dec.

◆ CMRregularityNestedMinorSequenceCographicness()

CMR_ERROR CMRregularityNestedMinorSequenceCographicness ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Tests each minor of the sequence of nested 3-connected minors for graphicness.

Sets task->dec->CMRregularityNestedMinorSequenceCographicness accordingly.

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

◆ CMRregularityNestedMinorSequenceGraphicness()

CMR_ERROR CMRregularityNestedMinorSequenceGraphicness ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Tests each minor of the sequence of nested 3-connected minors for graphicness.

Sets task->dec->CMRregularityNestedMinorSequenceGraphicness accordingly.

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

◆ CMRregularityNestedMinorSequenceSearchThreeSeparation()

CMR_ERROR CMRregularityNestedMinorSequenceSearchThreeSeparation ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Searches for 3-separations along the sequence of nested minors and decomposes as a 3-sum.

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

◆ 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.

◆ CMRregularitySearchOneSum()

CMR_ERROR CMRregularitySearchOneSum ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Performs a 1-sum decomposition of matrix and stores it in dec.

If matrix is 1-connected, then dec remains unchanged. Otherwise, dec will become a CMR_MATROID_DEC_TYPE_ONE_SUM node with children that are initialized to the 1-connected components. In this case, the matrix and transpose members of the child nodes are set.

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

◆ 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.

◆ 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.

◆ CMRregularityTestCographicness()

CMR_ERROR CMRregularityTestCographicness ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Tests matrix for cographicness/conetwork and stores it in dec.

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

◆ CMRregularityTestGraphicness()

CMR_ERROR CMRregularityTestGraphicness ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Tests matrix for graphicness/network and stores it in dec.

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

◆ CMRregularityTestR10()

CMR_ERROR CMRregularityTestR10 ( CMR cmr,
DecompositionTask task,
DecompositionQueue queue 
)

Tests matrix for representing \( R_{10} \).

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