CMR  1.3.0
Classes | Typedefs | Enumerations | Functions
matroid.h File Reference

Functionality for matroids. More...

#include <cmr/env.h>
#include <cmr/matrix.h>
#include <cmr/graph.h>
#include <stdio.h>

Go to the source code of this file.

Classes

struct  CMR_MINOR
 A minor of a matroid. More...
 

Typedefs

typedef struct _CMR_MATROID_DEC CMR_MATROID_DEC
 

Enumerations

enum  CMR_MATROID_DEC_TYPE {
  CMR_MATROID_DEC_TYPE_IRREGULAR = -1 , CMR_MATROID_DEC_TYPE_UNKNOWN = 0 , CMR_MATROID_DEC_TYPE_ONE_SUM = 1 , CMR_MATROID_DEC_TYPE_TWO_SUM = 2 ,
  CMR_MATROID_DEC_TYPE_THREE_SUM = 3 , CMR_MATROID_DEC_TYPE_SERIES_PARALLEL = 4 , CMR_MATROID_DEC_TYPE_PIVOTS = 5 , CMR_MATROID_DEC_TYPE_SUBMATRIX = 6 ,
  CMR_MATROID_DEC_TYPE_GRAPH = 7 , CMR_MATROID_DEC_TYPE_COGRAPH = 8 , CMR_MATROID_DEC_TYPE_PLANAR = 9 , CMR_MATROID_DEC_TYPE_R10 = -2 ,
  CMR_MATROID_DEC_TYPE_FANO = -3 , CMR_MATROID_DEC_TYPE_FANO_DUAL = -4 , CMR_MATROID_DEC_TYPE_K5 = -5 , CMR_MATROID_DEC_TYPE_K5_DUAL = -6 ,
  CMR_MATROID_DEC_TYPE_K33 = -7 , CMR_MATROID_DEC_TYPE_K33_DUAL = -8 , CMR_MATROID_DEC_TYPE_DETERMINANT = -9
}
 
enum  CMR_MATROID_DEC_THREESUM_FLAG {
  CMR_MATROID_DEC_THREESUM_FLAG_NO_PIVOTS = 0 , CMR_MATROID_DEC_THREESUM_FLAG_DISTRIBUTED_RANKS = 1 , CMR_MATROID_DEC_THREESUM_FLAG_CONCENTRATED_RANK = 2 , CMR_MATROID_DEC_THREESUM_FLAG_FIRST_WIDE = 4 ,
  CMR_MATROID_DEC_THREESUM_FLAG_FIRST_TALL = 8 , CMR_MATROID_DEC_THREESUM_FLAG_FIRST_MIXED = 64 , CMR_MATROID_DEC_THREESUM_FLAG_FIRST_ALLREPR = 128 , CMR_MATROID_DEC_THREESUM_FLAG_SECOND_WIDE = 16 ,
  CMR_MATROID_DEC_THREESUM_FLAG_SECOND_TALL = 32 , CMR_MATROID_DEC_THREESUM_FLAG_SECOND_MIXED = 256 , CMR_MATROID_DEC_THREESUM_FLAG_SECOND_ALLREPR = 512 , CMR_MATROID_DEC_THREESUM_FLAG_SEYMOUR ,
  CMR_MATROID_DEC_THREESUM_FLAG_TRUEMPER
}
 Flags that indicate the type of \( 3 \)-separation. More...
 

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_CHRMATCMRmatroiddecGetMatrix (CMR_MATROID_DEC *dec)
 Returns the matrix of the decomposition node dec (or NULL if it is not stored). More...
 
CMR_EXPORT CMR_CHRMATCMRmatroiddecGetTranspose (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_DECCMRmatroiddecChild (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_ELEMENTCMRmatroiddecChildRowsToParent (CMR_MATROID_DEC *dec, size_t childIndex)
 Returns the mapping of rows of child childIndex to this node's elements. More...
 
CMR_EXPORT CMR_ELEMENTCMRmatroiddecChildColumnsToParent (CMR_MATROID_DEC *dec, size_t childIndex)
 Returns the mapping of columns of child childIndex to this node's elements. More...
 
CMR_EXPORT CMR_GRAPHCMRmatroiddecGraph (CMR_MATROID_DEC *dec)
 Returns the graph (if available). More...
 
CMR_EXPORT CMR_GRAPH_EDGECMRmatroiddecGraphForest (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_EDGECMRmatroiddecGraphCoforest (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_GRAPHCMRmatroiddecCograph (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_EDGECMRmatroiddecCographForest (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_EDGECMRmatroiddecCographCoforest (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...
 
CMR_ERROR CMRmatroiddecCreateMatrixRoot (CMR *cmr, CMR_MATROID_DEC **pdec, bool isTernary, CMR_CHRMAT *matrix)
 Creates an unknown decomposition node as a root. More...
 

Detailed Description

Functionality for matroids.

Author
Matthias Walter