diff --git a/src/models/sparse/Model.cpp b/src/models/sparse/Model.cpp index a1e71c0b7..e30965998 100644 --- a/src/models/sparse/Model.cpp +++ b/src/models/sparse/Model.cpp @@ -320,7 +320,7 @@ namespace storm { return this->rewardModels; } - std::set getProbabilityParameters(Model const& model) { + std::set getProbabilityParameters(Model const& model) { return storm::storage::getVariables(model.getTransitionMatrix()); } diff --git a/src/storage/SparseMatrix.cpp b/src/storage/SparseMatrix.cpp index 1bc2f9af0..253609210 100644 --- a/src/storage/SparseMatrix.cpp +++ b/src/storage/SparseMatrix.cpp @@ -1208,6 +1208,19 @@ namespace storm { return result; } + +#ifdef STORM_HAVE_CARL + std::set getVariables(SparseMatrix const& matrix) + { + std::set result; + for(auto const& entry : matrix) { + entry.getValue().gatherVariables(result); + } + return result; + } + +#endif + // Explicitly instantiate the entry, builder and the matrix. // double template class MatrixEntry::index_type, double>; diff --git a/src/storage/SparseMatrix.h b/src/storage/SparseMatrix.h index 21d675cab..f9d9916c4 100644 --- a/src/storage/SparseMatrix.h +++ b/src/storage/SparseMatrix.h @@ -8,7 +8,7 @@ #include #include "src/utility/OsDetection.h" - +#include "src/adapters/CarlAdapter.h" #include // Forward declaration for adapter classes. @@ -970,14 +970,10 @@ namespace storm { }; - std::set getVariables(SparseMatrix const& matrix) { - std::set result; - for(auto const& entry : matrix) { - entry.probability.gatherVariables(result); - } - return result; - } - +#ifdef STORM_HAVE_CARL + std::set getVariables(SparseMatrix const& matrix); +#endif + } // namespace storage } // namespace storm