CMR  1.3.0
CMR_CHRMAT Struct Reference

Row-wise representation of sparse char matrix. More...

#include <matrix.h>

Public Attributes

size_t numRows
Number of rows. More...

size_t numColumns
Number of columns. More...

size_t numNonzeros
Number of and memory allocated for nonzeros. More...

size_t * rowSlice
Array mapping each row to the index of its first entry. More...

size_t * entryColumns
Array mapping each entry to its column. More...

char * entryValues
Array mapping each entry to its value. More...

Detailed Description

Row-wise representation of sparse char matrix.

The nonzeros of the matrix are stored in the arrays entryColumns and entryValues, each of length numNonzeros. The nonzeros of row r are stored at positions $$p \in \{a, a+1, \dotsc, b-2, b-1 \}$$, where $$a :=$$ rowSlice[r] and $$b :=$$ rowSlice[r+1]. In particular, the length of the rowSlice array is numRows + 1. The column is entryColumns[ $$p$$] while the actual matrix entry is entryValues[ $$p$$].

The nonzeros of each row must be sorted by column in ascending order. Moreover, no duplicates are allowed and all stored entries must indeed be nonzero.

Member Data Documentation

 size_t* CMR_CHRMAT::entryColumns

Array mapping each entry to its column.

 char* CMR_CHRMAT::entryValues

Array mapping each entry to its value.

 size_t CMR_CHRMAT::numColumns

Number of columns.

 size_t CMR_CHRMAT::numNonzeros

Number of and memory allocated for nonzeros.

 size_t CMR_CHRMAT::numRows

Number of rows.

 size_t* CMR_CHRMAT::rowSlice

Array mapping each row to the index of its first entry.

The documentation for this struct was generated from the following file:
• /home/travis/build/discopt/cmr/include/cmr/matrix.h