1#ifndef STORM_UTILITY_MATRIX_H_
2#define STORM_UTILITY_MATRIX_H_
24 for (uint_fast64_t state = 0; state < transitionMatrix.
getRowGroupCount(); ++state) {
25 if (scheduler.isChoiceDefined(state)) {
29 throw storm::exceptions::InvalidStateException() <<
"Scheduler defines illegal choice " << choice <<
" for state " << state <<
".";
34 for (
auto const& entry : selectedRow) {
35 matrixBuilder.
addNextValue(state, entry.getColumn(), entry.getValue());
39 matrixBuilder.
addNextValue(state, state, storm::utility::one<T>());
43 return matrixBuilder.
build();
This class defines which action is chosen in a particular state of a non-deterministic model.
SchedulerChoice< ValueType > const & getChoice(uint_fast64_t modelState, uint_fast64_t memoryState=0) const
Gets the choice defined by the scheduler for the given model and memory state.
This class represents a number of consecutive rows of the matrix.
A class that can be used to build a sparse matrix by adding value by value.
void addNextValue(index_type row, index_type column, value_type const &value)
Sets the matrix entry at the given row and column to the given value.
SparseMatrix< value_type > build(index_type overriddenRowCount=0, index_type overriddenColumnCount=0, index_type overriddenRowGroupCount=0)
A class that holds a possibly non-square matrix in the compressed row storage format.
const_rows getRow(index_type row) const
Returns an object representing the given row.
index_type getRowGroupCount() const
Returns the number of row groups in the matrix.
index_type getColumnCount() const
Returns the number of columns of the matrix.
std::vector< index_type > const & getRowGroupIndices() const
Returns the grouping of rows of this matrix.
storm::storage::SparseMatrix< T > applyScheduler(storm::storage::SparseMatrix< T > const &transitionMatrix, storm::storage::Scheduler const &scheduler)
Applies the given scheduler to the given transition matrix.