Browse Source

MaximalEndComponent: Added size() method.

tempestpy_adaptions
Tim Quatmann 4 years ago
parent
commit
9d3de84122
  1. 4
      src/storm/storage/MaximalEndComponent.cpp
  2. 5
      src/storm/storage/MaximalEndComponent.h

4
src/storm/storage/MaximalEndComponent.cpp

@ -36,6 +36,10 @@ namespace storm {
stateToChoicesMapping.emplace(state, std::move(choices)); stateToChoicesMapping.emplace(state, std::move(choices));
} }
std::size_t MaximalEndComponent::size() const {
return stateToChoicesMapping.size();
}
MaximalEndComponent::set_type const& MaximalEndComponent::getChoicesForState(uint_fast64_t state) const { MaximalEndComponent::set_type const& MaximalEndComponent::getChoicesForState(uint_fast64_t state) const {
auto stateChoicePair = stateToChoicesMapping.find(state); auto stateChoicePair = stateToChoicesMapping.find(state);

5
src/storm/storage/MaximalEndComponent.h

@ -68,6 +68,11 @@ namespace storm {
*/ */
void addState(uint_fast64_t state, set_type&& choices); void addState(uint_fast64_t state, set_type&& choices);
/*!
* @return The number of states in this mec.
*/
std::size_t size() const;
/*! /*!
* Retrieves the choices for the given state that are contained in this MEC under the assumption that the * Retrieves the choices for the given state that are contained in this MEC under the assumption that the
* state is in the MEC. * state is in the MEC.

Loading…
Cancel
Save