CMR  1.3.0
ctu.h
Go to the documentation of this file.
1 #ifndef CMR_CTU_H
2 #define CMR_CTU_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_CTU_PARAMS* params
34 );
35 
40 typedef struct
41 {
42  uint32_t totalCount;
43  double totalTime;
46 
51 CMR_EXPORT
53  CMR_CTU_STATISTICS* stats
54 );
55 
60 CMR_EXPORT
62  FILE* stream,
63  CMR_CTU_STATISTICS* stats,
64  const char* prefix
65 );
66 
71 CMR_EXPORT
73  CMR* cmr,
74  CMR_CHRMAT* matrix,
75  size_t complementRow,
76  size_t complementColumn,
77  CMR_CHRMAT** presult
78 );
79 
91 CMR_EXPORT
93  CMR* cmr,
94  CMR_CHRMAT* matrix,
95  bool* pisComplementTotallyUnimodular,
96  size_t* pcomplementRow,
97  size_t* pcomplementColumn,
98  CMR_CTU_PARAMS* params,
99  CMR_CTU_STATISTICS* stats,
100  double timeLimit
101 );
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* CMR_CTU_H */
CMR_EXPORT CMR_ERROR CMRctuParamsInit(CMR_CTU_PARAMS *params)
Initializes the default parameters for recognition of complement totally unimodular matrices.
Definition: ctu.c:14
CMR_EXPORT CMR_ERROR CMRstatsComplementTotalUnimodularityPrint(FILE *stream, CMR_CTU_STATISTICS *stats, const char *prefix)
Prints statistics for recognition algorithm for complement totally unimodular matrices.
Definition: ctu.c:34
CMR_EXPORT 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 for being complement totally unimodular.
Definition: ctu.c:179
CMR_EXPORT CMR_ERROR CMRstatsComplementTotalUnimodularityInit(CMR_CTU_STATISTICS *stats)
Initializes all statistics for recognition algorithm for complement totally unimodular matrices.
Definition: ctu.c:23
CMR_EXPORT CMR_ERROR CMRcomplementRowColumn(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.
Definition: ctu.c:56
Basic functionality of the software library.
CMR_ERROR
Type for return codes of library functions.
Definition: env.h:32
Functionality for sparse matrices.
Row-wise representation of sparse char matrix.
Definition: matrix.h:204
Definition: ctu.h:21
CMR_TU_PARAMS tu
Parameters for TU test.
Definition: ctu.h:22
Statistics for recognition algorithm for totally unimodular matrices.
Definition: ctu.h:41
double totalTime
Definition: ctu.h:43
uint32_t totalCount
Definition: ctu.h:42
CMR_TU_STATS tu
Definition: ctu.h:44
Definition: env_internal.h:45
Definition: tu.h:29
Statistics for recognition algorithm for totally unimodular matrices.
Definition: tu.h:51
Recognition of totally unimodular matrices.