11template<DdType LibraryType>
13 : ddManager(const_cast<
DdManager<LibraryType>*>(&ddManager)), containedMetaVariables(containedMetaVariables) {
17template<DdType LibraryType>
19 return containedMetaVariables.contains(metaVariable);
22template<DdType LibraryType>
24 return std::includes(containedMetaVariables.begin(), containedMetaVariables.end(), metaVariables.begin(), metaVariables.end());
27template<DdType LibraryType>
29 return this->containedMetaVariables;
32template<DdType LibraryType>
34 return this->containedMetaVariables;
37template<DdType LibraryType>
39 return *this->ddManager;
42template<DdType LibraryType>
44 std::set<storm::expressions::Variable> result;
45 std::set_union(containedMetaVariables.begin(), containedMetaVariables.end(), metaVariables.begin(), metaVariables.end(),
46 std::inserter(result, result.begin()));
47 containedMetaVariables = std::move(result);
50template<DdType LibraryType>
52 this->getContainedMetaVariables().insert(metaVariable);
55template<DdType LibraryType>
57 this->getContainedMetaVariables().erase(metaVariable);
60template<DdType LibraryType>
62 std::set<storm::expressions::Variable> result;
63 std::set_difference(containedMetaVariables.begin(), containedMetaVariables.end(), metaVariables.begin(), metaVariables.end(),
64 std::inserter(result, result.begin()));
65 containedMetaVariables = std::move(result);
68template<DdType LibraryType>
70 return this->getDdManager().getSortedVariableIndices(this->getContainedMetaVariables());
73template<DdType LibraryType>
75 std::set<storm::expressions::Variable> metaVariables;
81template<DdType LibraryType>
86 STORM_LOG_THROW(includesAllMetaVariables, storm::exceptions::InvalidArgumentException,
"Cannot subtract meta variables that are not contained in the DD.");
87 std::set<storm::expressions::Variable> metaVariables;
void addMetaVariable(storm::expressions::Variable const &metaVariable)
Adds the given meta variable to the set of meta variables that are contained in this DD.
static std::set< storm::expressions::Variable > joinMetaVariables(storm::dd::Dd< LibraryType > const &first, storm::dd::Dd< LibraryType > const &second)
Retrieves the set of meta variables contained in both DDs.
void addMetaVariables(std::set< storm::expressions::Variable > const &metaVariables)
Adds the given set of meta variables to the DD.
void removeMetaVariables(std::set< storm::expressions::Variable > const &metaVariables)
Removes the given set of meta variables from the DD.
bool containsMetaVariable(storm::expressions::Variable const &metaVariable) const
Retrieves whether the given meta variable is contained in the DD.
void removeMetaVariable(storm::expressions::Variable const &metaVariable)
Removes the given meta variable to the set of meta variables that are contained in this DD.
std::vector< uint_fast64_t > getSortedVariableIndices() const
Retrieves the (sorted) list of the variable indices of DD variables contained in this DD.
static std::set< storm::expressions::Variable > subtractMetaVariables(storm::dd::Dd< LibraryType > const &first, storm::dd::Dd< LibraryType > const &second)
Retrieves the set of meta variables that are contained in the first but not the second DD.
std::set< storm::expressions::Variable > const & getContainedMetaVariables() const
Retrieves the set of all meta variables contained in the DD.
DdManager< LibraryType > & getDdManager() const
Retrieves the manager that is responsible for this DD.
bool containsMetaVariables(std::set< storm::expressions::Variable > const &metaVariables) const
Retrieves whether the given meta variables are all contained in the DD.
#define STORM_LOG_THROW(cond, exception, message)