1 #ifndef CMR_MATROID_DEC_INTERNAL_H
2 #define CMR_MATROID_DEC_INTERNAL_H
117 bool printParentElements,
120 bool printReductions,
222 size_t numChildBaseRows,
223 size_t numChildBaseColumns,
242 size_t numChildBaseRows,
243 size_t numChildBaseColumns,
262 size_t numChildBaseRows,
263 size_t numChildBaseColumns,
281 size_t numChildBaseRows,
282 size_t numChildBaseColumns,
int CMR_ELEMENT
Definition: element.h:20
CMR_ERROR
Type for return codes of library functions.
Definition: env.h:32
int CMR_GRAPH_EDGE
Reference to an edge of CMR_GRAPH.
Definition: graph.h:31
CMR_MATROID_DEC_TYPE
Definition: matroid.h:160
CMR_MATROID_DEC_THREESUM_FLAG
Flags that indicate the type of -separation.
Definition: matroid.h:212
Functionality for matroids.
CMR_ERROR CMRmatroiddecSetNumChildren(CMR *cmr, CMR_MATROID_DEC *dec, size_t numChildren)
Sets the number of children and allocates memory accordingly.
Definition: matroid.c:1166
char * CMRmatroiddecConsistency(CMR_MATROID_DEC *dec, bool recurse)
Checks a matroid decomposition node for consistency.
CMR_EXPORT CMR_ERROR CMRmatroiddecPrintChild(CMR *cmr, CMR_MATROID_DEC *child, CMR_MATROID_DEC *parent, size_t childIndex, FILE *stream, size_t indent, bool printChildren, bool printParentElements, bool printMatrices, bool printGraphs, bool printReductions, bool printPivots)
Prints the decomposition child to stream.
Definition: matroid.c:598
CMR_ERROR CMRmatroiddecUpdateOneSum(CMR *cmr, CMR_MATROID_DEC *dec, size_t numChildren)
Initialize an existing unknown decomposition node as a 1-sum with numChildren children.
Definition: matroid.c:1230
CMR_ERROR CMRmatroiddecUpdateSubmatrix(CMR *cmr, CMR_MATROID_DEC *dec, CMR_SUBMAT *submatrix, CMR_MATROID_DEC_TYPE type)
Initialize an existing unknown decomposition node as a submatrix node whose child is of given type.
Definition: matroid.c:1272
CMR_ERROR CMRmatroiddecUpdateThreeSumCreateMixedSecondChild(CMR *cmr, CMR_MATROID_DEC *dec, CMR_SEPA *separation, size_t *rowsToChild, size_t *columnsToChild, size_t numChildBaseRows, size_t numChildBaseColumns, size_t extraColumn1, size_t extraColumn2, int8_t extraEntry)
Creates mixed second child of an initialized 3-sum node.
Definition: matroid.c:1859
CMR_ERROR CMRmatroiddecUpdateThreeSumInit(CMR *cmr, CMR_MATROID_DEC *dec)
Initialize an existing unknown decomposition node as a 3-sum node.
Definition: matroid.c:1424
CMR_ERROR CMRmatroiddecUpdateThreeSumCreateMixedFirstChild(CMR *cmr, CMR_MATROID_DEC *dec, CMR_SEPA *separation, size_t *rowsToChild, size_t *columnsToChild, size_t numChildBaseRows, size_t numChildBaseColumns, size_t extraRow1, size_t extraRow2, int8_t extraEntry)
Creates mixed first child of an initialized 3-sum node.
Definition: matroid.c:1725
CMR_ERROR CMRmatroiddecCreateChildFromMatrices(CMR *cmr, CMR_MATROID_DEC *parent, size_t childIndex, CMR_CHRMAT *matrix, CMR_CHRMAT *transpose, CMR_ELEMENT *rowsToParent, CMR_ELEMENT *columnsToParent)
Creates a decomposition node as a child.
Definition: matroid.c:1187
CMR_ERROR CMRmatroiddecSetAttributes(CMR_MATROID_DEC *dec)
Set regularity and (co)graphicness attributes of a decomposition tree.
Definition: matroid.c:2018
CMR_ERROR CMRmatroiddecUpdatePivots(CMR *cmr, CMR_MATROID_DEC *dec, size_t numPivots, size_t *pivotRows, size_t *pivotColumns, CMR_CHRMAT *matrix, CMR_CHRMAT *transpose)
Initialize an existing unknown decomposition node as a pivot node according to the given arrays of pi...
Definition: matroid.c:1388
CMR_ERROR CMRmatroiddecUpdateThreeSumCreateWideSecondChild(CMR *cmr, CMR_MATROID_DEC *dec, CMR_SEPA *separation, size_t *rowsToChild, size_t *columnsToChild, size_t numChildBaseRows, size_t numChildBaseColumns, size_t extraRow, size_t extraColumn1, size_t extraColumn2, int8_t extraEntry)
Creates wide second child of an initialized 3-sum node.
Definition: matroid.c:1578
CMR_ERROR CMRmatroiddecUpdateThreeSumCreateWideFirstChild(CMR *cmr, CMR_MATROID_DEC *dec, CMR_SEPA *separation, size_t *rowsToChild, size_t *columnsToChild, size_t numChildBaseRows, size_t numChildBaseColumns, size_t extraRow, size_t extraColumn1, size_t extraColumn2, int8_t extraEntry)
Creates wide first child of an initialized 3-sum node.
Definition: matroid.c:1435
CMR_ERROR CMRmatroiddecUpdateTwoSum(CMR *cmr, CMR_MATROID_DEC *dec, CMR_SEPA *separation)
Initialize an existing unknown decomposition node as a 2-separation node according to the given separ...
Definition: matroid.c:1305
Recognition of series-parallel matrices.
Row-wise representation of sparse char matrix.
Definition: matrix.h:204
Definition: env_internal.h:45
Definition: separation.h:52
Represents a series-parallel reduction.
Definition: series_parallel.h:61
Row and column indices for a submatrix.
Definition: matrix.h:28
Dense matrix.
Definition: densematrix.h:17
Definition: matroid_internal.h:16
CMR_GRAPH_EDGE * cographForest
Array with edges of spanning forest of cograph.
Definition: matroid_internal.h:53
size_t nestedMinorsLastCographic
Last minor in sequence of nested minors that is cographic.
Definition: matroid_internal.h:86
struct _CMR_MATROID_DEC ** children
Array of child nodes.
Definition: matroid_internal.h:33
size_t * rowsToChild
Array for mapping each row to a row of the child (if applicable).
Definition: matroid_internal.h:40
size_t * nestedMinorsSequenceNumRows
Number of rows of sequence of nested minors.
Definition: matroid_internal.h:74
CMR_ELEMENT * denseRowsOriginal
Maps rows of denseMatrix to elements of matrix.
Definition: matroid_internal.h:67
CMR_ELEMENT * nestedMinorsRowsOriginal
Maps rows of nestedMinorsMatrix to elements of matrix.
Definition: matroid_internal.h:80
bool testedR10
Matrix does not represent unless type indicates this.
Definition: matroid_internal.h:27
CMR_MATROID_DEC_THREESUM_FLAG threesumFlags
Type of 3-sum.
Definition: matroid_internal.h:29
CMR_MATROID_DEC_TYPE type
Type of this node.
Definition: matroid_internal.h:18
size_t numRows
Length of rowsParent.
Definition: matroid_internal.h:39
size_t * nestedMinorsColumnsDense
Maps columns of nested minor sequence to columns of dense.
Definition: matroid_internal.h:70
CMR_GRAPH * cograph
Graph represented by the transpose of this matrix.
Definition: matroid_internal.h:52
CMR_CHRMAT * nestedMinorsTranspose
Transpose of nestedMinorsMatrix.
Definition: matroid_internal.h:79
CMR_GRAPH_EDGE * graphCoforest
Array with edges of coforest of graph.
Definition: matroid_internal.h:49
bool testedTwoConnected
Indicates that no 1-separation exists.
Definition: matroid_internal.h:20
int8_t graphicness
Matrix is (not) graphic/network if positive (negative), or not determined if zero.
Definition: matroid_internal.h:23
DenseBinaryMatrix * denseMatrix
Dense support matrix for nested minors search. Rows and columns are not permuted, but pivots are appl...
Definition: matroid_internal.h:65
size_t used
Reference counter.
Definition: matroid_internal.h:17
CMR_SP_REDUCTION * seriesParallelReductions
Array of series-parallel reductions.
Definition: matroid_internal.h:58
CMR_ELEMENT * denseColumnsOriginal
Maps columns of denseMatrix to elements of matrix.
Definition: matroid_internal.h:68
size_t numSeriesParallelReductions
Length of reductions.
Definition: matroid_internal.h:59
int8_t regularity
Matrix is (not) regular/totally unimodularity if positive (negative), or not determined if zero.
Definition: matroid_internal.h:21
size_t * nestedMinorsSequenceNumColumns
Number of columns of sequence of nested minors.
Definition: matroid_internal.h:75
CMR_GRAPH_EDGE * cographCoforest
Array with edges of coforest of cograph.
Definition: matroid_internal.h:54
CMR_CHRMAT * matrix
Matrix representing this node.
Definition: matroid_internal.h:30
CMR_GRAPH * graph
Graph represented by this matrix.
Definition: matroid_internal.h:47
bool isTernary
Indicates whether this node belongs to a ternary matrix.
Definition: matroid_internal.h:19
size_t numPivots
Number of pivots.
Definition: matroid_internal.h:63
size_t numColumns
Length of columnsParent.
Definition: matroid_internal.h:43
size_t * columnsToChild
Array for mapping each column to a column of the child (if applicable).
Definition: matroid_internal.h:44
bool testedSeriesParallel
Already searched for series-parallel reductions.
Definition: matroid_internal.h:57
CMR_CHRMAT * transpose
Tranpose of matrix representing this node.
Definition: matroid_internal.h:31
size_t * pivotColumns
Columns of pivots.
Definition: matroid_internal.h:62
int8_t cographicness
Matrix is (not) cographic/conetwork if positive (negative), or not determined if zero.
Definition: matroid_internal.h:25
CMR_GRAPH_EDGE * graphForest
Array with edges of spanning forest of graph.
Definition: matroid_internal.h:48
size_t * pivotRows
Rows of pivots.
Definition: matroid_internal.h:61
bool * graphArcsReversed
Array indicating which arcs of the graph are reversed.
Definition: matroid_internal.h:50
size_t nestedMinorsLength
Length of sequence of nested minors.
Definition: matroid_internal.h:73
size_t numChildren
Number of child nodes.
Definition: matroid_internal.h:32
CMR_ELEMENT ** childColumnsToParent
Array for mapping a child index to array of child columns to elements of this node.
Definition: matroid_internal.h:36
CMR_CHRMAT * nestedMinorsMatrix
Sparse support matrix that displays the sequence of nested minors. Rows and columns are permuted acco...
Definition: matroid_internal.h:77
size_t * nestedMinorsRowsDense
Maps rows of nested minor sequence to rows of dense.
Definition: matroid_internal.h:69
size_t nestedMinorsLastGraphic
Last minor in sequence of nested minors that is graphic.
Definition: matroid_internal.h:85
CMR_ELEMENT * nestedMinorsColumnsOriginal
Maps columns of nestedMinorsDense to elements of matrix.
Definition: matroid_internal.h:82
CMR_ELEMENT ** childRowsToParent
Array for mapping a child index to array of child rows to elements of this node.
Definition: matroid_internal.h:34
bool * cographArcsReversed
Array indicating which arcs of the cograph are reversed.
Definition: matroid_internal.h:55