diff --git a/src/utility/shortestPaths.cpp b/src/utility/shortestPaths.cpp index c9ce0b608..8d1dd079f 100644 --- a/src/utility/shortestPaths.cpp +++ b/src/utility/shortestPaths.cpp @@ -7,7 +7,7 @@ namespace storm { namespace utility { namespace ksp { template - ShortestPathsGenerator::ShortestPathsGenerator(storage::SparseMatrix transitionMatrix, std::unordered_map targetProbMap, BitVector initialStates) : + ShortestPathsGenerator::ShortestPathsGenerator(storage::SparseMatrix const& transitionMatrix, std::unordered_map const& targetProbMap, BitVector const& initialStates) : transitionMatrix(transitionMatrix), numStates(transitionMatrix.getColumnCount() + 1), // one more for meta-target metaTarget(transitionMatrix.getColumnCount()), // first unused state index @@ -28,7 +28,7 @@ namespace storm { } template - ShortestPathsGenerator::ShortestPathsGenerator(storage::SparseMatrix transitionMatrix, std::vector targetProbVector, BitVector initialStates) + ShortestPathsGenerator::ShortestPathsGenerator(storage::SparseMatrix const& transitionMatrix, std::vector const& targetProbVector, BitVector const& initialStates) : ShortestPathsGenerator(transitionMatrix, vectorToMap(targetProbVector), initialStates) {} // extracts the relevant info from the model and delegates to ctor above diff --git a/src/utility/shortestPaths.h b/src/utility/shortestPaths.h index 1cda2eb99..67e857e5d 100644 --- a/src/utility/shortestPaths.h +++ b/src/utility/shortestPaths.h @@ -67,8 +67,8 @@ namespace storm { // a further alternative: use transition matrix of maybe-states // combined with target vector (e.g., the instantiated matrix/vector from SamplingModel); // in this case separately specifying a target makes no sense - ShortestPathsGenerator(storage::SparseMatrix transitionMatrix, std::vector targetProbVector, BitVector initialStates); - ShortestPathsGenerator(storage::SparseMatrix maybeTransitionMatrix, std::unordered_map targetProbMap, BitVector initialStates); + ShortestPathsGenerator(storage::SparseMatrix const& transitionMatrix, std::vector const& targetProbVector, BitVector const& initialStates); + ShortestPathsGenerator(storage::SparseMatrix const& maybeTransitionMatrix, std::unordered_map const& targetProbMap, BitVector const& initialStates); inline ~ShortestPathsGenerator(){} @@ -97,7 +97,7 @@ namespace storm { private: - storage::SparseMatrix transitionMatrix; + storage::SparseMatrix const& transitionMatrix; // FIXME: store reference instead (?) state_t numStates; // includes meta-target, i.e. states in model + 1 state_t metaTarget; BitVector initialStates;