CMR  1.3.0
Classes | Functions
equimodular.h File Reference

Recognition of (strongly) equimodular matrices. More...

#include <cmr/env.h>
#include <cmr/matrix.h>
#include <cmr/tu.h>

Go to the source code of this file.

Classes

struct  CMR_EQUIMODULAR_PARAMS
 
struct  CMR_EQUIMODULAR_STATS
 Statistics for recognition algorithm for equimodular matrices. More...
 

Functions

CMR_EXPORT CMR_ERROR CMRequimodularParamsInit (CMR_EQUIMODULAR_PARAMS *params)
 Initializes the default parameters for recognition of equimodular matrices. More...
 
CMR_EXPORT CMR_ERROR CMRequimodularStatsInit (CMR_EQUIMODULAR_STATS *stats)
 Initializes all statistics for recognition algorithm for equimodular matrices. More...
 
CMR_EXPORT CMR_ERROR CMRequimodularStatsPrint (FILE *stream, CMR_EQUIMODULAR_STATS *stats, const char *prefix)
 Prints statistics for recognition algorithm for equimodular matrices. More...
 
CMR_EXPORT 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 \)). More...
 
CMR_EXPORT 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. More...
 
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. More...
 
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. More...
 

Detailed Description

Recognition of (strongly) equimodular matrices.

Author
Matthias Walter and Klaus Truemper

Function Documentation

◆ CMRequimodularParamsInit()

CMR_EXPORT CMR_ERROR CMRequimodularParamsInit ( CMR_EQUIMODULAR_PARAMS params)

Initializes the default parameters for recognition of equimodular matrices.

These are selected for minimum running time.

Parameters
paramsPointer to parameters.

◆ CMRequimodularStatsInit()

CMR_EXPORT CMR_ERROR CMRequimodularStatsInit ( CMR_EQUIMODULAR_STATS stats)

Initializes all statistics for recognition algorithm for equimodular matrices.

Parameters
statsPointer to statistics.

◆ CMRequimodularStatsPrint()

CMR_EXPORT CMR_ERROR CMRequimodularStatsPrint ( FILE *  stream,
CMR_EQUIMODULAR_STATS stats,
const char *  prefix 
)

Prints statistics for recognition algorithm for equimodular matrices.

Parameters
streamFile stream to print to.
statsPointer to statistics.
prefixPrefix string to prepend to each printed line (may be NULL).

◆ CMRequimodularTest()

CMR_EXPORT 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.

Parameters
cmrCMR environment
matrixMatrix \( M \).
pisEquimodularPointer for storing whether \( M \) is equimodular.
pgcdDetPointer for supplying/storing the determinant gcd (may be NULL).
paramsParameters for the computation (may be NULL for defaults).
statsStatistics for the computation (may be NULL).
timeLimitTime limit to impose.

◆ CMRequimodularTestStrong()

CMR_EXPORT 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.

Parameters
cmrCMR environment
matrixMatrix \( M \).
pisStronglyEquimodularPointer for storing whether \( M \) is strongly equimodular.
pgcdDetPointer for supplying/storing the determinant gcd (may be NULL).
paramsParameters for the computation (may be NULL for defaults).
statsStatistics for the computation (may be NULL).
timeLimitTime limit to impose.

◆ CMRunimodularTest()

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.

Parameters
cmrCMR environment
matrixMatrix \( M \).
pisUnimodularPointer for storing whether \( M \) is unimodular.
paramsParameters for the computation (may be NULL for defaults).
statsStatistics for the computation (may be NULL).
timeLimitTime limit to impose.

◆ CMRunimodularTestStrong()

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.

Parameters
cmrCMR environment
matrixMatrix \( M \).
pisStronglyUnimodularPointer for storing whether \( M \) is strongly unimodular.
paramsParameters for the computation (may be NULL for defaults).
statsStatistics for the computation (may be NULL).
timeLimitTime limit to impose.