![]() |
CMR
1.3.0
|
#include <cmr/ctu.h>#include <cmr/tu.h>#include "env_internal.h"#include <assert.h>#include <stdint.h>#include <time.h>#include <float.h>Functions | |
| CMR_ERROR | CMRctuParamsInit (CMR_CTU_PARAMS *params) |
| Initializes the default parameters for recognition of complement totally unimodular matrices. | |
| CMR_ERROR | CMRstatsComplementTotalUnimodularityInit (CMR_CTU_STATISTICS *stats) |
| Initializes all statistics for recognition algorithm for complement totally unimodular matrices. | |
| CMR_ERROR | CMRstatsComplementTotalUnimodularityPrint (FILE *stream, CMR_CTU_STATISTICS *stats, const char *prefix) |
| Prints statistics for recognition algorithm for complement totally unimodular matrices. | |
| CMR_ERROR | CMRctuComplementRowColumn (CMR *cmr, CMR_CHRMAT *matrix, size_t complementRow, size_t complementColumn, CMR_CHRMAT **presult) |
| Carries out a row- and column-complement operations on the binary matrix. | |
| CMR_ERROR | CMRctuTest (CMR *cmr, CMR_CHRMAT *matrix, bool *pisComplementTotallyUnimodular, size_t *pcomplementRow, size_t *pcomplementColumn, CMR_CTU_PARAMS *params, CMR_CTU_STATISTICS *stats, double timeLimit) |
| Tests a matrix \( M \) for being complement totally unimodular. | |
| CMR_ERROR CMRctuComplementRowColumn | ( | CMR * | cmr, |
| CMR_CHRMAT * | matrix, | ||
| size_t | complementRow, | ||
| size_t | complementColumn, | ||
| CMR_CHRMAT ** | presult | ||
| ) |
Carries out a row- and column-complement operations on the binary matrix.
| cmr | CMR environment |
| matrix | Input matrix. |
| complementRow | Row to be complemented (SIZE_MAX for no row complement). |
| complementColumn | Column to be complemented (SIZE_MAX for no column complement). |
| presult | Resulting matrix. |
| CMR_ERROR CMRctuParamsInit | ( | CMR_CTU_PARAMS * | params | ) |
Initializes the default parameters for recognition of complement totally unimodular matrices.
These are selected for minimum running time.
| params | Pointer to parameters. |
| CMR_ERROR CMRctuTest | ( | CMR * | cmr, |
| CMR_CHRMAT * | matrix, | ||
| bool * | pisComplementTotallyUnimodular, | ||
| size_t * | pcomplementRow, | ||
| size_t * | pcomplementColumn, | ||
| CMR_CTU_PARAMS * | params, | ||
| CMR_CTU_STATISTICS * | stats, | ||
| double | timeLimit | ||
| ) |
Tests a matrix \( M \) for being complement totally unimodular.
Tests if matrix \( M \) is complement totally unimodular and sets *pisComplementTotallyUnimodular accordingly.
If \( M \) is not complement totally unimodular and pcomplementRow != NULL and pcomplementColumn != NULL, then *pcomplementRow and *pcomplementColumn will indicate the row and column that need to be complemented for obtaining a matrix that is not totally unimodular. If no row/column needs to be complemented, then the respective variables are set to SIZE_MAX.
| cmr | CMR environment |
| matrix | Matrix \( M \). |
| pisComplementTotallyUnimodular | Pointer for storing whether \( M \) is complement totally unimodular. |
| pcomplementRow | Pointer for storing the row to be complemented (may be NULL). |
| pcomplementColumn | Pointer for storing the column to be complemented (may be NULL). |
| params | Parameters for the computation (may be NULL for defaults). |
| stats | Statistics for the computation (may be NULL). |
| timeLimit | Time limit to impose. |
| CMR_ERROR CMRstatsComplementTotalUnimodularityInit | ( | CMR_CTU_STATISTICS * | stats | ) |
Initializes all statistics for recognition algorithm for complement totally unimodular matrices.
| stats | Pointer to statistics. |
| CMR_ERROR CMRstatsComplementTotalUnimodularityPrint | ( | FILE * | stream, |
| CMR_CTU_STATISTICS * | stats, | ||
| const char * | prefix | ||
| ) |
Prints statistics for recognition algorithm for complement totally unimodular matrices.
| stream | File stream to print to. |
| stats | Pointer to statistics. |
| prefix | Prefix string to prepend to each printed line (may be NULL). |