![]() |
CMR
1.3.0
|
#include <cmr/equimodular.h>#include <cmr/tu.h>#include <assert.h>#include <float.h>#include <time.h>#include <inttypes.h>#include "env_internal.h"#include "linear_algebra_internal.h"Functions | |
| CMR_ERROR | CMRequimodularParamsInit (CMR_EQUIMODULAR_PARAMS *params) |
| Initializes the default parameters for recognition of equimodular matrices. | |
| CMR_ERROR | CMRequimodularStatsInit (CMR_EQUIMODULAR_STATS *stats) |
| Initializes all statistics for recognition algorithm for equimodular matrices. | |
| CMR_ERROR | CMRequimodularStatsPrint (FILE *stream, CMR_EQUIMODULAR_STATS *stats, const char *prefix) |
| Prints statistics for recognition algorithm for equimodular matrices. | |
| CMR_ERROR | CMRequimodularTest (CMR *cmr, CMR_INTMAT *matrix, bool *pisEquimodular, int64_t *pgcdDet, CMR_EQUIMODULAR_PARAMS *params, CMR_EQUIMODULAR_STATS *stats, double timeLimit) |
| Tests a matrix \( M \) for being equimodular (for determinant gcd \( k \)). | |
| CMR_ERROR | CMRequimodularTestStrong (CMR *cmr, CMR_INTMAT *matrix, bool *pisStronglyEquimodular, int64_t *pgcdDet, CMR_EQUIMODULAR_PARAMS *params, CMR_EQUIMODULAR_STATS *stats, double timeLimit) |
| Tests a matrix \( M \) for being strongly equimodular. | |
| CMR_EXPORT CMR_ERROR | CMRunimodularTest (CMR *cmr, CMR_INTMAT *matrix, bool *pisUnimodular, CMR_EQUIMODULAR_PARAMS *params, CMR_EQUIMODULAR_STATS *stats, double timeLimit) |
| Tests a matrix \( M \) for being unimodular. | |
| CMR_EXPORT CMR_ERROR | CMRunimodularTestStrong (CMR *cmr, CMR_INTMAT *matrix, bool *pisStronglyUnimodular, CMR_EQUIMODULAR_PARAMS *params, CMR_EQUIMODULAR_STATS *stats, double timeLimit) |
| Tests a matrix \( M \) for being strongly unimodular. | |
| CMR_ERROR CMRequimodularParamsInit | ( | CMR_EQUIMODULAR_PARAMS * | params | ) |
Initializes the default parameters for recognition of equimodular matrices.
These are selected for minimum running time.
| params | Pointer to parameters. |
| CMR_ERROR CMRequimodularStatsInit | ( | CMR_EQUIMODULAR_STATS * | stats | ) |
Initializes all statistics for recognition algorithm for equimodular matrices.
| stats | Pointer to statistics. |
| CMR_ERROR CMRequimodularStatsPrint | ( | FILE * | stream, |
| CMR_EQUIMODULAR_STATS * | stats, | ||
| const char * | prefix | ||
| ) |
Prints statistics for recognition algorithm for equimodular matrices.
| stream | File stream to print to. |
| stats | Pointer to statistics. |
| prefix | Prefix string to prepend to each printed line (may be NULL). |
| CMR_ERROR CMRequimodularTest | ( | CMR * | cmr, |
| CMR_INTMAT * | matrix, | ||
| bool * | pisEquimodular, | ||
| int64_t * | pgcdDet, | ||
| CMR_EQUIMODULAR_PARAMS * | params, | ||
| CMR_EQUIMODULAR_STATS * | stats, | ||
| double | timeLimit | ||
| ) |
Tests a matrix \( M \) for being equimodular (for determinant gcd \( k \)).
Tests if matrix \( M \) is equimodular for determinant gcd \( k \) and sets *pisEquimodular accordingly. If pgcdDet is not NULL, the behavior is as follows. If *pgcdDet is positive, then it tests only for that particular value of \( k \). Otherwise, *pgcdDet is set to \( k \) if \( M \) is equimodular for determinant gcd \( k \), and to \( 0 \) if \( M \) is not equimodular.
| cmr | CMR environment |
| matrix | Matrix \( M \). |
| pisEquimodular | Pointer for storing whether \( M \) is equimodular. |
| pgcdDet | Pointer for supplying/storing the determinant gcd (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 CMRequimodularTestStrong | ( | CMR * | cmr, |
| CMR_INTMAT * | matrix, | ||
| bool * | pisStronglyEquimodular, | ||
| int64_t * | pgcdDet, | ||
| CMR_EQUIMODULAR_PARAMS * | params, | ||
| CMR_EQUIMODULAR_STATS * | stats, | ||
| double | timeLimit | ||
| ) |
Tests a matrix \( M \) for being strongly equimodular.
Tests if matrix \( M \) is strongly equimodular and sets *pisStronglyEquimodular accordingly. If pgcdDet is not NULL, the behavior is as follows. If *pgcdDet is positive, then it tests only for that particular value of \( k \). Otherwise, *pgcdDet is set to \( k \) if \( M \) is strongly equimodular for determinant gcd \( k \), and to \( 0 \) if \( M \) is not strongly equimodular.
| cmr | CMR environment |
| matrix | Matrix \( M \). |
| pisStronglyEquimodular | Pointer for storing whether \( M \) is strongly equimodular. |
| pgcdDet | Pointer for supplying/storing the determinant gcd (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_EXPORT CMR_ERROR CMRunimodularTest | ( | CMR * | cmr, |
| CMR_INTMAT * | matrix, | ||
| bool * | pisUnimodular, | ||
| CMR_EQUIMODULAR_PARAMS * | params, | ||
| CMR_EQUIMODULAR_STATS * | stats, | ||
| double | timeLimit | ||
| ) |
Tests a matrix \( M \) for being unimodular.
Tests if matrix \( M \) is unimodular and sets *pisUnimodular accordingly.
| cmr | CMR environment |
| matrix | Matrix \( M \). |
| pisUnimodular | Pointer for storing whether \( M \) is unimodular. |
| params | Parameters for the computation (may be NULL for defaults). |
| stats | Statistics for the computation (may be NULL). |
| timeLimit | Time limit to impose. |
| CMR_EXPORT CMR_ERROR CMRunimodularTestStrong | ( | CMR * | cmr, |
| CMR_INTMAT * | matrix, | ||
| bool * | pisStronglyUnimodular, | ||
| CMR_EQUIMODULAR_PARAMS * | params, | ||
| CMR_EQUIMODULAR_STATS * | stats, | ||
| double | timeLimit | ||
| ) |
Tests a matrix \( M \) for being strongly unimodular.
Tests if matrix \( M \) is strongly unimodular and sets *pisStronglyUnimodular accordingly.
| cmr | CMR environment |
| matrix | Matrix \( M \). |
| pisStronglyUnimodular | Pointer for storing whether \( M \) is strongly unimodular. |
| params | Parameters for the computation (may be NULL for defaults). |
| stats | Statistics for the computation (may be NULL). |
| timeLimit | Time limit to impose. |