CMR  1.3.0
Loading...
Searching...
No Matches
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#include <stdint.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33typedef struct
34{
35 uint32_t totalCount;
36 double totalTime;
37 uint32_t checkCount;
38 double checkTime;
39 uint32_t applyCount;
40 double applyTime;
41 uint32_t transposeCount;
44
49CMR_EXPORT
52);
53
58CMR_EXPORT
60 FILE* stream,
62 const char* prefix
63);
64
78CMR_EXPORT
80 CMR* cmr,
81 CMR_GRAPH* graph,
82 CMR_CHRMAT** pmatrix,
83 CMR_CHRMAT** ptranspose,
84 int numForestEdges,
85 CMR_GRAPH_EDGE* forestEdges,
86 int numCoforestEdges,
87 CMR_GRAPH_EDGE* coforestEdges,
88 bool* pisCorrectForest
90);
91
111CMR_EXPORT
113 CMR* cmr,
114 CMR_CHRMAT* matrix,
115 bool* pisGraphic,
116 CMR_GRAPH** pgraph,
117 CMR_GRAPH_EDGE** pforestEdges,
119 CMR_GRAPH_EDGE** pcoforestEdges,
121 CMR_SUBMAT** psubmatrix,
124 double timeLimit
125);
126
142CMR_EXPORT
144 CMR* cmr,
145 CMR_CHRMAT* matrix,
146 bool* pisCographic,
147 CMR_GRAPH** pgraph,
148 CMR_GRAPH_EDGE** pforestEdges,
150 CMR_GRAPH_EDGE** pcoforestEdges,
152 CMR_SUBMAT** psubmatrix,
155 double timeLimit
156);
157
166CMR_EXPORT
168 CMR* cmr,
169 CMR_CHRMAT* transpose,
170 size_t* orderedColumns,
171 CMR_SUBMAT** psubmatrix
172);
173
174#ifdef __cplusplus
175}
176#endif
177
178#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:32
Functionality for graphs.
CMR_EXPORT CMR_ERROR CMRgraphicStatsPrint(FILE *stream, CMR_GRAPHIC_STATISTICS *stats, const char *prefix)
Prints statistics for graphicness computations.
Definition graphic.c:45
CMR_EXPORT CMR_ERROR CMRgraphicStatsInit(CMR_GRAPHIC_STATISTICS *stats)
Initializes all statistics for graphicness computations.
Definition graphic.c:29
CMR_EXPORT CMR_ERROR CMRgraphicTestTranspose(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:5448
CMR_EXPORT CMR_ERROR CMRgraphicTestMatrix(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:5530
CMR_EXPORT CMR_ERROR CMRgraphicTestColumnSubmatrixGreedy(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 CMRgraphicComputeMatrix(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:378
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:235
Definition env_internal.h:45
Statistics for graphicness test.
Definition graphic.h:34
uint32_t checkCount
Definition graphic.h:37
double transposeTime
Definition graphic.h:42
double totalTime
Definition graphic.h:36
uint32_t totalCount
Definition graphic.h:35
uint32_t transposeCount
Definition graphic.h:41
double applyTime
Definition graphic.h:40
uint32_t applyCount
Definition graphic.h:39
double checkTime
Definition graphic.h:38
Definition graph.h:49
Row and column indices for a submatrix.
Definition matrix.h:28