167 size_t* pnumMatrixRows,
168 size_t* pnumMatrixColumns,
325 size_t newNumNonzeros
336 size_t newNumNonzeros
347 size_t newNumNonzeros
606 const char* fileName,
607 const char* stdinName,
621 const char* fileName,
622 const char* stdinName,
636 const char* fileName,
637 const char* stdinName,
690 const char* fileName,
691 const char* stdinName,
705 const char* fileName,
706 const char* stdinName,
720 const char* fileName,
721 const char* stdinName,
Basic functionality of the software library.
CMR_ERROR
Type for return codes of library functions.
Definition env.h:32
CMR_EXPORT CMR_ERROR CMRchrmatToInt(CMR *cmr, CMR_CHRMAT *matrix, CMR_INTMAT **presult)
Converts a char matrix to an int matrix.
Definition matrix.c:2706
CMR_EXPORT CMR_ERROR CMRchrmatCreateFromDenseFile(CMR *cmr, const char *fileName, const char *stdinName, CMR_CHRMAT **presult)
Reads a char matrix from a file name fileName in dense format.
Definition matrix.c:1763
CMR_EXPORT CMR_ERROR CMRdblmatSupport(CMR *cmr, CMR_DBLMAT *matrix, double epsilon, CMR_CHRMAT **presult)
Creates the (binary) support matrix of a double matrix as a char matrix with absolute error tolerance...
Definition matrix.c:2509
CMR_EXPORT CMR_ERROR CMRdblmatSlice(CMR *cmr, CMR_DBLMAT *matrix, CMR_SUBMAT *submatrix, CMR_DBLMAT **presult)
Slices a submatrix of a double matrix.
Definition matrix.c:2302
CMR_EXPORT CMR_ERROR CMRintmatSupport(CMR *cmr, CMR_INTMAT *matrix, CMR_CHRMAT **presult)
Creates the (binary) support matrix of an int matrix as a char matrix.
Definition matrix.c:2541
CMR_EXPORT CMR_ERROR CMRchrmatPrintDense(CMR *cmr, CMR_CHRMAT *matrix, FILE *stream, char zeroChar, bool header)
Prints a char matrix in dense format.
Definition matrix.c:1001
CMR_EXPORT CMR_ERROR CMRdblmatSignedSupport(CMR *cmr, CMR_DBLMAT *matrix, double epsilon, CMR_CHRMAT **presult)
Creates the (ternary) signed support matrix of a double matrix as a char matrix with absolute error t...
Definition matrix.c:2611
CMR_EXPORT CMR_ERROR CMRsubmatFree(CMR *cmr, CMR_SUBMAT **psubmatrix)
Frees a submatrix.
Definition matrix.c:61
CMR_EXPORT CMR_ERROR CMRintmatCreateFromDenseStream(CMR *cmr, FILE *stream, CMR_INTMAT **presult)
Reads an int matrix from a file stream in dense format.
Definition matrix.c:1553
CMR_EXPORT bool CMRdblmatIsBinary(CMR *cmr, CMR_DBLMAT *matrix, double epsilon, CMR_SUBMAT **psubmatrix)
Checks if a double matrix has only entries in with absolute error tolerance epsilon.
Definition matrix.c:2150
CMR_EXPORT bool CMRintmatCheckEqual(CMR_INTMAT *matrix1, CMR_INTMAT *matrix2)
Checks whether two int matrices are equal.
Definition matrix.c:1830
CMR_EXPORT CMR_ERROR CMRchrmatCheckTranspose(CMR *cmr, CMR_CHRMAT *matrix1, CMR_CHRMAT *matrix2, bool *pareTranspose)
Checks whether two char matrices are transposes of each other.
Definition matrix.c:1988
CMR_EXPORT CMR_ERROR CMRintmatFindEntry(CMR_INTMAT *matrix, size_t row, size_t column, size_t *pentry)
Finds a specific entry of an int matrix.
Definition matrix.c:2808
CMR_EXPORT char * CMRintmatConsistency(CMR_INTMAT *matrix)
Checks an int matrix for consistency.
Definition matrix.c:2066
CMR_EXPORT CMR_ERROR CMRdblmatToChr(CMR *cmr, CMR_DBLMAT *matrix, double epsilon, CMR_CHRMAT **presult)
Converts a double matrix to a char matrix.
Definition matrix.c:2752
CMR_EXPORT CMR_ERROR CMRdblmatCreate(CMR *cmr, CMR_DBLMAT **presult, int numRows, int numColumns, int numNonzeros)
Creates a double matrix of with numRows rows, numColumns columns and numNonzeros nonzeros....
Definition matrix.c:297
CMR_EXPORT CMR_ERROR CMRchrmatPermute(CMR *cmr, CMR_CHRMAT *matrix, size_t *rows, size_t *columns, CMR_CHRMAT **presult)
Creates the char matrix obtained from matrix by applying row- and column-permutations.
Definition matrix.c:811
CMR_EXPORT CMR_ERROR CMRdblmatCreateFromSparseFile(CMR *cmr, const char *fileName, const char *stdinName, CMR_DBLMAT **presult)
Reads a double matrix from a file name fileName in sparse format.
Definition matrix.c:1385
CMR_EXPORT CMR_ERROR CMRintmatPrintDense(CMR *cmr, CMR_INTMAT *matrix, FILE *stream, char zeroChar, bool header)
Prints an int matrix in dense format.
Definition matrix.c:959
CMR_EXPORT CMR_ERROR CMRintmatToChr(CMR *cmr, CMR_INTMAT *matrix, CMR_CHRMAT **presult)
Converts an int matrix to a char matrix.
Definition matrix.c:2727
CMR_EXPORT bool CMRdblmatIsTernary(CMR *cmr, CMR_DBLMAT *matrix, double epsilon, CMR_SUBMAT **psubmatrix)
Checks if a double matrix has only entries in with absolute error tolerance epsilon.
Definition matrix.c:2226
CMR_EXPORT CMR_ERROR CMRchrmatSignedSupport(CMR *cmr, CMR_CHRMAT *matrix, CMR_CHRMAT **presult)
Creates the (ternary) signed support matrix of a char matrix as a char matrix.
Definition matrix.c:2678
CMR_EXPORT CMR_ERROR CMRchrmatSupport(CMR *cmr, CMR_CHRMAT *matrix, CMR_CHRMAT **presult)
Creates the (binary) support matrix of a char matrix as a char matrix.
Definition matrix.c:2569
CMR_EXPORT CMR_ERROR CMRintmatSortNonzeros(CMR *cmr, CMR_INTMAT *matrix)
Sorts the nonzeros of an int matrix by column in ascending order.
Definition matrix.c:493
CMR_EXPORT CMR_ERROR CMRsubmatCreate1x1(CMR *cmr, size_t row, size_t column, CMR_SUBMAT **psubmatrix)
Creates a 1-by-1 submatrix.
Definition matrix.c:34
CMR_EXPORT bool CMRchrmatIsBinary(CMR *cmr, CMR_CHRMAT *matrix, CMR_SUBMAT **psubmatrix)
Checks if a char matrix has only entries in .
Definition matrix.c:2201
CMR_EXPORT CMR_ERROR CMRintmatCheckTranspose(CMR *cmr, CMR_INTMAT *matrix1, CMR_INTMAT *matrix2, bool *pareTranspose)
Checks whether two int matrices are transposes of each other.
Definition matrix.c:1944
CMR_EXPORT CMR_ERROR CMRchrmatFindEntry(CMR_CHRMAT *matrix, size_t row, size_t column, size_t *pentry)
Finds a specific entry of a char matrix.
Definition matrix.c:2834
CMR_EXPORT CMR_ERROR CMRchrmatPrintSparse(CMR *cmr, CMR_CHRMAT *matrix, FILE *stream)
Prints a char matrix in sparse format.
Definition matrix.c:897
CMR_EXPORT CMR_ERROR CMRintmatPermute(CMR *cmr, CMR_INTMAT *matrix, size_t *rows, size_t *columns, CMR_INTMAT **presult)
Creates the int matrix obtained from matrix by applying row- and column-permutations.
Definition matrix.c:765
CMR_EXPORT CMR_ERROR CMRsubmatCreate2x2(CMR *cmr, size_t row1, size_t row2, size_t column1, size_t column2, CMR_SUBMAT **psubmatrix)
Creates a 2-by-2 submatrix.
Definition matrix.c:46
CMR_EXPORT CMR_ERROR CMRintmatChangeNumNonzeros(CMR *cmr, CMR_INTMAT *matrix, size_t newNumNonzeros)
Changes the number of nonzeros and reallocates corresponding arrays.
Definition matrix.c:444
CMR_EXPORT CMR_ERROR CMRchrmatSlice(CMR *cmr, CMR_CHRMAT *matrix, CMR_SUBMAT *submatrix, CMR_CHRMAT **presult)
Slices a submatrix of a char matrix.
Definition matrix.c:2440
CMR_EXPORT CMR_ERROR CMRdblmatFree(CMR *cmr, CMR_DBLMAT **pmatrix)
Frees the memory of a double matrix.
Definition matrix.c:366
CMR_EXPORT CMR_ERROR CMRdblmatPrintDense(CMR *cmr, CMR_DBLMAT *matrix, FILE *stream, char zeroChar, bool header)
Prints a double matrix in dense format.
Definition matrix.c:917
CMR_EXPORT bool CMRintmatIsTernary(CMR *cmr, CMR_INTMAT *matrix, CMR_SUBMAT **psubmatrix)
Checks if an int matrix has only entries in .
Definition matrix.c:2252
CMR_EXPORT CMR_ERROR CMRintmatCopy(CMR *cmr, CMR_INTMAT *matrix, CMR_INTMAT **presult)
Copies an int matrix to a newly allocated one.
Definition matrix.c:547
CMR_EXPORT CMR_ERROR CMRchrmatCreateFromSparseStream(CMR *cmr, FILE *stream, CMR_CHRMAT **presult)
Reads a char matrix from a file stream in sparse format.
Definition matrix.c:1300
CMR_EXPORT CMR_ERROR CMRdblmatCreateFromDenseFile(CMR *cmr, const char *fileName, const char *stdinName, CMR_DBLMAT **presult)
Reads a double matrix from a file name fileName in dense format.
Definition matrix.c:1699
CMR_EXPORT bool CMRchrmatIsTernary(CMR *cmr, CMR_CHRMAT *matrix, CMR_SUBMAT **psubmatrix)
Checks if a double matrix has only entries in .
Definition matrix.c:2277
CMR_EXPORT CMR_ERROR CMRchrmatTranspose(CMR *cmr, CMR_CHRMAT *matrix, CMR_CHRMAT **presult)
Creates the transpose of a char matrix.
Definition matrix.c:675
CMR_EXPORT CMR_ERROR CMRsubmatSlice(CMR *cmr, CMR_SUBMAT *base, CMR_SUBMAT *input, CMR_SUBMAT **poutput)
Returns the submatrix input as a submatrix of the base submatrix.
Definition matrix.c:92
CMR_EXPORT char * CMRdblmatConsistency(CMR_DBLMAT *matrix)
Checks a double matrix for consistency.
Definition matrix.c:2032
CMR_EXPORT CMR_ERROR CMRchrmatCreate(CMR *cmr, CMR_CHRMAT **presult, int numRows, int numColumns, int numNonzeros)
Creates a char matrix of with numRows rows, numColumns columns and numNonzeros nonzeros....
Definition matrix.c:344
CMR_EXPORT CMR_ERROR CMRdblmatFindBinarySubmatrix(CMR *cmr, CMR_DBLMAT *matrix, double epsilon, CMR_SUBMAT **psubmatrix)
Finds a large binary submatrix with absolute error tolerance epsilon.
Definition matrix.c:2985
CMR_EXPORT CMR_ERROR CMRintmatCreate(CMR *cmr, CMR_INTMAT **presult, int numRows, int numColumns, int numNonzeros)
Creates an int matrix of with numRows rows, numColumns columns and numNonzeros nonzeros....
Definition matrix.c:321
CMR_EXPORT CMR_ERROR CMRchrmatChangeNumNonzeros(CMR *cmr, CMR_CHRMAT *matrix, size_t newNumNonzeros)
Changes the number of nonzeros and reallocates corresponding arrays.
Definition matrix.c:456
CMR_EXPORT CMR_ERROR CMRdblmatFindTernarySubmatrix(CMR *cmr, CMR_DBLMAT *matrix, double epsilon, CMR_SUBMAT **psubmatrix)
Finds a large ternary submatrix with absolute error tolerance epsilon.
Definition matrix.c:3013
CMR_EXPORT CMR_ERROR CMRchrmatFree(CMR *cmr, CMR_CHRMAT **pmatrix)
Frees the memory of a char matrix.
Definition matrix.c:410
CMR_EXPORT CMR_ERROR CMRchrmatCreateFromSparseFile(CMR *cmr, const char *fileName, const char *stdinName, CMR_CHRMAT **presult)
Reads a char matrix from a file name fileName in sparse format.
Definition matrix.c:1449
CMR_EXPORT CMR_ERROR CMRintmatPrintSparse(CMR *cmr, CMR_INTMAT *matrix, FILE *stream)
Prints an int matrix in sparse format.
Definition matrix.c:877
CMR_EXPORT char * CMRchrmatConsistency(CMR_CHRMAT *matrix)
Checks a char matrix for consistency.
Definition matrix.c:2108
CMR_EXPORT bool CMRdblmatCheckEqual(CMR_DBLMAT *matrix1, CMR_DBLMAT *matrix2)
Checks whether two double matrices are equal.
Definition matrix.c:1795
CMR_EXPORT CMR_ERROR CMRintmatCreateFromDenseFile(CMR *cmr, const char *fileName, const char *stdinName, CMR_INTMAT **presult)
Reads an int matrix from a file name fileName in dense format.
Definition matrix.c:1731
CMR_EXPORT CMR_ERROR CMRintmatSignedSupport(CMR *cmr, CMR_INTMAT *matrix, CMR_CHRMAT **presult)
Creates the (ternary) signed support matrix of an int matrix as a char matrix.
Definition matrix.c:2650
CMR_EXPORT CMR_ERROR CMRdblmatTranspose(CMR *cmr, CMR_DBLMAT *matrix, CMR_DBLMAT **presult)
Creates the transpose of a double matrix.
Definition matrix.c:587
CMR_EXPORT CMR_ERROR CMRsubmatUnslice(CMR *cmr, CMR_SUBMAT *base, CMR_SUBMAT *input, CMR_SUBMAT **poutput)
Returns the sub-submatrix input of base as a submatrix of its parent.
Definition matrix.c:168
CMR_EXPORT CMR_ERROR CMRchrmatCopy(CMR *cmr, CMR_CHRMAT *matrix, CMR_CHRMAT **presult)
Copies a char matrix to a newly allocated one.
Definition matrix.c:567
CMR_EXPORT CMR_ERROR CMRchrmatCreateFromDenseStream(CMR *cmr, FILE *stream, CMR_CHRMAT **presult)
Reads a char matrix from a file stream in dense format.
Definition matrix.c:1626
CMR_EXPORT CMR_ERROR CMRintmatTranspose(CMR *cmr, CMR_INTMAT *matrix, CMR_INTMAT **presult)
Creates the transpose of an int matrix.
Definition matrix.c:631
CMR_EXPORT CMR_ERROR CMRdblmatCopy(CMR *cmr, CMR_DBLMAT *matrix, CMR_DBLMAT **presult)
Copies a double matrix to a newly allocated one.
Definition matrix.c:527
CMR_EXPORT CMR_ERROR CMRintmatCreateFromSparseStream(CMR *cmr, FILE *stream, CMR_INTMAT **presult)
Reads an int matrix from a file stream in sparse format.
Definition matrix.c:1193
CMR_EXPORT CMR_ERROR CMRintmatFree(CMR *cmr, CMR_INTMAT **pmatrix)
Frees the memory of an int matrix.
Definition matrix.c:388
CMR_EXPORT CMR_ERROR CMRsubmatTranspose(CMR_SUBMAT *submatrix)
Transposes a submatrix.
Definition matrix.c:77
CMR_EXPORT CMR_ERROR CMRdblmatPrintSparse(CMR *cmr, CMR_DBLMAT *matrix, FILE *stream)
Prints a double matrix in sparse format.
Definition matrix.c:857
CMR_EXPORT CMR_ERROR CMRdblmatCheckTranspose(CMR *cmr, CMR_DBLMAT *matrix1, CMR_DBLMAT *matrix2, bool *pareTranspose)
Checks whether two double matrices are transposes of each other.
Definition matrix.c:1900
CMR_EXPORT CMR_ERROR CMRdblmatCreateFromDenseStream(CMR *cmr, FILE *stream, CMR_DBLMAT **presult)
Reads a double matrix from a file stream in dense format.
Definition matrix.c:1481
CMR_EXPORT CMR_ERROR CMRsubmatReadFromStream(CMR *cmr, CMR_SUBMAT **psubmatrix, size_t *pnumMatrixRows, size_t *pnumMatrixColumns, FILE *stream)
Reads the submatrix *psubmatrix from the file stream.
Definition matrix.c:230
CMR_EXPORT CMR_ERROR CMRsubmatWriteToFile(CMR *cmr, CMR_SUBMAT *submatrix, size_t numRows, size_t numColumns, const char *fileName)
Writes the submatrix submatrix to the file fileName by means of lists of row and column indices.
Definition matrix.c:207
CMR_EXPORT CMR_ERROR CMRdblmatFindEntry(CMR_DBLMAT *matrix, size_t row, size_t column, size_t *pentry)
Finds a specific entry of a double matrix.
Definition matrix.c:2782
CMR_EXPORT CMR_ERROR CMRdblmatSortNonzeros(CMR *cmr, CMR_DBLMAT *matrix)
Sorts the nonzeros of a double matrix by column in ascending order.
Definition matrix.c:476
CMR_EXPORT CMR_ERROR CMRchrmatSortNonzeros(CMR *cmr, CMR_CHRMAT *matrix)
Sorts the nonzeros of a char matrix by column in ascending order.
Definition matrix.c:509
CMR_EXPORT CMR_ERROR CMRdblmatCreateFromSparseStream(CMR *cmr, FILE *stream, CMR_DBLMAT **presult)
Reads a double matrix from a file stream in sparse format.
Definition matrix.c:1086
CMR_EXPORT CMR_ERROR CMRintmatSlice(CMR *cmr, CMR_INTMAT *matrix, CMR_SUBMAT *submatrix, CMR_INTMAT **presult)
Slices a submatrix of an int matrix.
Definition matrix.c:2371
CMR_EXPORT CMR_ERROR CMRdblmatChangeNumNonzeros(CMR *cmr, CMR_DBLMAT *matrix, size_t newNumNonzeros)
Changes the number of nonzeros and reallocates corresponding arrays.
Definition matrix.c:432
CMR_EXPORT CMR_ERROR CMRsubmatCreate(CMR *cmr, size_t numRows, size_t numColumns, CMR_SUBMAT **psubmatrix)
Creates a submatrix of given size.
Definition matrix.c:17
CMR_EXPORT CMR_ERROR CMRdblmatPermute(CMR *cmr, CMR_DBLMAT *matrix, size_t *rows, size_t *columns, CMR_DBLMAT **presult)
Creates the double matrix obtained from matrix by applying row- and column-permutations.
Definition matrix.c:719
CMR_EXPORT bool CMRintmatIsBinary(CMR *cmr, CMR_INTMAT *matrix, CMR_SUBMAT **psubmatrix)
Checks if an int matrix has only entries in .
Definition matrix.c:2176
CMR_EXPORT bool CMRchrmatCheckEqual(CMR_CHRMAT *matrix1, CMR_CHRMAT *matrix2)
Checks whether two char matrices are equal.
Definition matrix.c:1865
CMR_EXPORT CMR_ERROR CMRintmatCreateFromSparseFile(CMR *cmr, const char *fileName, const char *stdinName, CMR_INTMAT **presult)
Reads an int matrix from a file name fileName in sparse format.
Definition matrix.c:1417
CMR_EXPORT CMR_ERROR CMRsubmatPrint(CMR *cmr, CMR_SUBMAT *submatrix, size_t numRows, size_t numColumns, FILE *stream)
Writes the submatrix submatrix to the file stream by means of lists of row and column indices.
Definition matrix.c:188
Row-wise representation of sparse char matrix.
Definition matrix.h:235
size_t * rowSlice
Array mapping each row to the index of its first entry.
Definition matrix.h:239
size_t * entryColumns
Array mapping each entry to its column.
Definition matrix.h:240
char * entryValues
Array mapping each entry to its value.
Definition matrix.h:241
size_t numRows
Number of rows.
Definition matrix.h:236
size_t numColumns
Number of columns.
Definition matrix.h:237
size_t numNonzeros
Number of and memory allocated for nonzeros.
Definition matrix.h:238
Row-wise representation of sparse double matrix.
Definition matrix.h:187
double * entryValues
Array mapping each entry to its value.
Definition matrix.h:193
size_t * rowSlice
Array mapping each row to the index of its first entry.
Definition matrix.h:191
size_t numRows
Number of rows.
Definition matrix.h:188
size_t numNonzeros
Number of and memory allocated for nonzeros.
Definition matrix.h:190
size_t numColumns
Number of columns.
Definition matrix.h:189
size_t * entryColumns
Array mapping each entry to its column.
Definition matrix.h:192
Definition env_internal.h:45
Row-wise representation of sparse int matrix.
Definition matrix.h:211
size_t numColumns
Number of columns.
Definition matrix.h:213
size_t * entryColumns
Array mapping each entry to its column.
Definition matrix.h:216
int * entryValues
Array mapping each entry to its value.
Definition matrix.h:217
size_t * rowSlice
Array mapping each row to the index of its first entry.
Definition matrix.h:215
size_t numRows
Number of rows.
Definition matrix.h:212
size_t numNonzeros
Number of and memory allocated for nonzeros.
Definition matrix.h:214
Row and column indices for a submatrix.
Definition matrix.h:28
size_t * columns
Array with column indices.
Definition matrix.h:32
size_t numRows
Number of rows.
Definition matrix.h:29
size_t * rows
Array with row indices.
Definition matrix.h:30
size_t numColumns
Number of columns.
Definition matrix.h:31