1#ifndef STORM_STORAGE_FLEXIBLESPARSEMATRIX_H_
2#define STORM_STORAGE_FLEXIBLESPARSEMATRIX_H_
12template<
typename IndexType,
typename ValueType>
20template<
typename ValueType>
28 typedef std::vector<storm::storage::MatrixEntry<index_type, value_type>>
row_type;
204 template<
typename TPrime>
208 std::vector<row_type> data;
218 bool trivialRowGrouping;
221 std::vector<index_type> rowGroupIndices;
A bit vector that is internally represented as a vector of 64-bit values.
The flexible sparse matrix is used during state elimination.
void reserveInRow(index_type row, index_type numberOfElements)
Reserves space for elements in row.
index_type getRowGroupSize(index_type group) const
Returns the size of the given row group.
index_type getColumnCount() const
Returns the number of columns of the matrix.
value_type getRowSum(index_type row) const
Computes the sum of the entries in a given row.
void updateDimensions()
Recomputes the number of columns and the number of non-zero entries.
index_type getNonzeroEntryCount() const
Returns the cached number of nonzero entries in the matrix.
std::ostream & printRow(std::ostream &out, index_type const &rowIndex) const
Print row.
std::vector< index_type > const & getRowGroupIndices() const
Returns the grouping of rows of this matrix.
storm::storage::SparseMatrix< ValueType > createSparseMatrix()
Creates a sparse matrix from the flexible sparse matrix.
row_type::const_iterator const_iterator
row_type & getRow(index_type)
Returns an object representing the given row.
bool empty() const
Checks if the matrix has no elements.
void filterEntries(storm::storage::BitVector const &rowConstraint, storm::storage::BitVector const &columnConstraint)
Erases all entries whose row and column does not satisfy the given rowConstraint and the given column...
index_type getRowCount() const
Returns the number of rows of the matrix.
FlexibleSparseMatrix()=default
Constructs an empty flexible sparse matrix.
bool hasTrivialRowGrouping() const
Retrieves whether the matrix has a (possibly) trivial row grouping.
friend std::ostream & operator<<(std::ostream &out, FlexibleSparseMatrix< TPrime > const &matrix)
bool rowHasDiagonalElement(storm::storage::sparse::state_type state)
Checks whether the given state has a self-loop with an arbitrary probability in the probability matri...
index_type getRowGroupCount() const
Returns the number of row groups in the matrix.
row_type::iterator iterator
std::vector< storm::storage::MatrixEntry< index_type, value_type > > row_type
A class that holds a possibly non-square matrix in the compressed row storage format.
storage::BitVector BitVector