Browse Source

Merge branch 'future' into python_api

Former-commit-id: 87652ae9ed
tempestpy_adaptions
sjunges 9 years ago
parent
commit
ebfd6aba39
  1. 3
      src/models/sparse/Model.cpp
  2. 1
      src/models/sparse/Model.h
  3. 8
      src/storage/SparseMatrix.h

3
src/models/sparse/Model.cpp

@ -320,6 +320,9 @@ namespace storm {
return this->rewardModels;
}
std::set<storm::Variable> getProbabilityParameters(Model<storm::RationalNumber> const& model) {
return storm::storage::getVariables(model.getTransitionMatrix());
}
template class Model<double>;
template class Model<float>;

1
src/models/sparse/Model.h

@ -345,6 +345,7 @@ namespace storm {
boost::optional<std::vector<LabelSet>> choiceLabeling;
};
std::set<storm::Variable> getProbabilityParameters(Model<storm::RationalFunction> const& model);
} // namespace sparse
} // namespace models
} // namespace storm

8
src/storage/SparseMatrix.h

@ -969,6 +969,14 @@ namespace storm {
std::vector<index_type> rowGroupIndices;
};
std::set<storm::Variable> getVariables(SparseMatrix<storm::RationalFunction> const& matrix) {
std::set<storm::Variable> result;
for(auto const& entry : matrix) {
entry.probability.gatherVariables(result);
}
return result;
}
} // namespace storage
} // namespace storm

Loading…
Cancel
Save