CMR  1.3.0
equimodular.h
Go to the documentation of this file.
1 #ifndef CMR_EQUIMODULAR_H
2 #define CMR_EQUIMODULAR_H
3 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include <cmr/env.h>
17 #include <cmr/matrix.h>
18 #include <cmr/tu.h>
19 
20 typedef struct
21 {
24 
31 CMR_EXPORT
33  CMR_EQUIMODULAR_PARAMS* params
34 );
35 
40 typedef struct
41 {
42  uint32_t totalCount;
43  double totalTime;
44  double linalgTime;
47 
52 CMR_EXPORT
54  CMR_EQUIMODULAR_STATS* stats
55 );
56 
61 CMR_EXPORT
63  FILE* stream,
64  CMR_EQUIMODULAR_STATS* stats,
65  const char* prefix
66 );
67 
77 CMR_EXPORT
79  CMR* cmr,
80  CMR_INTMAT* matrix,
81  bool* pisEquimodular,
82  int64_t* pgcdDet,
83  CMR_EQUIMODULAR_PARAMS* params,
84  CMR_EQUIMODULAR_STATS* stats,
85  double timeLimit
86 );
87 
98 CMR_EXPORT
100  CMR* cmr,
101  CMR_INTMAT* matrix,
102  bool* pisStronglyEquimodular,
103  int64_t* pgcdDet,
104  CMR_EQUIMODULAR_PARAMS* params,
105  CMR_EQUIMODULAR_STATS* stats,
106  double timeLimit
107 );
108 
115 CMR_EXPORT
117  CMR* cmr,
118  CMR_INTMAT* matrix,
119  bool* pisUnimodular,
120  CMR_EQUIMODULAR_PARAMS* params,
121  CMR_EQUIMODULAR_STATS* stats,
122  double timeLimit
123 );
124 
131 CMR_EXPORT
133  CMR* cmr,
134  CMR_INTMAT* matrix,
135  bool* pisStronglyUnimodular,
136  CMR_EQUIMODULAR_PARAMS* params,
137  CMR_EQUIMODULAR_STATS* stats,
138  double timeLimit
139 );
140 
141 #ifdef __cplusplus
142 }
143 #endif
144 
145 #endif /* CMR_EQUIMODULAR_H */
146 
Basic functionality of the software library.
CMR_ERROR
Type for return codes of library functions.
Definition: env.h:32
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 for being unimodular.
Definition: equimodular.c:277
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 for being equimodular (for determinant gcd ).
Definition: equimodular.c:57
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 for being strongly equimodular.
Definition: equimodular.c:244
CMR_EXPORT CMR_ERROR CMRequimodularStatsInit(CMR_EQUIMODULAR_STATS *stats)
Initializes all statistics for recognition algorithm for equimodular matrices.
Definition: equimodular.c:23
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 for being strongly unimodular.
Definition: equimodular.c:292
CMR_EXPORT CMR_ERROR CMRequimodularStatsPrint(FILE *stream, CMR_EQUIMODULAR_STATS *stats, const char *prefix)
Prints statistics for recognition algorithm for equimodular matrices.
Definition: equimodular.c:35
CMR_EXPORT CMR_ERROR CMRequimodularParamsInit(CMR_EQUIMODULAR_PARAMS *params)
Initializes the default parameters for recognition of equimodular matrices.
Definition: equimodular.c:14
Functionality for sparse matrices.
Definition: env_internal.h:45
Definition: equimodular.h:21
CMR_TU_PARAMS tu
Parameters for TU test.
Definition: equimodular.h:22
Statistics for recognition algorithm for equimodular matrices.
Definition: equimodular.h:41
double linalgTime
Definition: equimodular.h:44
uint32_t totalCount
Definition: equimodular.h:42
CMR_TU_STATS tu
Definition: equimodular.h:45
double totalTime
Definition: equimodular.h:43
Row-wise representation of sparse int matrix.
Definition: matrix.h:180
Definition: tu.h:29
Statistics for recognition algorithm for totally unimodular matrices.
Definition: tu.h:51
Recognition of totally unimodular matrices.