CMR  1.3.0
matrix_internal.h
Go to the documentation of this file.
1 #ifndef CMR_MATRIX_INTERNAL_H
2 #define CMR_MATRIX_INTERNAL_H
3 
4 #include <cmr/matrix.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
14 typedef struct
15 {
16  size_t numRows;
17  size_t numColumns;
18  size_t numNonzeros;
19  size_t * rowSlice;
20  size_t* entryColumns;
21  void* entryValues;
22 } CMR_MATRIX;
23 
29  CMR* cmr,
30  CMR_SUBMAT* submatrix
31 );
32 
39  CMR* cmr,
40  CMR_CHRMAT* matrix,
41  size_t numRows,
42  size_t* rows,
43  size_t numColumns,
44  size_t* columns,
45  CMR_CHRMAT** presult
46 );
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* CMR_MATRIX_INTERNAL_H */
CMR_ERROR
Type for return codes of library functions.
Definition: env.h:32
Functionality for sparse matrices.
CMR_ERROR CMRsortSubmatrix(CMR *cmr, CMR_SUBMAT *submatrix)
Sorts the row and column indices of submatrix.
Definition: matrix.c:271
CMR_ERROR CMRchrmatFilter(CMR *cmr, CMR_CHRMAT *matrix, size_t numRows, size_t *rows, size_t numColumns, size_t *columns, CMR_CHRMAT **presult)
Creates a numRows numColumns submatrix of the char matrix indexed by rows and columns.
Row-wise representation of sparse char matrix.
Definition: matrix.h:220
Definition: env_internal.h:45
Abstract struct for row-wise representations of sparse matrices.
Definition: matrix_internal.h:15
size_t numColumns
Number of columns.
Definition: matrix_internal.h:17
size_t * entryColumns
Array mapping each entry to its column.
Definition: matrix_internal.h:20
size_t * rowSlice
Array mapping each row to the index of its first entry.
Definition: matrix_internal.h:19
size_t numRows
Number of rows.
Definition: matrix_internal.h:16
void * entryValues
Array mapping each entry to its value.
Definition: matrix_internal.h:21
size_t numNonzeros
Number of and memory allocated for nonzeros.
Definition: matrix_internal.h:18
Row and column indices for a submatrix.
Definition: matrix.h:28