CMR
1.3.0
|
Classes | |
struct | CMR_MINOR |
A minor of a matroid. More... | |
Typedefs | |
typedef struct _CMR_MATROID_DEC | CMR_MATROID_DEC |
Functions | |
CMR_EXPORT CMR_ERROR | CMRchrmatBinaryPivot (CMR *cmr, CMR_CHRMAT *matrix, size_t pivotRow, size_t pivotColumn, CMR_CHRMAT **presult) |
Applie a pivot to matrix and returns the resulting matrix in *presult . More... | |
CMR_EXPORT CMR_ERROR | CMRchrmatTernaryPivot (CMR *cmr, CMR_CHRMAT *matrix, size_t pivotRow, size_t pivotColumn, CMR_CHRMAT **presult) |
Applies a sequence of pivots to matrix and returns the resulting matrix in *presult . More... | |
CMR_EXPORT CMR_ERROR | CMRchrmatBinaryPivots (CMR *cmr, CMR_CHRMAT *matrix, size_t numPivots, size_t *pivotRows, size_t *pivotColumns, CMR_CHRMAT **presult) |
Applies a sequence of pivots to matrix and returns the resulting matrix in *presult . More... | |
CMR_EXPORT CMR_ERROR | CMRchrmatTernaryPivots (CMR *cmr, CMR_CHRMAT *matrix, size_t numPivots, size_t *pivotRows, size_t *pivotColumns, CMR_CHRMAT **presult) |
Applies a sequence of pivots to matrix and returns the resulting matrix in *presult . More... | |
CMR_EXPORT CMR_ERROR | CMRminorCreate (CMR *cmr, CMR_MINOR **pminor, size_t numPivots, CMR_SUBMAT *submatrix) |
Creates a minor, allocating space for numPivots pivots and a remaining submatrix . More... | |
CMR_EXPORT CMR_ERROR | CMRminorFree (CMR *cmr, CMR_MINOR **pminor) |
Frees the minor *pminor (if pminor is not NULL ). More... | |
CMR_EXPORT CMR_ERROR | CMRminorPrint (CMR *cmr, CMR_MINOR *minor, size_t numRows, size_t numColumns, FILE *stream) |
Writes the minor minor to the file \fileName by means of lists of row and column indices as well as pivot entries. More... | |
CMR_EXPORT CMR_ERROR | CMRminorWriteToFile (CMR *cmr, CMR_MINOR *minor, size_t numRows, size_t numColumns, const char *fileName) |
Writes the minor minor to the file \fileName by means of lists of row and column indices as well as pivot entries. More... | |
CMR_EXPORT bool | CMRmatroiddecIsTernary (CMR_MATROID_DEC *dec) |
Returns true iff the decomposition is over \( \mathbb{F}_3 \). More... | |
CMR_EXPORT bool | CMRmatroiddecThreeSumDistributedRanks (CMR_MATROID_DEC *dec) |
Returns true iff the 3-sum decomposition node has \( 3 \)-separation with two rank-1 matrices. More... | |
CMR_EXPORT bool | CMRmatroiddecThreeSumConcentratedRank (CMR_MATROID_DEC *dec) |
Returns true iff the 3-sum decomposition node has \( 3 \)-separation with one rank-2 matrix. More... | |
CMR_EXPORT bool | CMRmatroiddecHasTranspose (CMR_MATROID_DEC *dec) |
Returns true iff the transposed matrix of the decomposition node dec is stored. More... | |
CMR_EXPORT CMR_CHRMAT * | CMRmatroiddecGetMatrix (CMR_MATROID_DEC *dec) |
Returns the matrix of the decomposition node dec (or NULL if it is not stored). More... | |
CMR_EXPORT CMR_CHRMAT * | CMRmatroiddecGetTranspose (CMR_MATROID_DEC *dec) |
Returns the transposed matrix of the decomposition node dec (or NULL if it is not stored). More... | |
CMR_EXPORT size_t | CMRmatroiddecNumChildren (CMR_MATROID_DEC *dec) |
Returns the number of children of the decomposition node dec . More... | |
CMR_EXPORT CMR_MATROID_DEC * | CMRmatroiddecChild (CMR_MATROID_DEC *dec, size_t childIndex) |
Returns a child of the decomposition node dec . More... | |
CMR_EXPORT CMR_MATROID_DEC_TYPE | CMRmatroiddecType (CMR_MATROID_DEC *dec) |
Returns the type of a decomposition node dec . More... | |
CMR_EXPORT int8_t | CMRmatroiddecGraphicness (CMR_MATROID_DEC *dec) |
Indicates graphicness/being network. More... | |
CMR_EXPORT int8_t | CMRmatroiddecCographicness (CMR_MATROID_DEC *dec) |
Indicates cographicness/being conetwork. More... | |
CMR_EXPORT int8_t | CMRmatroiddecRegularity (CMR_MATROID_DEC *dec) |
Indicates regularity/total unimodularity. More... | |
CMR_EXPORT size_t | CMRmatroiddecNumRows (CMR_MATROID_DEC *dec) |
Returns the number of rows. More... | |
CMR_EXPORT size_t | CMRmatroiddecNumColumns (CMR_MATROID_DEC *dec) |
Returns the number of columns. More... | |
CMR_EXPORT CMR_ELEMENT * | CMRmatroiddecChildRowsToParent (CMR_MATROID_DEC *dec, size_t childIndex) |
Returns the mapping of rows of child childIndex to this node's elements. More... | |
CMR_EXPORT CMR_ELEMENT * | CMRmatroiddecChildColumnsToParent (CMR_MATROID_DEC *dec, size_t childIndex) |
Returns the mapping of columns of child childIndex to this node's elements. More... | |
CMR_EXPORT CMR_GRAPH * | CMRmatroiddecGraph (CMR_MATROID_DEC *dec) |
Returns the graph (if available). More... | |
CMR_EXPORT CMR_GRAPH_EDGE * | CMRmatroiddecGraphForest (CMR_MATROID_DEC *dec) |
Returns the forest of the graph (if available). More... | |
CMR_EXPORT size_t | CMRmatroiddecGraphSizeForest (CMR_MATROID_DEC *dec) |
Returns the number of edges of the graph's forest (if available). More... | |
CMR_EXPORT CMR_GRAPH_EDGE * | CMRmatroiddecGraphCoforest (CMR_MATROID_DEC *dec) |
Returns the coforest of the graph (if available). More... | |
CMR_EXPORT size_t | CMRmatroiddecGraphSizeCoforest (CMR_MATROID_DEC *dec) |
Returns the number of edges of the graph's coforest (if available). More... | |
CMR_EXPORT bool * | CMRmatroiddecGraphArcsReversed (CMR_MATROID_DEC *dec) |
Returns an array that indicates for the graph's edges whether they must be reversed (if available). More... | |
CMR_EXPORT CMR_GRAPH * | CMRmatroiddecCograph (CMR_MATROID_DEC *dec) |
Returns the cograph (if available). More... | |
CMR_EXPORT size_t | CMRmatroiddecCographSizeForest (CMR_MATROID_DEC *dec) |
Returns the number of edges of the cograph's forest (if available). More... | |
CMR_EXPORT CMR_GRAPH_EDGE * | CMRmatroiddecCographForest (CMR_MATROID_DEC *dec) |
Returns the forest of the cograph (if available). More... | |
CMR_EXPORT size_t | CMRmatroiddecCographSizeCoforest (CMR_MATROID_DEC *dec) |
Returns the number of edges of the cograph's coforest (if available). More... | |
CMR_EXPORT CMR_GRAPH_EDGE * | CMRmatroiddecCographCoforest (CMR_MATROID_DEC *dec) |
Returns the coforest of the cograph (if available). More... | |
CMR_EXPORT bool * | CMRmatroiddecCographArcsReversed (CMR_MATROID_DEC *dec) |
Returns an array that indicates for the cograph's edges whether they must be reversed (if available). More... | |
CMR_EXPORT size_t | CMRmatroiddecNumPivots (CMR_MATROID_DEC *dec) |
Returns the number of pivots (if available). More... | |
CMR_EXPORT size_t * | CMRmatroiddecPivotRows (CMR_MATROID_DEC *dec) |
Returns the array with the pivot rows (if available). More... | |
CMR_EXPORT size_t * | CMRmatroiddecPivotColumns (CMR_MATROID_DEC *dec) |
Returns the array with the pivot columns (if available). More... | |
CMR_EXPORT CMR_ERROR | CMRmatroiddecPrint (CMR *cmr, CMR_MATROID_DEC *dec, FILE *stream, bool printChildren, bool printParentElements, bool printMatrices, bool printGraphs, bool printReductions, bool printPivots) |
Prints the decomposition dec to stream . More... | |
CMR_EXPORT CMR_ERROR | CMRmatroiddecCloneUnknown (CMR *cmr, CMR_MATROID_DEC *dec, CMR_MATROID_DEC **pclone) |
Clones a decomposition node dec into *pclone which represents the same matrix but has type CMR_MATROID_DEC_TYPE_UNKNOWN type. More... | |
CMR_EXPORT CMR_ERROR | CMRmatroiddecCapture (CMR *cmr, CMR_MATROID_DEC *dec) |
Increases the reference counter by 1. More... | |
CMR_EXPORT CMR_ERROR | CMRmatroiddecRelease (CMR *cmr, CMR_MATROID_DEC **pdec) |
Releases a decomposition node, freeing it if this was the last reference. More... | |
typedef struct _CMR_MATROID_DEC CMR_MATROID_DEC |
Flags that indicate the type of \( 3 \)-separation.
Enumerator | |
---|---|
CMR_MATROID_DEC_THREESUM_FLAG_NO_PIVOTS | Indicate to not change the rank distribution; only serves as an option; each constructed node will have either CMR_MATROID_DEC_THREESUM_FLAG_DISTRIBUTED_RANKS or CMR_MATROID_DEC_THREESUM_FLAG_CONCENTRATED_RANK set. |
CMR_MATROID_DEC_THREESUM_FLAG_DISTRIBUTED_RANKS | The two off-diagonal submatrices both have rank 1.
|
CMR_MATROID_DEC_THREESUM_FLAG_CONCENTRATED_RANK | The bottom-left submatrix has rank 2 and the top-right submatrix has rank 0.
|
CMR_MATROID_DEC_THREESUM_FLAG_FIRST_WIDE | The first child node is of the form \( M_1^{\text{wide}} \); valid for distributed ranks.
|
CMR_MATROID_DEC_THREESUM_FLAG_FIRST_TALL | The first child node is of the form \( M_1^{\text{tall}} \); valid for distributed ranks.
|
CMR_MATROID_DEC_THREESUM_FLAG_FIRST_MIXED | The first child node is of the form \( M_1^{\text{mixed}} \); valid for concentrated rank.
|
CMR_MATROID_DEC_THREESUM_FLAG_FIRST_ALLREPR | The first child node is of the form \( M_1^{\text{all-repr}} \); valid for concentrated rank.
|
CMR_MATROID_DEC_THREESUM_FLAG_SECOND_WIDE | The second child node is of the form \( M_2^{\text{wide}} \); valid for distributed ranks.
|
CMR_MATROID_DEC_THREESUM_FLAG_SECOND_TALL | The second child node is of the form \( M_2^{\text{tall}} \); valid for distributed ranks.
|
CMR_MATROID_DEC_THREESUM_FLAG_SECOND_MIXED | The second child node is of the form \( M_2^{\text{mixed}} \); valid for concentrated rank.
|
CMR_MATROID_DEC_THREESUM_FLAG_SECOND_ALLREPR | The second child node is of the form \( M_2^{\text{all-repr}} \); valid for concentrated rank.
|
CMR_MATROID_DEC_THREESUM_FLAG_SEYMOUR | This combination of flags indicates a \( 3 \)-sum as defined by Seymour.
|
CMR_MATROID_DEC_THREESUM_FLAG_TRUEMPER | This combination of flags indicates a \( 3 \)-sum as defined by Truemper.
|
enum CMR_MATROID_DEC_TYPE |
Enumerator | |
---|---|
CMR_MATROID_DEC_TYPE_IRREGULAR | Node represents 3-connected irregular minor.
|
CMR_MATROID_DEC_TYPE_UNKNOWN | Type of node is not yet determined. |
CMR_MATROID_DEC_TYPE_ONE_SUM | Node represents a \( 1 \)-sum of matrices with an arbitrary number of child nodes.
|
CMR_MATROID_DEC_TYPE_TWO_SUM | Node represents a 2-sum of matrices; has two child nodes.
|
CMR_MATROID_DEC_TYPE_THREE_SUM | Node represents a 3-sum of matrices; has two child nodes.
|
CMR_MATROID_DEC_TYPE_SERIES_PARALLEL | Node represents a series-parallel reduction; one child node.
|
CMR_MATROID_DEC_TYPE_PIVOTS | Node represents an application of pivots; one child node.
|
CMR_MATROID_DEC_TYPE_SUBMATRIX | Node represents the consideration of a submatrix; one child node.
|
CMR_MATROID_DEC_TYPE_GRAPH | Node represents a graphic leaf minor; one optional child node for non-cographic minor.
|
CMR_MATROID_DEC_TYPE_COGRAPH | Node represents a cographic leaf minor; one optional child node for non-graphic minor.
|
CMR_MATROID_DEC_TYPE_PLANAR | Node represents a planar (graphic and cographic) leaf minor; no child nodes.
|
CMR_MATROID_DEC_TYPE_R10 | Node represents a representation matrix of \( R_{10} \).
|
CMR_MATROID_DEC_TYPE_FANO | Node represents a representation matrix of \( F_7 \).
|
CMR_MATROID_DEC_TYPE_FANO_DUAL | Node represents a representation matrix of \( F_7^\star \).
|
CMR_MATROID_DEC_TYPE_K5 | Node represents a representation matrix of \( M(K_5) \).
|
CMR_MATROID_DEC_TYPE_K5_DUAL | Node represents a representation matrix of \( M(K_5)^\star \).
|
CMR_MATROID_DEC_TYPE_K33 | Node represents a representation matrix of \( M(K_{3,3}) \).
|
CMR_MATROID_DEC_TYPE_K33_DUAL | Node represents a representation matrix of \( M(K_{3,3})^\star \).
|
CMR_MATROID_DEC_TYPE_DETERMINANT | Node represents a square matrix \( M \) with \( |\det(M)| = 2 \).
|
CMR_EXPORT CMR_ERROR CMRchrmatBinaryPivot | ( | CMR * | cmr, |
CMR_CHRMAT * | matrix, | ||
size_t | pivotRow, | ||
size_t | pivotColumn, | ||
CMR_CHRMAT ** | presult | ||
) |
Applie a pivot to matrix
and returns the resulting matrix in *presult
.
Calculations are done over the binary field.
cmr | CMR environment. |
matrix | Matrix to work with. |
pivotRow | Row of the pivot. |
pivotColumn | Column of the pivot. |
presult | Pointer for storing the resulting matrix. |
CMR_EXPORT CMR_ERROR CMRchrmatBinaryPivots | ( | CMR * | cmr, |
CMR_CHRMAT * | matrix, | ||
size_t | numPivots, | ||
size_t * | pivotRows, | ||
size_t * | pivotColumns, | ||
CMR_CHRMAT ** | presult | ||
) |
Applies a sequence of pivots to matrix
and returns the resulting matrix in *presult
.
Calculations are done over the binary field.
cmr | CMR environment. |
matrix | Matrix to work with. |
numPivots | Number of pivots to carry out. |
pivotRows | Array with rows of the pivots. |
pivotColumns | Array with columns of the pivots. |
presult | Pointer for storing the resulting matrix. |
CMR_EXPORT CMR_ERROR CMRchrmatTernaryPivot | ( | CMR * | cmr, |
CMR_CHRMAT * | matrix, | ||
size_t | pivotRow, | ||
size_t | pivotColumn, | ||
CMR_CHRMAT ** | presult | ||
) |
Applies a sequence of pivots to matrix
and returns the resulting matrix in *presult
.
Calculations are done over the ternary field.
cmr | CMR environment. |
matrix | Matrix to work with. |
pivotRow | Row of the pivot. |
pivotColumn | Column of the pivot. |
presult | Pointer for storing the resulting matrix. |
CMR_EXPORT CMR_ERROR CMRchrmatTernaryPivots | ( | CMR * | cmr, |
CMR_CHRMAT * | matrix, | ||
size_t | numPivots, | ||
size_t * | pivotRows, | ||
size_t * | pivotColumns, | ||
CMR_CHRMAT ** | presult | ||
) |
Applies a sequence of pivots to matrix
and returns the resulting matrix in *presult
.
Calculations are done over the ternary field.
cmr | CMR environment. |
matrix | Matrix to work with. |
numPivots | Number of pivots to carry out. |
pivotRows | Array with rows of the pivots. |
pivotColumns | Array with columns of the pivots. |
presult | Pointer for storing the resulting matrix. |
CMR_EXPORT CMR_ERROR CMRmatroiddecCapture | ( | CMR * | cmr, |
CMR_MATROID_DEC * | dec | ||
) |
Increases the reference counter by 1.
cmr | CMR environment. |
dec | Pointer to the decomposition node. |
CMR_EXPORT CMR_MATROID_DEC* CMRmatroiddecChild | ( | CMR_MATROID_DEC * | dec, |
size_t | childIndex | ||
) |
Returns a child of the decomposition node dec
.
dec | Decomposition node. |
childIndex | Index of child. |
CMR_EXPORT CMR_ELEMENT* CMRmatroiddecChildColumnsToParent | ( | CMR_MATROID_DEC * | dec, |
size_t | childIndex | ||
) |
Returns the mapping of columns of child childIndex
to this node's elements.
dec | Decomposition node. |
childIndex | Index of child to consider. |
CMR_EXPORT CMR_ELEMENT* CMRmatroiddecChildRowsToParent | ( | CMR_MATROID_DEC * | dec, |
size_t | childIndex | ||
) |
Returns the mapping of rows of child childIndex
to this node's elements.
dec | Decomposition node. |
childIndex | Index of child to consider. |
CMR_EXPORT CMR_ERROR CMRmatroiddecCloneUnknown | ( | CMR * | cmr, |
CMR_MATROID_DEC * | dec, | ||
CMR_MATROID_DEC ** | pclone | ||
) |
Clones a decomposition node dec
into *pclone
which represents the same matrix but has type CMR_MATROID_DEC_TYPE_UNKNOWN type.
cmr | CMR environment. |
dec | The decomposition node. |
pclone | Pointer for storing the clone. |
CMR_EXPORT CMR_GRAPH* CMRmatroiddecCograph | ( | CMR_MATROID_DEC * | dec | ) |
Returns the cograph (if available).
dec | Decomposition node. |
CMR_EXPORT bool* CMRmatroiddecCographArcsReversed | ( | CMR_MATROID_DEC * | dec | ) |
Returns an array that indicates for the cograph's edges whether they must be reversed (if available).
dec | Decomposition node. |
CMR_EXPORT CMR_GRAPH_EDGE* CMRmatroiddecCographCoforest | ( | CMR_MATROID_DEC * | dec | ) |
Returns the coforest of the cograph (if available).
dec | Decomposition node. |
CMR_EXPORT CMR_GRAPH_EDGE* CMRmatroiddecCographForest | ( | CMR_MATROID_DEC * | dec | ) |
Returns the forest of the cograph (if available).
dec | Decomposition node. |
CMR_EXPORT int8_t CMRmatroiddecCographicness | ( | CMR_MATROID_DEC * | dec | ) |
Indicates cographicness/being conetwork.
Returns a positive value if the matrix corresponding to dec
is cographic/conetwork, zero if it is not known and a negative value otherwise.
dec | Decomposition node. |
CMR_EXPORT size_t CMRmatroiddecCographSizeCoforest | ( | CMR_MATROID_DEC * | dec | ) |
Returns the number of edges of the cograph's coforest (if available).
dec | Decomposition node. |
CMR_EXPORT size_t CMRmatroiddecCographSizeForest | ( | CMR_MATROID_DEC * | dec | ) |
Returns the number of edges of the cograph's forest (if available).
dec | Decomposition node. |
CMR_EXPORT CMR_CHRMAT* CMRmatroiddecGetMatrix | ( | CMR_MATROID_DEC * | dec | ) |
Returns the matrix of the decomposition node dec
(or NULL
if it is not stored).
dec | Decomposition node. |
CMR_EXPORT CMR_CHRMAT* CMRmatroiddecGetTranspose | ( | CMR_MATROID_DEC * | dec | ) |
Returns the transposed matrix of the decomposition node dec
(or NULL
if it is not stored).
dec | Decomposition node. |
CMR_EXPORT CMR_GRAPH* CMRmatroiddecGraph | ( | CMR_MATROID_DEC * | dec | ) |
Returns the graph (if available).
dec | Decomposition node. |
CMR_EXPORT bool* CMRmatroiddecGraphArcsReversed | ( | CMR_MATROID_DEC * | dec | ) |
Returns an array that indicates for the graph's edges whether they must be reversed (if available).
dec | Decomposition node. |
CMR_EXPORT CMR_GRAPH_EDGE* CMRmatroiddecGraphCoforest | ( | CMR_MATROID_DEC * | dec | ) |
Returns the coforest of the graph (if available).
dec | Decomposition node. |
CMR_EXPORT CMR_GRAPH_EDGE* CMRmatroiddecGraphForest | ( | CMR_MATROID_DEC * | dec | ) |
Returns the forest of the graph (if available).
dec | Decomposition node. |
CMR_EXPORT int8_t CMRmatroiddecGraphicness | ( | CMR_MATROID_DEC * | dec | ) |
Indicates graphicness/being network.
Returns a positive value if the matrix corresponding to dec
is graphic/network, zero if it is not known and a negative value otherwise.
dec | Decomposition node. |
CMR_EXPORT size_t CMRmatroiddecGraphSizeCoforest | ( | CMR_MATROID_DEC * | dec | ) |
Returns the number of edges of the graph's coforest (if available).
dec | Decomposition node. |
CMR_EXPORT size_t CMRmatroiddecGraphSizeForest | ( | CMR_MATROID_DEC * | dec | ) |
Returns the number of edges of the graph's forest (if available).
dec | Decomposition node. |
CMR_EXPORT bool CMRmatroiddecHasTranspose | ( | CMR_MATROID_DEC * | dec | ) |
Returns true
iff the transposed matrix of the decomposition node dec
is stored.
dec | Decomposition node. |
CMR_EXPORT bool CMRmatroiddecIsTernary | ( | CMR_MATROID_DEC * | dec | ) |
Returns true
iff the decomposition is over \( \mathbb{F}_3 \).
dec | Decomposition node. |
CMR_EXPORT size_t CMRmatroiddecNumChildren | ( | CMR_MATROID_DEC * | dec | ) |
Returns the number of children of the decomposition node dec
.
dec | Decomposition node. |
CMR_EXPORT size_t CMRmatroiddecNumColumns | ( | CMR_MATROID_DEC * | dec | ) |
Returns the number of columns.
dec | Decomposition node. |
CMR_EXPORT size_t CMRmatroiddecNumPivots | ( | CMR_MATROID_DEC * | dec | ) |
Returns the number of pivots (if available).
dec | Decomposition node. |
CMR_EXPORT size_t CMRmatroiddecNumRows | ( | CMR_MATROID_DEC * | dec | ) |
Returns the number of rows.
dec | Decomposition node. |
CMR_EXPORT size_t* CMRmatroiddecPivotColumns | ( | CMR_MATROID_DEC * | dec | ) |
Returns the array with the pivot columns (if available).
dec | Decomposition node. |
CMR_EXPORT size_t* CMRmatroiddecPivotRows | ( | CMR_MATROID_DEC * | dec | ) |
Returns the array with the pivot rows (if available).
dec | Decomposition node. |
CMR_EXPORT CMR_ERROR CMRmatroiddecPrint | ( | CMR * | cmr, |
CMR_MATROID_DEC * | dec, | ||
FILE * | stream, | ||
bool | printChildren, | ||
bool | printParentElements, | ||
bool | printMatrices, | ||
bool | printGraphs, | ||
bool | printReductions, | ||
bool | printPivots | ||
) |
Prints the decomposition dec
to stream
.
cmr | CMR environment. |
dec | Decomposition node. |
stream | Stream to write to. |
printChildren | Whether to recurse. |
printParentElements | Whether to print mapping of rows/columns to parent elements. |
printMatrices | Whether to print matrices. |
printGraphs | Whether to print graphs. |
printReductions | Whether to print series-parallel reductions. |
printPivots | Whether to print pivots. |
CMR_EXPORT int8_t CMRmatroiddecRegularity | ( | CMR_MATROID_DEC * | dec | ) |
Indicates regularity/total unimodularity.
Returns a positive value if the matrix corresponding to dec
is regular/totally unimodular, zero if it is not known and a negative value otherwise.
dec | Decomposition node. |
CMR_EXPORT CMR_ERROR CMRmatroiddecRelease | ( | CMR * | cmr, |
CMR_MATROID_DEC ** | pdec | ||
) |
Releases a decomposition node, freeing it if this was the last reference.
Decreases the reference counter by 1. If it reaches zero then it is freed. In that case, it is also called recursively for the child nodes.
cmr | CMR environment. |
pdec | Pointer to decomposition node. *pdec is set to NULL to prevent accidental usage. |
CMR_EXPORT bool CMRmatroiddecThreeSumConcentratedRank | ( | CMR_MATROID_DEC * | dec | ) |
Returns true
iff the 3-sum decomposition node has \( 3 \)-separation with one rank-2 matrix.
dec | Decomposition node. |
CMR_EXPORT bool CMRmatroiddecThreeSumDistributedRanks | ( | CMR_MATROID_DEC * | dec | ) |
Returns true
iff the 3-sum decomposition node has \( 3 \)-separation with two rank-1 matrices.
dec | Decomposition node. |
CMR_EXPORT CMR_MATROID_DEC_TYPE CMRmatroiddecType | ( | CMR_MATROID_DEC * | dec | ) |
Returns the type of a decomposition node dec
.
dec | Decomposition node. |
CMR_EXPORT CMR_ERROR CMRminorCreate | ( | CMR * | cmr, |
CMR_MINOR ** | pminor, | ||
size_t | numPivots, | ||
CMR_SUBMAT * | submatrix | ||
) |
Creates a minor, allocating space for numPivots
pivots and a remaining submatrix
.
cmr | CMR environment. |
pminor | Pointer for storing the minor. |
numPivots | Number of pivots. |
submatrix | Submatrix (may be NULL ; is not copied). |
Frees the minor *pminor
(if pminor
is not NULL
).
cmr | CMR environment. |
pminor | Pointer to the minor (may be NULL ). |
CMR_EXPORT CMR_ERROR CMRminorPrint | ( | CMR * | cmr, |
CMR_MINOR * | minor, | ||
size_t | numRows, | ||
size_t | numColumns, | ||
FILE * | stream | ||
) |
Writes the minor minor
to the file \fileName by means of lists of row and column indices as well as pivot entries.
cmr | CMR environment. |
minor | Minor to write. |
numRows | Number of rows of original matrix. |
numColumns | Number of columns of original matrix. |
stream | File stream to save minor to.. |
CMR_EXPORT CMR_ERROR CMRminorWriteToFile | ( | CMR * | cmr, |
CMR_MINOR * | minor, | ||
size_t | numRows, | ||
size_t | numColumns, | ||
const char * | fileName | ||
) |
Writes the minor minor
to the file \fileName by means of lists of row and column indices as well as pivot entries.
cmr | CMR environment. |
minor | Minor to write. |
numRows | Number of rows of original matrix. |
numColumns | Number of columns of original matrix. |
fileName | File name to save minor to; NULL indicates stdout. |