CMR
1.3.0
|
Classes | |
struct | CMR_MINOR |
A minor of a matroid. More... | |
Enumerations | |
enum | CMR_MINOR_TYPE { CMR_MINOR_TYPE_DETERMINANT = -2 , CMR_MINOR_TYPE_ENTRY = -1 , CMR_MINOR_TYPE_CUSTOM = 0 , CMR_MINOR_TYPE_U24 = 1 , CMR_MINOR_TYPE_FANO = 2 , CMR_MINOR_TYPE_FANO_DUAL = 3 , CMR_MINOR_TYPE_K5 = 4 , CMR_MINOR_TYPE_K5_DUAL = 5 , CMR_MINOR_TYPE_K33 = 6 , CMR_MINOR_TYPE_K33_DUAL = 7 } |
Functions | |
CMR_EXPORT CMR_ERROR | CMRchrmatBinaryPivot (CMR *cmr, CMR_CHRMAT *matrix, size_t pivotRow, size_t pivotColumn, CMR_CHRMAT **presult) |
Apply 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, CMR_MINOR_TYPE type) |
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_MINOR_TYPE | CMRminorType (CMR_MINOR *minor) |
Returns the type of minor . More... | |
CMR_EXPORT size_t | CMRminorNumPivots (CMR_MINOR *minor) |
Returns the number of pivots needed to make a minor visible. More... | |
CMR_EXPORT size_t * | CMRminorPivotRows (CMR_MINOR *minor) |
Returns the array with pivot rows to make a minor visible. More... | |
CMR_EXPORT size_t * | CMRminorPivotColumns (CMR_MINOR *minor) |
Returns the array with pivot columns to make a minor visible. More... | |
CMR_EXPORT CMR_SUBMAT * | CMRminorSubmatrix (CMR_MINOR *minor) |
Returns the submatrix to take (after applying pivots) to make a minor visible. More... | |
CMR_EXPORT CMR_ERROR | CMRminorPrint (CMR *cmr, CMR_MINOR *minor, size_t numRows, size_t numColumns, FILE *stream) |
Writes the minor minor to stream 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... | |
enum CMR_MINOR_TYPE |
CMR_EXPORT CMR_ERROR CMRchrmatBinaryPivot | ( | CMR * | cmr, |
CMR_CHRMAT * | matrix, | ||
size_t | pivotRow, | ||
size_t | pivotColumn, | ||
CMR_CHRMAT ** | presult | ||
) |
Apply 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 CMRminorCreate | ( | CMR * | cmr, |
CMR_MINOR ** | pminor, | ||
size_t | numPivots, | ||
CMR_SUBMAT * | submatrix, | ||
CMR_MINOR_TYPE | type | ||
) |
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). |
type | Type of minor. |
Frees the minor *pminor
(if pminor
is not NULL
).
cmr | CMR environment. |
pminor | Pointer to the minor (may be NULL ). |
CMR_EXPORT size_t CMRminorNumPivots | ( | CMR_MINOR * | minor | ) |
Returns the number of pivots needed to make a minor
visible.
minor | Minor. |
CMR_EXPORT size_t* CMRminorPivotColumns | ( | CMR_MINOR * | minor | ) |
Returns the array with pivot columns to make a minor
visible.
minor | Minor. |
CMR_EXPORT size_t* CMRminorPivotRows | ( | CMR_MINOR * | minor | ) |
Returns the array with pivot rows to make a minor
visible.
minor | Minor. |
CMR_EXPORT CMR_ERROR CMRminorPrint | ( | CMR * | cmr, |
CMR_MINOR * | minor, | ||
size_t | numRows, | ||
size_t | numColumns, | ||
FILE * | stream | ||
) |
Writes the minor minor
to stream
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_SUBMAT* CMRminorSubmatrix | ( | CMR_MINOR * | minor | ) |
Returns the submatrix to take (after applying pivots) to make a minor
visible.
minor | Minor. |
CMR_EXPORT CMR_MINOR_TYPE CMRminorType | ( | CMR_MINOR * | minor | ) |
Returns the type of minor
.
minor | Minor. |
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. |