CMR  1.3.0
camion.h
Go to the documentation of this file.
1 #ifndef CMR_CAMION_H
2 #define CMR_CAMION_H
3 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include <cmr/matrix.h>
17 #include <cmr/graph.h>
18 
19 #include <stdint.h>
20 
25 typedef struct
26 {
27  uint32_t generalCount;
28  double generalTime;
29  uint32_t graphCount;
30  double graphTime;
31  uint32_t totalCount;
32  double totalTime;
34 
39 CMR_EXPORT
41  CMR_CAMION_STATISTICS* stats
42 );
43 
48 CMR_EXPORT
50  FILE* stream,
51  CMR_CAMION_STATISTICS* stats,
52  const char* prefix
53 );
54 
55 
60 CMR_EXPORT
62  CMR* cmr,
63  CMR_CHRMAT* matrix,
64  bool* pisCamionSigned,
65  CMR_SUBMAT** psubmatrix,
66  CMR_CAMION_STATISTICS* stats,
67  double timeLimit
68 );
69 
74 CMR_EXPORT
76  CMR* cmr,
77  CMR_CHRMAT* matrix,
78  bool* pwasCamionSigned,
79  CMR_SUBMAT** psubmatrix,
80  CMR_CAMION_STATISTICS* stats,
81  double timeLimit
82 );
83 
84 
97 CMR_EXPORT
99  CMR* cmr,
100  CMR_CHRMAT* matrix,
101  CMR_GRAPH* cograph,
102  CMR_GRAPH_EDGE* forestEdges,
103  CMR_GRAPH_EDGE* coforestEdges,
104  bool* arcsReversed,
106  bool* pisCamionSigned,
107  CMR_SUBMAT** psubmatrix,
108  CMR_CAMION_STATISTICS* stats
109 );
110 
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif /* CMR_CAMION_H */
CMR_EXPORT CMR_ERROR CMRcamionStatsPrint(FILE *stream, CMR_CAMION_STATISTICS *stats, const char *prefix)
Prints statistics for Camion-signing algorithm.
Definition: camion.c:33
CMR_EXPORT CMR_ERROR CMRcamionCographicOrient(CMR *cmr, CMR_CHRMAT *matrix, CMR_GRAPH *cograph, CMR_GRAPH_EDGE *forestEdges, CMR_GRAPH_EDGE *coforestEdges, bool *arcsReversed, bool *pisCamionSigned, CMR_SUBMAT **psubmatrix, CMR_CAMION_STATISTICS *stats)
Orients the edges of the graph cograph such that the matrix matrix is the corresponding network matr...
Definition: camion.c:595
CMR_EXPORT CMR_ERROR CMRcamionTestSigns(CMR *cmr, CMR_CHRMAT *matrix, bool *pisCamionSigned, CMR_SUBMAT **psubmatrix, CMR_CAMION_STATISTICS *stats, double timeLimit)
Tests a matrix for being a Camion-signed.
Definition: camion.c:479
CMR_EXPORT CMR_ERROR CMRcamionComputeSigns(CMR *cmr, CMR_CHRMAT *matrix, bool *pwasCamionSigned, CMR_SUBMAT **psubmatrix, CMR_CAMION_STATISTICS *stats, double timeLimit)
Computes a Camion-signed version of a given ternary matrix .
Definition: camion.c:485
CMR_EXPORT CMR_ERROR CMRcamionStatsInit(CMR_CAMION_STATISTICS *stats)
Initializes all statistics for Camion-signing algorithm.
Definition: camion.c:19
CMR_ERROR
Type for return codes of library functions.
Definition: env.h:32
Functionality for graphs.
int CMR_GRAPH_EDGE
Reference to an edge of CMR_GRAPH.
Definition: graph.h:31
Functionality for sparse matrices.
Statistics for Camion-signing algorithm.
Definition: camion.h:26
uint32_t totalCount
Definition: camion.h:31
double totalTime
Definition: camion.h:32
double generalTime
Definition: camion.h:28
uint32_t graphCount
Definition: camion.h:29
uint32_t generalCount
Definition: camion.h:27
double graphTime
Definition: camion.h:30
Row-wise representation of sparse char matrix.
Definition: matrix.h:204
Definition: env_internal.h:45
Definition: graph.h:49
Row and column indices for a submatrix.
Definition: matrix.h:28