diff --git a/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp b/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp index c377461d8..90fe6dc3b 100644 --- a/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp +++ b/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp @@ -791,25 +791,6 @@ namespace storm { return smb.build(); } - template - storm::storage::SparseMatrix - ApproximatePOMDPModelchecker::buildTransitionMatrix( - std::vector> transitions) { - uint_fast64_t currentRow = 0; - uint64_t nrEntries = 0; - for (auto const &map : transitions) { - nrEntries += map.size(); - } - storm::storage::SparseMatrixBuilder smb(transitions.size(), transitions.size(), nrEntries); - for (auto const &map : transitions) { - for (auto const &transition : map) { - smb.addNextValue(currentRow, transition.first, transition.second); - } - ++currentRow; - } - return smb.build(); - } - template std::vector ApproximatePOMDPModelchecker::extractBestActions( storm::models::sparse::Pomdp const &pomdp, diff --git a/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.h b/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.h index 2c289d1f5..89d1be286 100644 --- a/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.h +++ b/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.h @@ -232,11 +232,11 @@ namespace storm { uint64_t getBeliefIdInVector(std::vector> const &grid, uint32_t observation, std::vector probabilities); - storm::storage::SparseMatrix - buildTransitionMatrix(std::vector> transitions); - - storm::storage::SparseMatrix - buildTransitionMatrix(std::vector>> transitions); + /** + * @param transitions data structure that contains the transition information of the form: origin-state -> action -> (successor-state -> probability) + * @return sparseMatrix representing the transitions + */ + storm::storage::SparseMatrix buildTransitionMatrix(std::vector>> transitions); ValueType getRewardAfterAction(storm::models::sparse::Pomdp const &pomdp, uint64_t action, storm::pomdp::Belief belief);