12template<DdType LibraryType>
14 : ddManager(const_cast<
DdManager<LibraryType>*>(&ddManager)), containedMetaVariables(containedMetaVariables) {
18template<DdType LibraryType>
20 return containedMetaVariables.find(metaVariable) != containedMetaVariables.end();
23template<DdType LibraryType>
25 return std::includes(containedMetaVariables.begin(), containedMetaVariables.end(), metaVariables.begin(), metaVariables.end());
28template<DdType LibraryType>
30 return this->containedMetaVariables;
33template<DdType LibraryType>
35 return this->containedMetaVariables;
38template<DdType LibraryType>
40 return *this->ddManager;
43template<DdType LibraryType>
45 std::set<storm::expressions::Variable> result;
46 std::set_union(containedMetaVariables.begin(), containedMetaVariables.end(), metaVariables.begin(), metaVariables.end(),
47 std::inserter(result, result.begin()));
48 containedMetaVariables = std::move(result);
51template<DdType LibraryType>
53 this->getContainedMetaVariables().insert(metaVariable);
56template<DdType LibraryType>
58 this->getContainedMetaVariables().erase(metaVariable);
61template<DdType LibraryType>
63 std::set<storm::expressions::Variable> result;
64 std::set_difference(containedMetaVariables.begin(), containedMetaVariables.end(), metaVariables.begin(), metaVariables.end(),
65 std::inserter(result, result.begin()));
66 containedMetaVariables = std::move(result);
69template<DdType LibraryType>
71 return this->getDdManager().getSortedVariableIndices(this->getContainedMetaVariables());
74template<DdType LibraryType>
76 std::set<storm::expressions::Variable> metaVariables;
82template<DdType LibraryType>
87 STORM_LOG_THROW(includesAllMetaVariables, storm::exceptions::InvalidArgumentException,
"Cannot subtract meta variables that are not contained in the DD.");
88 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)