CMR  1.3.0
Loading...
Searching...
No Matches
tu.h
Go to the documentation of this file.
1#ifndef CMR_TU_H
2#define CMR_TU_H
3
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include <cmr/env.h>
17#include <cmr/regular.h>
18#include <cmr/matrix.h>
19#include <cmr/camion.h>
20
27
37
44CMR_EXPORT
46 CMR_TU_PARAMS* params
47);
48
66
71CMR_EXPORT
73 CMR_TU_STATS* stats
74);
75
80CMR_EXPORT
82 FILE* stream,
83 CMR_TU_STATS* stats,
84 const char* prefix
85);
86
99CMR_EXPORT
101 CMR* cmr,
102 CMR_CHRMAT* matrix,
103 bool* pisTotallyUnimodular,
104 CMR_SEYMOUR_NODE** proot,
105 CMR_SUBMAT** psubmatrix,
106 CMR_TU_PARAMS* params,
107 CMR_TU_STATS* stats,
108 double timeLimit
109);
110
120CMR_EXPORT
122 CMR* cmr,
123 CMR_SEYMOUR_NODE* dec,
124 CMR_TU_PARAMS* params,
125 CMR_TU_STATS* stats,
126 double timeLimit
127);
128
129#ifdef __cplusplus
130}
131#endif
132
133#endif /* CMR_TU_H */
Testing whether a matrix is Camion-signed.
Basic functionality of the software library.
CMR_ERROR
Type for return codes of library functions.
Definition env.h:32
Functionality for sparse matrices.
Recognition of binary regular matrices.
Statistics for Camion-signing algorithm.
Definition camion.h:26
Row-wise representation of sparse char matrix.
Definition matrix.h:235
Definition env_internal.h:45
Parameters for Seymour decomposition algorithm.
Definition seymour.h:68
Statistics for Seymour decomposition algorithm.
Definition seymour.h:133
Row and column indices for a submatrix.
Definition matrix.h:28
Definition tu.h:29
bool naiveSubmatrix
Whether to use the naive submatrix search instead of a greedy algorithm (default: false).
Definition tu.h:34
bool camionFirst
If ternary is false, then whether to run the Camion test first.
Definition tu.h:33
CMR_SEYMOUR_PARAMS seymour
Parameters for testing via Seymour decomposition.
Definition tu.h:31
CMR_TU_ALGORITHM algorithm
Algorithm to use.
Definition tu.h:30
bool ternary
Whether to create a ternary Seymour decomposition tree (default: true).
Definition tu.h:32
Statistics for recognition algorithm for totally unimodular matrices.
Definition tu.h:54
uint32_t enumerationColumnSubsets
Definition tu.h:59
CMR_SEYMOUR_STATS seymour
Definition tu.h:55
CMR_CAMION_STATISTICS camion
Definition tu.h:56
double partitionTime
Definition tu.h:64
uint32_t partitionRowSubsets
Definition tu.h:62
double enumerationTime
Definition tu.h:60
uint32_t enumerationRowSubsets
Definition tu.h:58
uint32_t partitionColumnSubsets
Definition tu.h:63
Definition seymour_internal.h:18
CMR_EXPORT CMR_ERROR CMRtuParamsInit(CMR_TU_PARAMS *params)
Initializes the default parameters for recognition of totally unimodular matrices.
Definition tu.c:15
CMR_EXPORT CMR_ERROR CMRtuCompleteDecomposition(CMR *cmr, CMR_SEYMOUR_NODE *dec, CMR_TU_PARAMS *params, CMR_TU_STATS *stats, double timeLimit)
Completes a subtree of an existing decomposition tree.
Definition tu.c:725
CMR_TU_ALGORITHM
Definition tu.h:22
@ CMR_TU_ALGORITHM_PARTITION
Enumeration algorithm based on criterion of Ghouila-Houri.
Definition tu.h:25
@ CMR_TU_ALGORITHM_EULERIAN
Enumeration algorithm based on Eulerian submatrices.
Definition tu.h:24
@ CMR_TU_ALGORITHM_DECOMPOSITION
Algorithm based on Seymour's decomposition of regular matroids.
Definition tu.h:23
CMR_EXPORT CMR_ERROR CMRtuStatsInit(CMR_TU_STATS *stats)
Initializes all statistics for recognition algorithm for totally unimodular matrices.
Definition tu.c:28
CMR_EXPORT CMR_ERROR CMRtuTest(CMR *cmr, CMR_CHRMAT *matrix, bool *pisTotallyUnimodular, CMR_SEYMOUR_NODE **proot, CMR_SUBMAT **psubmatrix, CMR_TU_PARAMS *params, CMR_TU_STATS *stats, double timeLimit)
Tests a matrix for being totally unimodular.
Definition tu.c:624
CMR_EXPORT CMR_ERROR CMRtuStatsPrint(FILE *stream, CMR_TU_STATS *stats, const char *prefix)
Prints statistics for recognition algorithm for totally unimodular matrices.
Definition tu.c:46