1 #ifndef CMR_LISTMATRIX_INTERNAL_H
2 #define CMR_LISTMATRIX_INTERNAL_H
12 #if defined(CMR_WITH_GMP)
127 #if defined(CMR_WITH_GMP)
133 typedef struct _ListMatGMPNonzero
135 struct _ListMatGMPNonzero* left;
136 struct _ListMatGMPNonzero* right;
137 struct _ListMatGMPNonzero* above;
138 struct _ListMatGMPNonzero* below;
151 ListMatGMPNonzero head;
170 ListMatGMPElement* rowElements;
173 ListMatGMPElement* columnElements;
176 ListMatGMPNonzero anchor;
178 ListMatGMPNonzero* nonzeros;
179 ListMatGMPNonzero* firstFreeNonzero;
208 #if defined(CMR_WITH_GMP)
242 #if defined(CMR_WITH_GMP)
250 ListMatGMP** plistmatrix
277 #if defined(CMR_WITH_GMP)
285 ListMatGMP* listmatrix,
312 #if defined(CMR_WITH_GMP)
318 CMR_ERROR CMRlistmatGMPInitializeFromIntMatrix(
320 ListMatGMP* listmatrix,
348 #if defined(CMR_WITH_GMP)
354 CMR_ERROR CMRlistmatGMPInitializeFromDoubleMatrix(
356 ListMatGMP* listmatrix,
385 #if defined(CMR_WITH_GMP)
391 CMR_ERROR CMRlistmatGMPInitializeFromIntSubmatrix(
393 ListMatGMP* listmatrix,
422 #if defined(CMR_WITH_GMP)
428 CMR_ERROR CMRlistmatGMPInitializeFromIntSubmatrixComplement(
430 ListMatGMP* listmatrix,
457 #if defined(CMR_WITH_GMP)
465 ListMatGMP* listmatrix,
484 ptrdiff_t* pmemoryShift
500 ptrdiff_t* pmemoryShift
503 #if defined(CMR_WITH_GMP)
513 ListMatGMP* listmatrix,
518 ptrdiff_t* pmemoryShift
543 #if defined(CMR_WITH_GMP)
551 ListMatGMP* listmatrix,
552 ListMatGMPNonzero* nz
Basic functionality of the software library.
CMR_ERROR
Type for return codes of library functions.
Definition: env.h:32
struct _ListMat8Nonzero ListMat8Nonzero
Nonzero of a ListMat8.
struct _ListMat64Nonzero ListMat64Nonzero
Nonzero of a ListMat64.
CMR_ERROR CMRlistmat64InitializeFromIntSubmatrixComplement(CMR *cmr, ListMat64 *listmatrix, CMR_INTMAT *matrix, CMR_SUBMAT *submatrix)
Copies all but submatrix of matrix into listmatrix.
Definition: listmatrix.c:1252
CMR_ERROR CMRlistmat64Free(CMR *cmr, ListMat64 **plistmatrix)
Frees a 64-bit list matrix.
Definition: listmatrix.c:110
CMR_ERROR CMRlistmat8InitializeFromDoubleMatrix(CMR *cmr, ListMat8 *listmatrix, CMR_DBLMAT *matrix, double epsilon)
Copies matrix into listmatrix.
Definition: listmatrix.c:699
CMR_ERROR CMRlistmat8InitializeFromSubmatrixComplement(CMR *cmr, ListMat8 *listmatrix, CMR_CHRMAT *matrix, CMR_SUBMAT *submatrix)
Copies all but submatrix of matrix into listmatrix.
CMR_ERROR CMRlistmat8InitializeFromChrMatrix(CMR *cmr, ListMat8 *listmatrix, CMR_CHRMAT *matrix)
Copies matrix into listmatrix.
Definition: listmatrix.c:485
CMR_ERROR CMRlistmat8PrintDense(CMR *cmr, ListMat8 *listmatrix, FILE *stream)
Prints the 8-bit list matrix as a dense matrix.
Definition: listmatrix.c:1406
CMR_ERROR CMRlistmat64PrintDense(CMR *cmr, ListMat64 *listmatrix, FILE *stream)
Prints the 64-bit list matrix as a dense matrix.
Definition: listmatrix.c:1439
CMR_ERROR CMRlistmat64InitializeFromDoubleMatrix(CMR *cmr, ListMat64 *listmatrix, CMR_DBLMAT *matrix, double epsilon)
Copies matrix into listmatrix.
Definition: listmatrix.c:777
CMR_ERROR CMRlistmat8Alloc(CMR *cmr, size_t memRows, size_t memColumns, size_t memNonzeros, ListMat8 **presult)
Allocates memory for an 8-bit list matrix.
Definition: listmatrix.c:9
CMR_ERROR CMRlistmat64InitializeFromIntSubmatrix(CMR *cmr, ListMat64 *listmatrix, CMR_INTMAT *matrix, CMR_SUBMAT *submatrix)
Copies submatrix of matrix into listmatrix.
Definition: listmatrix.c:1017
CMR_ERROR CMRlistmat8Free(CMR *cmr, ListMat8 **plistmatrix)
Frees an 8-bit list matrix.
Definition: listmatrix.c:93
CMR_ERROR CMRlistmat64Delete(CMR *cmr, ListMat64 *listmatrix, ListMat64Nonzero *nz)
Delete a nonzero element.
Definition: listmatrix.c:1860
CMR_ERROR CMRlistmat8InitializeZero(CMR *cmr, ListMat8 *listmatrix, size_t numRows, size_t numColumns)
Initializes a zero 8-bit list matrix.
Definition: listmatrix.c:151
CMR_ERROR CMRlistmat64Alloc(CMR *cmr, size_t memRows, size_t memColumns, size_t memNonzeros, ListMat64 **presult)
Allocates memory for a 64-bit list matrix.
Definition: listmatrix.c:35
CMR_ERROR CMRlistmat64Insert(CMR *cmr, ListMat64 *listmatrix, size_t row, size_t column, int64_t value, long special, ptrdiff_t *pmemoryShift)
Creates a new element and inserts it into the doubly-linked lists.
Definition: listmatrix.c:1614
CMR_ERROR CMRlistmat64InitializeFromIntMatrix(CMR *cmr, ListMat64 *listmatrix, CMR_INTMAT *matrix)
Copies matrix into listmatrix.
Definition: listmatrix.c:555
CMR_ERROR CMRlistmat8Delete(CMR *cmr, ListMat8 *listmatrix, ListMat8Nonzero *nz)
Delete a nonzero element.
Definition: listmatrix.c:1833
CMR_ERROR CMRlistmat8Insert(CMR *cmr, ListMat8 *listmatrix, size_t row, size_t column, int8_t value, long special, ptrdiff_t *pmemoryShift)
Creates a new element and inserts it into the doubly-linked lists.
Definition: listmatrix.c:1513
CMR_ERROR CMRlistmat8InitializeFromChrSubmatrix(CMR *cmr, ListMat8 *listmatrix, CMR_CHRMAT *matrix, CMR_SUBMAT *submatrix)
Copies submatrix of matrix into listmatrix.
Definition: listmatrix.c:937
CMR_ERROR CMRlistmat64InitializeZero(CMR *cmr, ListMat64 *listmatrix, size_t numRows, size_t numColumns)
Initializes a zero 64-bit list matrix.
Definition: listmatrix.c:261
Functionality for sparse matrices.
Row-wise representation of sparse char matrix.
Definition: matrix.h:220
Row-wise representation of sparse double matrix.
Definition: matrix.h:172
Definition: env_internal.h:45
Row-wise representation of sparse int matrix.
Definition: matrix.h:196
Row and column indices for a submatrix.
Definition: matrix.h:28
Row/column information of a ListMat64.
Definition: listmatrix.h:95
size_t numNonzeros
Number of nonzeros in that row/column.
Definition: listmatrix.h:97
ListMat64Nonzero head
Dummy nonzero in that row/column.
Definition: listmatrix.h:96
Linked-list representation of a matrix with 64-bit integer values.
Definition: listmatrix.h:112
size_t numRows
Number of rows.
Definition: listmatrix.h:114
size_t numColumns
Number of columns.
Definition: listmatrix.h:117
ListMat64Nonzero * firstFreeNonzero
Beginning of free list; uses right pointers.
Definition: listmatrix.h:124
ListMat64Element * columnElements
Column data.
Definition: listmatrix.h:118
ListMat64Nonzero * nonzeros
Raw nonzero data.
Definition: listmatrix.h:123
size_t memRows
Memory for rows.
Definition: listmatrix.h:113
size_t numNonzeros
Definition: listmatrix.h:120
ListMat64Nonzero anchor
Anchor for nonzeros.
Definition: listmatrix.h:121
size_t memNonzeros
Amount of memory for nonzeros.
Definition: listmatrix.h:122
size_t memColumns
Memory for columns.
Definition: listmatrix.h:116
ListMat64Element * rowElements
Row data.
Definition: listmatrix.h:115
Row/column information of a ListMat8.
Definition: listmatrix.h:41
size_t numNonzeros
Number of nonzeros in that row/column.
Definition: listmatrix.h:43
ListMat8Nonzero head
Dummy nonzero in that row/column.
Definition: listmatrix.h:42
Linked-list representation of a matrix with 8-bit integer values.
Definition: listmatrix.h:58
size_t memColumns
Memory for columns.
Definition: listmatrix.h:62
ListMat8Element * columnElements
Column data.
Definition: listmatrix.h:64
size_t memNonzeros
Amount of memory for nonzeros.
Definition: listmatrix.h:68
ListMat8Nonzero anchor
Anchor for nonzeros.
Definition: listmatrix.h:67
size_t memRows
Memory for rows.
Definition: listmatrix.h:59
size_t numColumns
Number of columns.
Definition: listmatrix.h:63
size_t numNonzeros
Definition: listmatrix.h:66
ListMat8Nonzero * firstFreeNonzero
Beginning of free list; uses right pointers.
Definition: listmatrix.h:70
ListMat8Nonzero * nonzeros
Raw nonzero data.
Definition: listmatrix.h:69
ListMat8Element * rowElements
Row data.
Definition: listmatrix.h:61
size_t numRows
Number of rows.
Definition: listmatrix.h:60
Nonzero of a ListMat64.
Definition: listmatrix.h:79
struct _ListMat64Nonzero * above
Pointer to previous nonzero in the same column.
Definition: listmatrix.h:82
int64_t value
Matrix entry.
Definition: listmatrix.h:86
struct _ListMat64Nonzero * below
Pointer to next nonzero in the same column.
Definition: listmatrix.h:83
long special
May be used for a special purpose.
Definition: listmatrix.h:87
size_t row
Row.
Definition: listmatrix.h:84
size_t column
Column.
Definition: listmatrix.h:85
struct _ListMat64Nonzero * right
Pointer to next nonzero in the same row.
Definition: listmatrix.h:81
struct _ListMat64Nonzero * left
Pointer to previous nonzero in the same row.
Definition: listmatrix.h:80
Nonzero of a ListMat8.
Definition: listmatrix.h:25
struct _ListMat8Nonzero * left
Pointer to previous nonzero in the same row.
Definition: listmatrix.h:26
struct _ListMat8Nonzero * above
Pointer to previous nonzero in the same column.
Definition: listmatrix.h:28
int64_t special
Remaining bits (on 64 bit) may be used for a special purpose.
Definition: listmatrix.h:33
size_t row
Row.
Definition: listmatrix.h:30
struct _ListMat8Nonzero * below
Pointer to next nonzero in the same column.
Definition: listmatrix.h:29
size_t column
Column.
Definition: listmatrix.h:31
int8_t value
Matrix entry.
Definition: listmatrix.h:32
struct _ListMat8Nonzero * right
Pointer to next nonzero in the same row.
Definition: listmatrix.h:27