Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
NondeterministicModelStateEliminator.cpp
Go to the documentation of this file.
2
7
8namespace storm {
9namespace solver {
10namespace stateelimination {
11
12template<typename ValueType>
15 std::vector<ValueType>& rowValues)
16 : StateEliminator<ValueType>(transitionMatrix, backwardTransitions), rowValues(rowValues) {
18 transitionMatrix.getRowCount() == backwardTransitions.getColumnCount() && transitionMatrix.getColumnCount() == backwardTransitions.getRowCount(),
19 storm::exceptions::InvalidArgumentException, "Invalid matrix dimensions of forward/backwards transition matrices.");
20 STORM_LOG_THROW(rowValues.size() == transitionMatrix.getRowCount(), storm::exceptions::InvalidArgumentException, "Invalid size of row value vector");
21 // Intentionally left empty
22}
23
24template<typename ValueType>
26 rowValues[row] = storm::utility::simplify((ValueType)(loopProbability * rowValues[row]));
27}
28
29template<typename ValueType>
32 rowValues[predecessorRow] =
33 storm::utility::simplify((ValueType)(rowValues[predecessorRow] + storm::utility::simplify((ValueType)(probability * rowValues[row]))));
34}
35
37
40} // namespace stateelimination
41} // namespace solver
42} // namespace storm
virtual void updatePredecessor(storm::storage::sparse::state_type const &predecessorRow, ValueType const &probability, storm::storage::sparse::state_type const &row) override
virtual void updateValue(storm::storage::sparse::state_type const &row, ValueType const &loopProbability) override
NondeterministicModelStateEliminator(storm::storage::FlexibleSparseMatrix< ValueType > &transitionMatrix, storm::storage::FlexibleSparseMatrix< ValueType > &backwardTransitions, std::vector< ValueType > &rowValues)
The flexible sparse matrix is used during state elimination.
index_type getColumnCount() const
Returns the number of columns of the matrix.
index_type getRowCount() const
Returns the number of rows of the matrix.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
ValueType simplify(ValueType value)