CMR
1.3.0
|
Classes | |
struct | CMR_SEYMOUR_PARAMS |
Parameters for Seymour decomposition algorithm. More... | |
struct | CMR_SEYMOUR_STATS |
Statistics for Seymour decomposition algorithm. More... | |
Typedefs | |
typedef struct _CMR_SEYMOUR_NODE | CMR_SEYMOUR_NODE |
Functions | |
CMR_EXPORT CMR_ERROR | CMRseymourParamsInit (CMR_SEYMOUR_PARAMS *params) |
Initializes the default parameters for regularity testing. More... | |
CMR_EXPORT CMR_ERROR | CMRseymourStatsInit (CMR_SEYMOUR_STATS *stats) |
Initializes all statistics for Seymour decomposition computations. More... | |
CMR_EXPORT CMR_ERROR | CMRseymourStatsPrint (FILE *stream, CMR_SEYMOUR_STATS *stats, const char *prefix) |
Prints statistics for Seymour decomposition computations. More... | |
CMR_EXPORT bool | CMRseymourIsTernary (CMR_SEYMOUR_NODE *node) |
Returns true iff the decomposition is over \( \mathbb{F}_3 \). More... | |
CMR_EXPORT bool | CMRseymourThreeSumDistributedRanks (CMR_SEYMOUR_NODE *node) |
Returns true iff the 3-sum decomposition node has \( 3 \)-separation with two rank-1 matrices. More... | |
CMR_EXPORT bool | CMRseymourThreeSumConcentratedRank (CMR_SEYMOUR_NODE *node) |
Returns true iff the 3-sum decomposition node has \( 3 \)-separation with one rank-2 matrix. More... | |
CMR_EXPORT bool | CMRseymourHasTranspose (CMR_SEYMOUR_NODE *node) |
Returns true iff the transposed matrix of the decomposition node dec is stored. More... | |
CMR_EXPORT CMR_CHRMAT * | CMRseymourGetMatrix (CMR_SEYMOUR_NODE *node) |
Returns the matrix of the decomposition node dec (or NULL if it is not stored). More... | |
CMR_EXPORT CMR_CHRMAT * | CMRseymourGetTranspose (CMR_SEYMOUR_NODE *node) |
Returns the transposed matrix of the decomposition node dec (or NULL if it is not stored). More... | |
CMR_EXPORT size_t | CMRseymourNumChildren (CMR_SEYMOUR_NODE *node) |
Returns the number of children of the decomposition node dec . More... | |
CMR_EXPORT CMR_SEYMOUR_NODE * | CMRseymourChild (CMR_SEYMOUR_NODE *node, size_t childIndex) |
Returns a child of the decomposition node dec . More... | |
CMR_EXPORT CMR_SEYMOUR_NODE_TYPE | CMRseymourType (CMR_SEYMOUR_NODE *node) |
Returns the type of a decomposition node dec . More... | |
CMR_EXPORT size_t | CMRseymourNumMinors (CMR_SEYMOUR_NODE *node) |
Returns the number of minors of the decomposition node. More... | |
CMR_EXPORT CMR_MINOR * | CMRseymourMinor (CMR_SEYMOUR_NODE *node, size_t minorIndex) |
Returns a minor of the decomposition node. More... | |
CMR_EXPORT int8_t | CMRseymourGraphicness (CMR_SEYMOUR_NODE *node) |
Indicates graphicness/being network. More... | |
CMR_EXPORT int8_t | CMRseymourCographicness (CMR_SEYMOUR_NODE *node) |
Indicates cographicness/being conetwork. More... | |
CMR_EXPORT int8_t | CMRseymourRegularity (CMR_SEYMOUR_NODE *node) |
Indicates regularity/total unimodularity. More... | |
CMR_EXPORT size_t | CMRseymourNumRows (CMR_SEYMOUR_NODE *node) |
Returns the number of rows. More... | |
CMR_EXPORT size_t | CMRseymourNumColumns (CMR_SEYMOUR_NODE *node) |
Returns the number of columns. More... | |
CMR_EXPORT CMR_ELEMENT * | CMRseymourChildRowsToParent (CMR_SEYMOUR_NODE *node, size_t childIndex) |
Returns the mapping of rows of child childIndex to this node's elements. More... | |
CMR_EXPORT CMR_ELEMENT * | CMRseymourChildColumnsToParent (CMR_SEYMOUR_NODE *node, size_t childIndex) |
Returns the mapping of columns of child childIndex to this node's elements. More... | |
CMR_EXPORT CMR_GRAPH * | CMRseymourGraph (CMR_SEYMOUR_NODE *node) |
Returns the graph (if available). More... | |
CMR_EXPORT CMR_GRAPH_EDGE * | CMRseymourGraphForest (CMR_SEYMOUR_NODE *node) |
Returns the forest of the graph (if available). More... | |
CMR_EXPORT size_t | CMRseymourGraphSizeForest (CMR_SEYMOUR_NODE *dec) |
Returns the number of edges of the graph's forest (if available). More... | |
CMR_EXPORT CMR_GRAPH_EDGE * | CMRseymourGraphCoforest (CMR_SEYMOUR_NODE *node) |
Returns the coforest of the graph (if available). More... | |
CMR_EXPORT size_t | CMRseymourGraphSizeCoforest (CMR_SEYMOUR_NODE *node) |
Returns the number of edges of the graph's coforest (if available). More... | |
CMR_EXPORT bool * | CMRseymourGraphArcsReversed (CMR_SEYMOUR_NODE *node) |
Returns an array that indicates for the graph's edges whether they must be reversed (if available). More... | |
CMR_EXPORT CMR_GRAPH * | CMRseymourCograph (CMR_SEYMOUR_NODE *node) |
Returns the cograph (if available). More... | |
CMR_EXPORT size_t | CMRseymourCographSizeForest (CMR_SEYMOUR_NODE *node) |
Returns the number of edges of the cograph's forest (if available). More... | |
CMR_EXPORT CMR_GRAPH_EDGE * | CMRseymourCographForest (CMR_SEYMOUR_NODE *node) |
Returns the forest of the cograph (if available). More... | |
CMR_EXPORT size_t | CMRseymourCographSizeCoforest (CMR_SEYMOUR_NODE *node) |
Returns the number of edges of the cograph's coforest (if available). More... | |
CMR_EXPORT CMR_GRAPH_EDGE * | CMRseymourCographCoforest (CMR_SEYMOUR_NODE *node) |
Returns the coforest of the cograph (if available). More... | |
CMR_EXPORT bool * | CMRseymourCographArcsReversed (CMR_SEYMOUR_NODE *node) |
Returns an array that indicates for the cograph's edges whether they must be reversed (if available). More... | |
CMR_EXPORT size_t | CMRseymourNumPivots (CMR_SEYMOUR_NODE *node) |
Returns the number of pivots (if available). More... | |
CMR_EXPORT size_t * | CMRseymourPivotRows (CMR_SEYMOUR_NODE *node) |
Returns the array with the pivot rows (if available). More... | |
CMR_EXPORT size_t * | CMRseymourPivotColumns (CMR_SEYMOUR_NODE *node) |
Returns the array with the pivot columns (if available). More... | |
CMR_EXPORT size_t | CMRseymourGetUsed (CMR_SEYMOUR_NODE *node) |
Returns node's reference counter. More... | |
CMR_EXPORT CMR_ERROR | CMRseymourPrint (CMR *cmr, CMR_SEYMOUR_NODE *node, 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 | CMRseymourCapture (CMR *cmr, CMR_SEYMOUR_NODE *node) |
Increases the reference counter by 1. More... | |
CMR_EXPORT CMR_ERROR | CMRseymourRelease (CMR *cmr, CMR_SEYMOUR_NODE **pnode) |
Releases a decomposition node, freeing it if this was the last reference. More... | |
CMR_EXPORT CMR_ERROR | CMRseymourCreate (CMR *cmr, CMR_SEYMOUR_NODE **pnode, bool isTernary, CMR_CHRMAT *matrix) |
Creates an unknown decomposition node as a root. More... | |
CMR_EXPORT CMR_ERROR | CMRseymourCloneUnknown (CMR *cmr, CMR_SEYMOUR_NODE *node, CMR_SEYMOUR_NODE **pclone) |
Clones a decomposition node node into *pclone which represents the same matrix but has type CMR_SEYMOUR_NODE_TYPE_UNKNOWN type and no child nodes. More... | |
CMR_EXPORT CMR_ERROR | CMRseymourCloneSubtrees (CMR *cmr, size_t numSubtrees, CMR_SEYMOUR_NODE **subtreeRoots, CMR_SEYMOUR_NODE **clonedSubtrees) |
Clones the union of subtrees of a Seymour decomposition, returning the copies. More... | |
typedef struct _CMR_SEYMOUR_NODE CMR_SEYMOUR_NODE |
Enumerator | |
---|---|
CMR_SEYMOUR_NODE_TYPE_IRREGULAR | Node represents 3-connected irregular matrix.
|
CMR_SEYMOUR_NODE_TYPE_UNKNOWN | Type of node is not yet determined. |
CMR_SEYMOUR_NODE_TYPE_ONE_SUM | Node represents a \( 1 \)-sum of matrices; has at least 2 child nodes.
|
CMR_SEYMOUR_NODE_TYPE_TWO_SUM | Node represents a 2-sum of matrices; has two child nodes.
|
CMR_SEYMOUR_NODE_TYPE_THREE_SUM | Node represents a 3-sum of matrices; has two child nodes.
|
CMR_SEYMOUR_NODE_TYPE_SERIES_PARALLEL | Node represents a series-parallel reduction; has one child node.
|
CMR_SEYMOUR_NODE_TYPE_PIVOTS | Node represents an application of pivots; has one child node.
|
CMR_SEYMOUR_NODE_TYPE_GRAPH | Node represents a graphic or network leaf.
|
CMR_SEYMOUR_NODE_TYPE_COGRAPH | Node represents a cographic or conetwork leaf.
|
CMR_SEYMOUR_NODE_TYPE_PLANAR | Node represents a graphic and cographic (network and conetwork) leaf.
|
CMR_SEYMOUR_NODE_TYPE_R10 | Node represents a representation matrix of \( R_{10} \).
|
Flags that indicate the type of \( 3 \)-separation.
Enumerator | |
---|---|
CMR_SEYMOUR_THREESUM_FLAG_NO_PIVOTS | Indicate to not change the rank distribution; only serves as an option; each constructed node will have either CMR_SEYMOUR_THREESUM_FLAG_DISTRIBUTED_RANKS or CMR_SEYMOUR_THREESUM_FLAG_CONCENTRATED_RANK set. |
CMR_SEYMOUR_THREESUM_FLAG_DISTRIBUTED_RANKS | The two off-diagonal submatrices both have rank 1.
|
CMR_SEYMOUR_THREESUM_FLAG_CONCENTRATED_RANK | The bottom-left submatrix has rank 2 and the top-right submatrix has rank 0.
|
CMR_SEYMOUR_THREESUM_FLAG_FIRST_WIDE | The first child node is of the form \( M_1^{\text{wide}} \); valid for distributed ranks.
|
CMR_SEYMOUR_THREESUM_FLAG_FIRST_TALL | The first child node is of the form \( M_1^{\text{tall}} \); valid for distributed ranks.
|
CMR_SEYMOUR_THREESUM_FLAG_FIRST_MIXED | The first child node is of the form \( M_1^{\text{mixed}} \); valid for concentrated rank.
|
CMR_SEYMOUR_THREESUM_FLAG_FIRST_ALLREPR | The first child node is of the form \( M_1^{\text{all-repr}} \); valid for concentrated rank.
|
CMR_SEYMOUR_THREESUM_FLAG_SECOND_WIDE | The second child node is of the form \( M_2^{\text{wide}} \); valid for distributed ranks.
|
CMR_SEYMOUR_THREESUM_FLAG_SECOND_TALL | The second child node is of the form \( M_2^{\text{tall}} \); valid for distributed ranks.
|
CMR_SEYMOUR_THREESUM_FLAG_SECOND_MIXED | The second child node is of the form \( M_2^{\text{mixed}} \); valid for concentrated rank.
|
CMR_SEYMOUR_THREESUM_FLAG_SECOND_ALLREPR | The second child node is of the form \( M_2^{\text{all-repr}} \); valid for concentrated rank.
|
CMR_SEYMOUR_THREESUM_FLAG_SEYMOUR | This combination of flags indicates a \( 3 \)-sum as defined by Seymour.
|
CMR_SEYMOUR_THREESUM_FLAG_TRUEMPER | This combination of flags indicates a \( 3 \)-sum as defined by Truemper.
|
CMR_EXPORT CMR_ERROR CMRseymourCapture | ( | CMR * | cmr, |
CMR_SEYMOUR_NODE * | node | ||
) |
Increases the reference counter by 1.
cmr | CMR environment. |
node | Seymour decomposition node. |
CMR_EXPORT CMR_SEYMOUR_NODE* CMRseymourChild | ( | CMR_SEYMOUR_NODE * | node, |
size_t | childIndex | ||
) |
Returns a child of the decomposition node dec
.
node | Seymour decomposition node. |
childIndex | Index of child. |
CMR_EXPORT CMR_ELEMENT* CMRseymourChildColumnsToParent | ( | CMR_SEYMOUR_NODE * | node, |
size_t | childIndex | ||
) |
Returns the mapping of columns of child childIndex
to this node's elements.
node | Seymour decomposition node. |
childIndex | Index of child to consider. |
CMR_EXPORT CMR_ELEMENT* CMRseymourChildRowsToParent | ( | CMR_SEYMOUR_NODE * | node, |
size_t | childIndex | ||
) |
Returns the mapping of rows of child childIndex
to this node's elements.
node | Seymour decomposition node. |
childIndex | Index of child to consider. |
CMR_EXPORT CMR_ERROR CMRseymourCloneSubtrees | ( | CMR * | cmr, |
size_t | numSubtrees, | ||
CMR_SEYMOUR_NODE ** | subtreeRoots, | ||
CMR_SEYMOUR_NODE ** | clonedSubtrees | ||
) |
Clones the union of subtrees of a Seymour decomposition, returning the copies.
The set of Seymour decomposition nodes that are (grand-)children of any of the numSubtrees
nodes subtreeRoots
is cloned. The respective clones are returned in clonedSubtrees
.
CMR_EXPORT CMR_ERROR CMRseymourCloneUnknown | ( | CMR * | cmr, |
CMR_SEYMOUR_NODE * | node, | ||
CMR_SEYMOUR_NODE ** | pclone | ||
) |
Clones a decomposition node node
into *pclone
which represents the same matrix but has type CMR_SEYMOUR_NODE_TYPE_UNKNOWN type and no child nodes.
cmr | CMR environment. |
node | Seymour decomposition node. |
pclone | Pointer for storing the clone. |
CMR_EXPORT CMR_GRAPH* CMRseymourCograph | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the cograph (if available).
node | Seymour decomposition node. |
CMR_EXPORT bool* CMRseymourCographArcsReversed | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns an array that indicates for the cograph's edges whether they must be reversed (if available).
node | Seymour decomposition node. |
CMR_EXPORT CMR_GRAPH_EDGE* CMRseymourCographCoforest | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the coforest of the cograph (if available).
node | Seymour decomposition node. |
CMR_EXPORT CMR_GRAPH_EDGE* CMRseymourCographForest | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the forest of the cograph (if available).
node | Seymour decomposition node. |
CMR_EXPORT int8_t CMRseymourCographicness | ( | CMR_SEYMOUR_NODE * | node | ) |
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.
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourCographSizeCoforest | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the number of edges of the cograph's coforest (if available).
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourCographSizeForest | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the number of edges of the cograph's forest (if available).
node | Seymour decomposition node. |
CMR_EXPORT CMR_ERROR CMRseymourCreate | ( | CMR * | cmr, |
CMR_SEYMOUR_NODE ** | pnode, | ||
bool | isTernary, | ||
CMR_CHRMAT * | matrix | ||
) |
Creates an unknown decomposition node as a root.
Copies matrix
into the node.
cmr | CMR environment. |
pnode | Pointer for storing the Seymour decomposition node. |
isTernary | Whether we consider ternary matrices. |
matrix | The matrix corresponding to this node; will be copied. |
CMR_EXPORT CMR_CHRMAT* CMRseymourGetMatrix | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the matrix of the decomposition node dec
(or NULL
if it is not stored).
node | Seymour decomposition node. |
CMR_EXPORT CMR_CHRMAT* CMRseymourGetTranspose | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the transposed matrix of the decomposition node dec
(or NULL
if it is not stored).
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourGetUsed | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns node's reference counter.
node | Seymour decomposition node. |
CMR_EXPORT CMR_GRAPH* CMRseymourGraph | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the graph (if available).
node | Seymour decomposition node. |
CMR_EXPORT bool* CMRseymourGraphArcsReversed | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns an array that indicates for the graph's edges whether they must be reversed (if available).
node | Seymour decomposition node. |
CMR_EXPORT CMR_GRAPH_EDGE* CMRseymourGraphCoforest | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the coforest of the graph (if available).
node | Seymour decomposition node. |
CMR_EXPORT CMR_GRAPH_EDGE* CMRseymourGraphForest | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the forest of the graph (if available).
node | Seymour decomposition node. |
CMR_EXPORT int8_t CMRseymourGraphicness | ( | CMR_SEYMOUR_NODE * | node | ) |
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.
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourGraphSizeCoforest | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the number of edges of the graph's coforest (if available).
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourGraphSizeForest | ( | CMR_SEYMOUR_NODE * | dec | ) |
Returns the number of edges of the graph's forest (if available).
dec | Decomposition node. |
CMR_EXPORT bool CMRseymourHasTranspose | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns true
iff the transposed matrix of the decomposition node dec
is stored.
node | Seymour decomposition node. |
CMR_EXPORT bool CMRseymourIsTernary | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns true
iff the decomposition is over \( \mathbb{F}_3 \).
node | Seymour decomposition node. |
CMR_EXPORT CMR_MINOR* CMRseymourMinor | ( | CMR_SEYMOUR_NODE * | node, |
size_t | minorIndex | ||
) |
Returns a minor of the decomposition node.
node | Seymour decomposition node. |
minorIndex | Index of minor. |
CMR_EXPORT size_t CMRseymourNumChildren | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the number of children of the decomposition node dec
.
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourNumColumns | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the number of columns.
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourNumMinors | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the number of minors of the decomposition node.
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourNumPivots | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the number of pivots (if available).
node | Seymour decomposition node. |
CMR_EXPORT size_t CMRseymourNumRows | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the number of rows.
node | Seymour decomposition node. |
CMR_EXPORT CMR_ERROR CMRseymourParamsInit | ( | CMR_SEYMOUR_PARAMS * | params | ) |
Initializes the default parameters for regularity testing.
These are selected for minimum running time.
params | Pointer to parameters. |
CMR_EXPORT size_t* CMRseymourPivotColumns | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the array with the pivot columns (if available).
node | Seymour decomposition node. |
CMR_EXPORT size_t* CMRseymourPivotRows | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the array with the pivot rows (if available).
node | Seymour decomposition node. |
CMR_EXPORT CMR_ERROR CMRseymourPrint | ( | CMR * | cmr, |
CMR_SEYMOUR_NODE * | node, | ||
FILE * | stream, | ||
bool | printChildren, | ||
bool | printParentElements, | ||
bool | printMatrices, | ||
bool | printGraphs, | ||
bool | printReductions, | ||
bool | printPivots | ||
) |
Prints the decomposition dec
to stream
.
cmr | CMR environment. |
node | Seymour 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 CMRseymourRegularity | ( | CMR_SEYMOUR_NODE * | node | ) |
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.
node | Seymour decomposition node. |
CMR_EXPORT CMR_ERROR CMRseymourRelease | ( | CMR * | cmr, |
CMR_SEYMOUR_NODE ** | pnode | ||
) |
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. Sets *pnode
to NULL
to prevent accidental usage.
cmr | CMR environment. |
pnode | Pointer to Seymour decomposition node. *pnode is set to NULL . |
CMR_EXPORT CMR_ERROR CMRseymourStatsInit | ( | CMR_SEYMOUR_STATS * | stats | ) |
Initializes all statistics for Seymour decomposition computations.
stats | Pointer to statistics. |
CMR_EXPORT CMR_ERROR CMRseymourStatsPrint | ( | FILE * | stream, |
CMR_SEYMOUR_STATS * | stats, | ||
const char * | prefix | ||
) |
Prints statistics for Seymour decomposition computations.
stream | File stream to print to. |
stats | Pointer to statistics. |
prefix | Prefix string to prepend to each printed line (may be NULL ). |
CMR_EXPORT bool CMRseymourThreeSumConcentratedRank | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns true
iff the 3-sum decomposition node has \( 3 \)-separation with one rank-2 matrix.
node | Seymour decomposition node. |
CMR_EXPORT bool CMRseymourThreeSumDistributedRanks | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns true
iff the 3-sum decomposition node has \( 3 \)-separation with two rank-1 matrices.
node | Seymour decomposition node. |
CMR_EXPORT CMR_SEYMOUR_NODE_TYPE CMRseymourType | ( | CMR_SEYMOUR_NODE * | node | ) |
Returns the type of a decomposition node dec
.
node | Seymour decomposition node. |