diff --git a/src/modelchecker/reachability/SparseDtmcEliminationModelChecker.cpp b/src/modelchecker/reachability/SparseDtmcEliminationModelChecker.cpp index 662881ed0..1f3067253 100644 --- a/src/modelchecker/reachability/SparseDtmcEliminationModelChecker.cpp +++ b/src/modelchecker/reachability/SparseDtmcEliminationModelChecker.cpp @@ -363,7 +363,7 @@ namespace storm { // We then build the submatrix that only has the transitions of the maybe states. storm::storage::SparseMatrix submatrix = transitionMatrix.getSubmatrix(true, statesWithProbabilityGreater0, statesWithProbabilityGreater0, true); - std::vector distancesFromInitialStates; + std::vector distancesFromInitialStates; storm::storage::BitVector relevantStates; if (checkTask.isOnlyInitialStatesRelevantSet()) { // Determine the set of initial states of the sub-model. @@ -961,53 +961,6 @@ namespace storm { return maximalDepth; } - template - std::vector SparseDtmcEliminationModelChecker::getDistanceBasedPriorities(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward, bool reverse) { - std::vector statePriorities(transitionMatrix.getRowCount()); - std::vector states(transitionMatrix.getRowCount()); - for (std::size_t index = 0; index < states.size(); ++index) { - states[index] = index; - } - - std::vector distances = getStateDistances(transitionMatrix, transitionMatrixTransposed, initialStates, oneStepProbabilities, - storm::settings::getModule().getEliminationOrder() == storm::settings::modules::EliminationSettings::EliminationOrder::Forward || - storm::settings::getModule().getEliminationOrder() == storm::settings::modules::EliminationSettings::EliminationOrder::ForwardReversed); - - // In case of the forward or backward ordering, we can sort the states according to the distances. - if (forward ^ reverse) { - std::sort(states.begin(), states.end(), [&distances] (storm::storage::sparse::state_type const& state1, storm::storage::sparse::state_type const& state2) { return distances[state1] < distances[state2]; } ); - } else { - // Otherwise, we sort them according to descending distances. - std::sort(states.begin(), states.end(), [&distances] (storm::storage::sparse::state_type const& state1, storm::storage::sparse::state_type const& state2) { return distances[state1] > distances[state2]; } ); - } - - // Now convert the ordering of the states to priorities. - for (uint_fast64_t index = 0; index < states.size(); ++index) { - statePriorities[states[index]] = index; - } - - return statePriorities; - } - - template - std::vector SparseDtmcEliminationModelChecker::getStateDistances(storm::storage::SparseMatrix::ValueType> const& transitionMatrix, storm::storage::SparseMatrix::ValueType> const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector::ValueType> const& oneStepProbabilities, bool forward) { - if (forward) { - return storm::utility::graph::getDistances(transitionMatrix, initialStates); - } else { - // Since the target states were eliminated from the matrix already, we construct a replacement by - // treating all states that have some non-zero probability to go to a target state in one step as target - // states. - storm::storage::BitVector pseudoTargetStates(transitionMatrix.getRowCount()); - for (std::size_t index = 0; index < oneStepProbabilities.size(); ++index) { - if (oneStepProbabilities[index] != storm::utility::zero()) { - pseudoTargetStates.set(index); - } - } - - return storm::utility::graph::getDistances(transitionMatrixTransposed, pseudoTargetStates); - } - } - template bool SparseDtmcEliminationModelChecker::checkConsistent(storm::storage::FlexibleSparseMatrix& transitionMatrix, storm::storage::FlexibleSparseMatrix& backwardTransitions) { for (uint_fast64_t forwardIndex = 0; forwardIndex < transitionMatrix.getRowCount(); ++forwardIndex) { diff --git a/src/modelchecker/reachability/SparseDtmcEliminationModelChecker.h b/src/modelchecker/reachability/SparseDtmcEliminationModelChecker.h index 73f419425..8459d4bf3 100644 --- a/src/modelchecker/reachability/SparseDtmcEliminationModelChecker.h +++ b/src/modelchecker/reachability/SparseDtmcEliminationModelChecker.h @@ -59,10 +59,6 @@ namespace storm { static uint_fast64_t performHybridStateElimination(storm::storage::SparseMatrix const& forwardTransitions, storm::storage::FlexibleSparseMatrix& transitionMatrix, storm::storage::FlexibleSparseMatrix& backwardTransitions, storm::storage::BitVector const& subsystem, storm::storage::BitVector const& initialStates, bool computeResultsForInitialStatesOnly, std::vector& values, boost::optional> const& distanceBasedPriorities); static uint_fast64_t treatScc(storm::storage::FlexibleSparseMatrix& matrix, std::vector& values, storm::storage::BitVector const& entryStates, storm::storage::BitVector const& scc, storm::storage::BitVector const& initialStates, storm::storage::SparseMatrix const& forwardTransitions, storm::storage::FlexibleSparseMatrix& backwardTransitions, bool eliminateEntryStates, uint_fast64_t level, uint_fast64_t maximalSccSize, std::vector& entryStateQueue, bool computeResultsForInitialStatesOnly, boost::optional> const& distanceBasedPriorities = boost::none); - - static std::vector getDistanceBasedPriorities(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward, bool reverse); - - static std::vector getStateDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward); static bool checkConsistent(storm::storage::FlexibleSparseMatrix& transitionMatrix, storm::storage::FlexibleSparseMatrix& backwardTransitions); diff --git a/src/solver/EliminationLinearEquationSolver.cpp b/src/solver/EliminationLinearEquationSolver.cpp index 72e675569..01c91531d 100644 --- a/src/solver/EliminationLinearEquationSolver.cpp +++ b/src/solver/EliminationLinearEquationSolver.cpp @@ -2,6 +2,9 @@ #include +#include "src/settings/SettingsManager.h" +#include "src/settings/modules/EliminationSettings.h" + #include "src/solver/stateelimination/StatePriorityQueue.h" #include "src/solver/stateelimination/PrioritizedStateEliminator.h" @@ -13,6 +16,7 @@ namespace storm { namespace solver { using namespace stateelimination; + using namespace storm::utility::stateelimination; template EliminationLinearEquationSolver::EliminationLinearEquationSolver(storm::storage::SparseMatrix const& A) : A(A) { @@ -23,29 +27,30 @@ namespace storm { void EliminationLinearEquationSolver::solveEquationSystem(std::vector& x, std::vector const& b, std::vector* multiplyResult) const { STORM_LOG_WARN_COND(multiplyResult == nullptr, "Providing scratch memory will not improve the performance of this solver."); -// std::cout << "input:" << std::endl; -// std::cout << "A:" << std::endl; -// std::cout << A << std::endl; -// std::cout << "b:" << std::endl; -// for (auto const& e : b) { -// std::cout << e << std::endl; -// } - - // Create a naive priority queue. - // TODO: improve. - std::vector allRows(x.size()); - std::iota(allRows.begin(), allRows.end(), 0); - std::shared_ptr priorityQueue = storm::utility::stateelimination::createStatePriorityQueue(allRows); - + // We need to revert the transformation into an equation system matrix, because the elimination procedure + // and the distance computation is based on the probability matrix instead. + storm::storage::SparseMatrix transitionMatrix(A); + transitionMatrix.convertToEquationSystem(); + storm::storage::SparseMatrix backwardTransitions = A.transpose(); + // Initialize the solution to the right-hand side of the equation system. x = b; // Translate the matrix and its transpose into the flexible format. - // We need to revert the matrix from the equation system format to the probability matrix format. That is, - // from (I-P), we construct P. Note that for the backwards transitions, this does not need to be done, as all - // entries are set to one anyway. - storm::storage::FlexibleSparseMatrix flexibleMatrix(A, false, true); - storm::storage::FlexibleSparseMatrix flexibleBackwardTransitions(A.transpose(), true, true); + storm::storage::FlexibleSparseMatrix flexibleMatrix(transitionMatrix, false); + storm::storage::FlexibleSparseMatrix flexibleBackwardTransitions(backwardTransitions, true); + + storm::settings::modules::EliminationSettings::EliminationOrder order = storm::settings::getModule().getEliminationOrder(); + boost::optional> distanceBasedPriorities; + if (eliminationOrderNeedsDistances(order)) { + // Compute the distance from the first state. + // FIXME: This is not exactly the initial states. + storm::storage::BitVector initialStates = storm::storage::BitVector(A.getRowCount()); + initialStates.set(0); + distanceBasedPriorities = getDistanceBasedPriorities(transitionMatrix, backwardTransitions, initialStates, b, eliminationOrderNeedsForwardDistances(order), eliminationOrderNeedsReversedDistances(order)); + } + + std::shared_ptr priorityQueue = createStatePriorityQueue(distanceBasedPriorities, flexibleMatrix, flexibleBackwardTransitions, b, storm::storage::BitVector(x.size(), true)); // std::cout << "intermediate:" << std::endl; // std::cout << "flexibleMatrix:" << std::endl; diff --git a/src/utility/graph.cpp b/src/utility/graph.cpp index 05541ae01..5705c10b9 100644 --- a/src/utility/graph.cpp +++ b/src/utility/graph.cpp @@ -83,10 +83,10 @@ namespace storm { } template - std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem) { - std::vector distances(transitionMatrix.getRowGroupCount()); + std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem) { + std::vector distances(transitionMatrix.getRowGroupCount()); - std::vector> stateQueue; + std::vector> stateQueue; stateQueue.reserve(transitionMatrix.getRowGroupCount()); storm::storage::BitVector statesInQueue(transitionMatrix.getRowGroupCount()); @@ -993,7 +993,7 @@ namespace storm { template storm::storage::BitVector getReachableStates(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, storm::storage::BitVector const& constraintStates, storm::storage::BitVector const& targetStates, bool useStepBound, uint_fast64_t maximalSteps); - template std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem); + template std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem); template storm::storage::BitVector performProbGreater0(storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool useStepBound = false, uint_fast64_t maximalSteps = 0); @@ -1065,7 +1065,7 @@ namespace storm { template storm::storage::BitVector getReachableStates(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, storm::storage::BitVector const& constraintStates, storm::storage::BitVector const& targetStates, bool useStepBound, uint_fast64_t maximalSteps); - template std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem); + template std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem); template storm::storage::BitVector performProbGreater0(storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool useStepBound = false, uint_fast64_t maximalSteps = 0); @@ -1119,7 +1119,7 @@ namespace storm { // Instantiations for storm::RationalNumber. template storm::storage::BitVector getReachableStates(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, storm::storage::BitVector const& constraintStates, storm::storage::BitVector const& targetStates, bool useStepBound, uint_fast64_t maximalSteps); - template std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem); + template std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem); template storm::storage::BitVector performProbGreater0(storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool useStepBound = false, uint_fast64_t maximalSteps = 0); @@ -1174,7 +1174,7 @@ namespace storm { #ifdef STORM_HAVE_CARL template storm::storage::BitVector getReachableStates(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, storm::storage::BitVector const& constraintStates, storm::storage::BitVector const& targetStates, bool useStepBound, uint_fast64_t maximalSteps); - template std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem); + template std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem); template storm::storage::BitVector performProbGreater0(storm::storage::SparseMatrix const& backwardTransitions, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, bool useStepBound = false, uint_fast64_t maximalSteps = 0); diff --git a/src/utility/graph.h b/src/utility/graph.h index 611d983bb..26f73902d 100644 --- a/src/utility/graph.h +++ b/src/utility/graph.h @@ -71,7 +71,7 @@ namespace storm { * @return The distances of each state to the initial states of the sarch. */ template - std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem = boost::none); + std::vector getDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::BitVector const& initialStates, boost::optional const& subsystem = boost::none); /*! * Performs a backward depth-first search trough the underlying graph structure diff --git a/src/utility/stateelimination.cpp b/src/utility/stateelimination.cpp index c2882dcde..7076c3f15 100644 --- a/src/utility/stateelimination.cpp +++ b/src/utility/stateelimination.cpp @@ -11,6 +11,7 @@ #include "src/settings/SettingsManager.h" +#include "src/utility/graph.h" #include "src/utility/macros.h" #include "src/utility/constants.h" #include "src/exceptions/InvalidStateException.h" @@ -95,7 +96,7 @@ namespace storm { } template - std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector& oneStepProbabilities, storm::storage::BitVector const& states) { + std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities, storm::storage::BitVector const& states) { STORM_LOG_TRACE("Creating state priority queue for states " << states); @@ -147,20 +148,73 @@ namespace storm { return std::make_shared(states); } + template + std::vector getDistanceBasedPriorities(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward, bool reverse) { + std::vector statePriorities(transitionMatrix.getRowCount()); + std::vector states(transitionMatrix.getRowCount()); + for (std::size_t index = 0; index < states.size(); ++index) { + states[index] = index; + } + + std::vector distances = getStateDistances(transitionMatrix, transitionMatrixTransposed, initialStates, oneStepProbabilities, + storm::settings::getModule().getEliminationOrder() == storm::settings::modules::EliminationSettings::EliminationOrder::Forward || + storm::settings::getModule().getEliminationOrder() == storm::settings::modules::EliminationSettings::EliminationOrder::ForwardReversed); + + // In case of the forward or backward ordering, we can sort the states according to the distances. + if (forward ^ reverse) { + std::sort(states.begin(), states.end(), [&distances] (storm::storage::sparse::state_type const& state1, storm::storage::sparse::state_type const& state2) { return distances[state1] < distances[state2]; } ); + } else { + // Otherwise, we sort them according to descending distances. + std::sort(states.begin(), states.end(), [&distances] (storm::storage::sparse::state_type const& state1, storm::storage::sparse::state_type const& state2) { return distances[state1] > distances[state2]; } ); + } + + // Now convert the ordering of the states to priorities. + for (uint_fast64_t index = 0; index < states.size(); ++index) { + statePriorities[states[index]] = index; + } + + return statePriorities; + } + + template + std::vector getStateDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward) { + if (forward) { + return storm::utility::graph::getDistances(transitionMatrix, initialStates); + } else { + // Since the target states were eliminated from the matrix already, we construct a replacement by + // treating all states that have some non-zero probability to go to a target state in one step as target + // states. + storm::storage::BitVector pseudoTargetStates(transitionMatrix.getRowCount()); + for (std::size_t index = 0; index < oneStepProbabilities.size(); ++index) { + if (oneStepProbabilities[index] != storm::utility::zero()) { + pseudoTargetStates.set(index); + } + } + + return storm::utility::graph::getDistances(transitionMatrixTransposed, pseudoTargetStates); + } + } + template uint_fast64_t estimateComplexity(double const& value); - template std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector& oneStepProbabilities, storm::storage::BitVector const& states); + template std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities, storm::storage::BitVector const& states); template uint_fast64_t computeStatePenalty(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities); template uint_fast64_t computeStatePenaltyRegularExpression(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities); - + template std::vector getDistanceBasedPriorities(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward, bool reverse); + template std::vector getStateDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward); + template uint_fast64_t estimateComplexity(storm::RationalNumber const& value); - template std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector& oneStepProbabilities, storm::storage::BitVector const& states); + template std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities, storm::storage::BitVector const& states); template uint_fast64_t computeStatePenalty(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities); template uint_fast64_t computeStatePenaltyRegularExpression(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities); + template std::vector getDistanceBasedPriorities(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward, bool reverse); + template std::vector getStateDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward); template uint_fast64_t estimateComplexity(storm::RationalFunction const& value); - template std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector& oneStepProbabilities, storm::storage::BitVector const& states); + template std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities, storm::storage::BitVector const& states); template uint_fast64_t computeStatePenalty(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities); template uint_fast64_t computeStatePenaltyRegularExpression(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities); + template std::vector getDistanceBasedPriorities(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward, bool reverse); + template std::vector getStateDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward); } } } \ No newline at end of file diff --git a/src/utility/stateelimination.h b/src/utility/stateelimination.h index 13c8904eb..b3d940ab2 100644 --- a/src/utility/stateelimination.h +++ b/src/utility/stateelimination.h @@ -23,6 +23,9 @@ namespace storm { template class FlexibleSparseMatrix; + + template + class SparseMatrix; } namespace utility { @@ -51,11 +54,17 @@ namespace storm { uint_fast64_t computeStatePenaltyRegularExpression(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities); template - std::shared_ptr createStatePriorityQueue(boost::optional> const& stateDistances, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector& oneStepProbabilities, storm::storage::BitVector const& states); + std::shared_ptr createStatePriorityQueue(boost::optional> const& stateDistances, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities, storm::storage::BitVector const& states); std::shared_ptr createStatePriorityQueue(storm::storage::BitVector const& states); std::shared_ptr createStatePriorityQueue(std::vector const& states); + template + std::vector getDistanceBasedPriorities(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward, bool reverse); + + template + std::vector getStateDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward); + } } } \ No newline at end of file