152 size_t* pnumMatrixRows,
153 size_t* pnumMatrixColumns,
310 size_t newNumNonzeros
321 size_t newNumNonzeros
332 size_t newNumNonzeros
591 const char* fileName,
592 const char* stdinName,
606 const char* fileName,
607 const char* stdinName,
621 const char* fileName,
622 const char* stdinName,
675 const char* fileName,
676 const char* stdinName,
690 const char* fileName,
691 const char* stdinName,
705 const char* fileName,
706 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:2677
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:1748
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:2494
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:2287
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:2526
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:986
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:2582
CMR_EXPORT char * CMRdblmatConsistency(CMR_DBLMAT *matrix)
Checks a double matrix for consistency.
Definition: matrix.c:2017
CMR_EXPORT char * CMRchrmatConsistency(CMR_CHRMAT *matrix)
Checks a char matrix for consistency.
Definition: matrix.c:2093
CMR_EXPORT CMR_ERROR CMRsubmatFree(CMR *cmr, CMR_SUBMAT **psubmatrix)
Frees a submatrix.
Definition: matrix.c:46
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:1538
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:2135
CMR_EXPORT bool CMRintmatCheckEqual(CMR_INTMAT *matrix1, CMR_INTMAT *matrix2)
Checks whether two int matrices are equal.
Definition: matrix.c:1815
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:1973
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:2779
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:2723
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:282
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:796
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:1370
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:944
CMR_EXPORT CMR_ERROR CMRintmatToChr(CMR *cmr, CMR_INTMAT *matrix, CMR_CHRMAT **presult)
Converts an int matrix to a char matrix.
Definition: matrix.c:2698
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:2211
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:2649
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:2554
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:478
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:2186
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:1929
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:2805
CMR_EXPORT CMR_ERROR CMRchrmatPrintSparse(CMR *cmr, CMR_CHRMAT *matrix, FILE *stream)
Prints a char matrix in sparse format.
Definition: matrix.c:882
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:750
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:429
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:2425
CMR_EXPORT CMR_ERROR CMRdblmatFree(CMR *cmr, CMR_DBLMAT **pmatrix)
Frees the memory of a double matrix.
Definition: matrix.c:351
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:902
CMR_EXPORT bool CMRintmatIsTernary(CMR *cmr, CMR_INTMAT *matrix, CMR_SUBMAT **psubmatrix)
Checks if an int matrix has only entries in .
Definition: matrix.c:2237
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:532
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:1285
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:1684
CMR_EXPORT bool CMRchrmatIsTernary(CMR *cmr, CMR_CHRMAT *matrix, CMR_SUBMAT **psubmatrix)
Checks if a double matrix has only entries in .
Definition: matrix.c:2262
CMR_EXPORT CMR_ERROR CMRchrmatTranspose(CMR *cmr, CMR_CHRMAT *matrix, CMR_CHRMAT **presult)
Creates the transpose of a char matrix.
Definition: matrix.c:660
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:77
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:329
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:2956
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:306
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:441
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:2984
CMR_EXPORT CMR_ERROR CMRchrmatFree(CMR *cmr, CMR_CHRMAT **pmatrix)
Frees the memory of a char matrix.
Definition: matrix.c:395
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:1434
CMR_EXPORT CMR_ERROR CMRintmatPrintSparse(CMR *cmr, CMR_INTMAT *matrix, FILE *stream)
Prints an int matrix in sparse format.
Definition: matrix.c:862
CMR_EXPORT bool CMRdblmatCheckEqual(CMR_DBLMAT *matrix1, CMR_DBLMAT *matrix2)
Checks whether two double matrices are equal.
Definition: matrix.c:1780
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:1716
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:2621
CMR_EXPORT CMR_ERROR CMRdblmatTranspose(CMR *cmr, CMR_DBLMAT *matrix, CMR_DBLMAT **presult)
Creates the transpose of a double matrix.
Definition: matrix.c:572
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:153
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:552
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:1611
CMR_EXPORT CMR_ERROR CMRintmatTranspose(CMR *cmr, CMR_INTMAT *matrix, CMR_INTMAT **presult)
Creates the transpose of an int matrix.
Definition: matrix.c:616
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:512
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:1178
CMR_EXPORT CMR_ERROR CMRintmatFree(CMR *cmr, CMR_INTMAT **pmatrix)
Frees the memory of an int matrix.
Definition: matrix.c:373
CMR_EXPORT CMR_ERROR CMRsubmatTranspose(CMR_SUBMAT *submatrix)
Transposes a submatrix.
Definition: matrix.c:62
CMR_EXPORT CMR_ERROR CMRdblmatPrintSparse(CMR *cmr, CMR_DBLMAT *matrix, FILE *stream)
Prints a double matrix in sparse format.
Definition: matrix.c:842
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:1885
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:1466
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:215
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:192
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:2753
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:461
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:494
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:1071
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:2356
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:417
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:704
CMR_EXPORT bool CMRintmatIsBinary(CMR *cmr, CMR_INTMAT *matrix, CMR_SUBMAT **psubmatrix)
Checks if an int matrix has only entries in .
Definition: matrix.c:2161
CMR_EXPORT bool CMRchrmatCheckEqual(CMR_CHRMAT *matrix1, CMR_CHRMAT *matrix2)
Checks whether two char matrices are equal.
Definition: matrix.c:1850
CMR_EXPORT char * CMRintmatConsistency(CMR_INTMAT *matrix)
Checks an int matrix for consistency.
Definition: matrix.c:2051
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:1402
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:173
Row-wise representation of sparse char matrix.
Definition: matrix.h:220
size_t * rowSlice
Array mapping each row to the index of its first entry.
Definition: matrix.h:224
size_t * entryColumns
Array mapping each entry to its column.
Definition: matrix.h:225
char * entryValues
Array mapping each entry to its value.
Definition: matrix.h:226
size_t numRows
Number of rows.
Definition: matrix.h:221
size_t numColumns
Number of columns.
Definition: matrix.h:222
size_t numNonzeros
Number of and memory allocated for nonzeros.
Definition: matrix.h:223
Row-wise representation of sparse double matrix.
Definition: matrix.h:172
double * entryValues
Array mapping each entry to its value.
Definition: matrix.h:178
size_t * rowSlice
Array mapping each row to the index of its first entry.
Definition: matrix.h:176
size_t numRows
Number of rows.
Definition: matrix.h:173
size_t numNonzeros
Number of and memory allocated for nonzeros.
Definition: matrix.h:175
size_t numColumns
Number of columns.
Definition: matrix.h:174
size_t * entryColumns
Array mapping each entry to its column.
Definition: matrix.h:177
Definition: env_internal.h:45
Row-wise representation of sparse int matrix.
Definition: matrix.h:196
size_t numColumns
Number of columns.
Definition: matrix.h:198
size_t * entryColumns
Array mapping each entry to its column.
Definition: matrix.h:201
int * entryValues
Array mapping each entry to its value.
Definition: matrix.h:202
size_t * rowSlice
Array mapping each row to the index of its first entry.
Definition: matrix.h:200
size_t numRows
Number of rows.
Definition: matrix.h:197
size_t numNonzeros
Number of and memory allocated for nonzeros.
Definition: matrix.h:199
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