CMR  1.3.0
graphic.h
Go to the documentation of this file.
1 #ifndef CMR_GRAPHIC_H
2 #define CMR_GRAPHIC_H
3 
17 #include <cmr/env.h>
18 #include <cmr/element.h>
19 #include <cmr/matrix.h>
20 #include <cmr/graph.h>
21 
22 #include <stdio.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 typedef struct
33 {
34  size_t totalCount;
35  double totalTime;
36  size_t checkCount;
37  double checkTime;
38  size_t applyCount;
39  double applyTime;
40  size_t transposeCount;
41  double transposeTime;
43 
48 CMR_EXPORT
51 );
52 
57 CMR_EXPORT
59  FILE* stream,
60  CMR_GRAPHIC_STATISTICS* stats,
61  const char* prefix
62 );
63 
77 CMR_EXPORT
79  CMR* cmr,
80  CMR_GRAPH* graph,
81  CMR_CHRMAT** pmatrix,
82  CMR_CHRMAT** ptranspose,
83  int numForestEdges,
84  CMR_GRAPH_EDGE* forestEdges,
85  int numCoforestEdges,
86  CMR_GRAPH_EDGE* coforestEdges,
87  bool* pisCorrectForest
89 );
90 
110 CMR_EXPORT
112  CMR* cmr,
113  CMR_CHRMAT* matrix,
114  bool* pisGraphic,
115  CMR_GRAPH** pgraph,
116  CMR_GRAPH_EDGE** pforestEdges,
118  CMR_GRAPH_EDGE** pcoforestEdges,
120  CMR_SUBMAT** psubmatrix,
122  CMR_GRAPHIC_STATISTICS* stats,
123  double timeLimit
124 );
125 
141 CMR_EXPORT
143  CMR* cmr,
144  CMR_CHRMAT* matrix,
145  bool* pisCographic,
146  CMR_GRAPH** pgraph,
147  CMR_GRAPH_EDGE** pforestEdges,
149  CMR_GRAPH_EDGE** pcoforestEdges,
151  CMR_SUBMAT** psubmatrix,
153  CMR_GRAPHIC_STATISTICS* stats,
154  double timeLimit
155 );
156 
165 CMR_EXPORT
167  CMR* cmr,
168  CMR_CHRMAT* transpose,
169  size_t* orderedColumns,
170  CMR_SUBMAT** psubmatrix
171 );
172 
175 #ifdef __cplusplus
176 }
177 #endif
178 
179 #endif /* CMR_GRAPHIC_H */
Functionality for the row and column elements of a matrix.
Basic functionality of the software library.
CMR_ERROR
Type for return codes of library functions.
Definition: env.h:27
Functionality for graphs.
CMR_EXPORT CMR_ERROR CMRstatsGraphicPrint(FILE *stream, CMR_GRAPHIC_STATISTICS *stats, const char *prefix)
Prints statistics for graphicness computations.
Definition: graphic.c:45
CMR_EXPORT CMR_ERROR CMRstatsGraphicInit(CMR_GRAPHIC_STATISTICS *stats)
Initializes all statistics for graphicness computations.
Definition: graphic.c:29
CMR_EXPORT CMR_ERROR CMRtestGraphicColumnSubmatrixGreedy(CMR *cmr, CMR_CHRMAT *transpose, size_t *orderedColumns, CMR_SUBMAT **psubmatrix)
Finds an inclusion-wise maximal subset of columns that induces a graphic submatrix.
CMR_EXPORT CMR_ERROR CMRcomputeGraphicMatrix(CMR *cmr, CMR_GRAPH *graph, CMR_CHRMAT **pmatrix, CMR_CHRMAT **ptranspose, int numForestEdges, CMR_GRAPH_EDGE *forestEdges, int numCoforestEdges, CMR_GRAPH_EDGE *coforestEdges, bool *pisCorrectForest)
Computes the graphic matrix of a given graph .
Definition: graphic.c:376
CMR_EXPORT CMR_ERROR CMRtestGraphicMatrix(CMR *cmr, CMR_CHRMAT *matrix, bool *pisGraphic, CMR_GRAPH **pgraph, CMR_GRAPH_EDGE **pforestEdges, CMR_GRAPH_EDGE **pcoforestEdges, CMR_SUBMAT **psubmatrix, CMR_GRAPHIC_STATISTICS *stats, double timeLimit)
Tests a matrix for being a graphic matrix.
Definition: graphic.c:5499
CMR_EXPORT CMR_ERROR CMRtestCographicMatrix(CMR *cmr, CMR_CHRMAT *matrix, bool *pisCographic, CMR_GRAPH **pgraph, CMR_GRAPH_EDGE **pforestEdges, CMR_GRAPH_EDGE **pcoforestEdges, CMR_SUBMAT **psubmatrix, CMR_GRAPHIC_STATISTICS *stats, double timeLimit)
Tests a matrix for being a cographic matrix.
Definition: graphic.c:5257
int CMR_GRAPH_EDGE
Reference to an edge of CMR_GRAPH.
Definition: graph.h:31
Functionality for sparse matrices.
Row-wise representation of sparse char matrix.
Definition: matrix.h:204
Definition: env_internal.h:45
Statistics for graphicness test.
Definition: graphic.h:33
size_t transposeCount
Definition: graphic.h:40
size_t checkCount
Definition: graphic.h:36
double transposeTime
Definition: graphic.h:41
double totalTime
Definition: graphic.h:35
size_t applyCount
Definition: graphic.h:38
double applyTime
Definition: graphic.h:39
size_t totalCount
Definition: graphic.h:34
double checkTime
Definition: graphic.h:37
Definition: graph.h:49
Row and column indices for a submatrix.
Definition: matrix.h:28