#pragma once #include "src/storage/sparse/StateType.h" #include "src/storage/FlexibleSparseMatrix.h" namespace storm { namespace solver { namespace stateelimination { enum class ScalingMode { Divide, DivideOneMinus }; template class EliminatorBase { public: typedef typename storm::storage::FlexibleSparseMatrix::row_type FlexibleRowType; typedef typename FlexibleRowType::iterator FlexibleRowIterator; EliminatorBase(storm::storage::FlexibleSparseMatrix& matrix, storm::storage::FlexibleSparseMatrix& transposedMatrix); void eliminate(uint64_t row, uint64_t column, bool clearRow); // Provide virtual methods that can be customized by subclasses to govern side-effect of the elimination. virtual void updateValue(storm::storage::sparse::state_type const& state, ValueType const& loopProbability); virtual void updatePredecessor(storm::storage::sparse::state_type const& predecessor, ValueType const& probability, storm::storage::sparse::state_type const& state); virtual void updatePriority(storm::storage::sparse::state_type const& state); virtual bool filterPredecessor(storm::storage::sparse::state_type const& state); virtual bool isFilterPredecessor() const; protected: storm::storage::FlexibleSparseMatrix& matrix; storm::storage::FlexibleSparseMatrix& transposedMatrix; }; } // namespace stateelimination } // namespace storage } // namespace storm