Browse Source

intermediate commit

Former-commit-id: 6acb50ec62
tempestpy_adaptions
sjunges 9 years ago
parent
commit
5e9c42f2af
  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; 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<double>;
template class Model<float>; template class Model<float>;

1
src/models/sparse/Model.h

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

8
src/storage/SparseMatrix.h

@ -969,6 +969,14 @@ namespace storm {
std::vector<index_type> rowGroupIndices; 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 storage
} // namespace storm } // namespace storm

Loading…
Cancel
Save