55 InternalAdd(InternalDdManager<DdType::Sylvan> const* ddManager, sylvan::Mtbdd const& sylvanMtbdd);
59 InternalAdd(InternalAdd<DdType::Sylvan, ValueType> const& other) = default;
60 InternalAdd& operator=(InternalAdd<DdType::Sylvan, ValueType> const& other) = default;
61 InternalAdd(InternalAdd<DdType::Sylvan, ValueType>&& other) = default;
62 InternalAdd& operator=(InternalAdd<DdType::Sylvan, ValueType>&& other) = default;
71 bool operator==(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
79 bool operator!=(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
87 InternalAdd<DdType::Sylvan, ValueType> operator+(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
95 InternalAdd<DdType::Sylvan, ValueType>& operator+=(InternalAdd<DdType::Sylvan, ValueType> const& other);
103 InternalAdd<DdType::Sylvan, ValueType> operator*(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
111 InternalAdd<DdType::Sylvan, ValueType>& operator*=(InternalAdd<DdType::Sylvan, ValueType> const& other);
119 InternalAdd<DdType::Sylvan, ValueType> operator-(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
127 InternalAdd<DdType::Sylvan, ValueType>& operator-=(InternalAdd<DdType::Sylvan, ValueType> const& other);
135 InternalAdd<DdType::Sylvan, ValueType> operator/(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
143 InternalAdd<DdType::Sylvan, ValueType>& operator/=(InternalAdd<DdType::Sylvan, ValueType> const& other);
151 InternalBdd<DdType::Sylvan>
equals(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
159 InternalBdd<DdType::Sylvan> notEquals(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
168 InternalBdd<DdType::Sylvan>
less(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
186 InternalBdd<DdType::Sylvan>
greater(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
203 InternalAdd<DdType::Sylvan, ValueType>
pow(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
211 InternalAdd<DdType::Sylvan, ValueType>
mod(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
220 InternalAdd<DdType::Sylvan, ValueType>
logxy(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
241 InternalAdd<DdType::Sylvan, storm::RationalNumber> sharpenKwekMehlhorn(size_t precision) const;
249 InternalAdd<DdType::Sylvan, ValueType>
minimum(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
257 InternalAdd<DdType::Sylvan, ValueType>
maximum(InternalAdd<DdType::Sylvan, ValueType> const& other) const;
264 template<typename TargetValueType>
311 bool
equalModuloPrecision(InternalAdd<DdType::Sylvan, ValueType> const& other, ValueType const& precision, bool relative = true) const;
321 InternalAdd<DdType::Sylvan, ValueType> swapVariables(std::vector<InternalBdd<DdType::Sylvan>> const& from,
322 std::vector<InternalBdd<DdType::Sylvan>> const& to) const;
332 InternalAdd<DdType::Sylvan, ValueType> permuteVariables(std::vector<InternalBdd<DdType::Sylvan>> const& from,
333 std::vector<InternalBdd<DdType::Sylvan>> const& to) const;
344 std::vector<InternalBdd<DdType::Sylvan>> const& summationDdVariables) const;
355 std::vector<InternalBdd<DdType::Sylvan>> const& summationDdVariables) const;
409 InternalAdd<DdType::Sylvan, ValueType> constrain(InternalAdd<DdType::Sylvan, ValueType> const& constraint) const;
419 InternalAdd<DdType::Sylvan, ValueType> restrict(InternalAdd<DdType::Sylvan, ValueType> const& constraint) const;
434 virtual uint_fast64_t getNonZeroCount(uint_fast64_t numberOfDdVariables) const;
441 virtual uint_fast64_t getLeafCount() const;
448 virtual uint_fast64_t getNodeCount() const;
490 bool isConstant() const;
497 uint_fast64_t getIndex() const;
504 uint_fast64_t getLevel() const;
512 void exportToDot(std::string const& filename, std::vector<std::string> const& ddVariableNamesAsStrings, bool showVariablesIfPossible = true) const;
519 void exportToText(std::string const& filename) const;
532 AddIterator<DdType::Sylvan, ValueType> begin(DdManager<DdType::Sylvan> const& fullDdManager, InternalBdd<DdType::Sylvan> const& variableCube,
533 uint_fast64_t numberOfDdVariables, std::set<storm::expressions::Variable> const& metaVariables,
534 bool enumerateDontCareMetaVariables = true) const;
542 AddIterator<DdType::Sylvan, ValueType> end(DdManager<DdType::Sylvan> const& fullDdManager) const;
554 void composeWithExplicitVector(Odd const& odd, std::vector<uint_fast64_t> const& ddVariableIndices, std::vector<ValueType>& targetVector,
555 std::function<ValueType(ValueType const&, ValueType const&)> const& function) const;
568 void composeWithExplicitVector(Odd const& odd, std::vector<uint_fast64_t> const& ddVariableIndices, std::vector<uint_fast64_t> const& offsets,
569 std::vector<ValueType>& targetVector, std::function<ValueType(ValueType const&, ValueType const&)> const& function) const;
581 void forEach(Odd const& odd, std::vector<uint_fast64_t> const& ddVariableIndices,
582 std::function<void(uint64_t const&, ValueType const&)> const& function) const;
590 std::vector<InternalAdd<DdType::Sylvan, ValueType>> splitIntoGroups(std::vector<uint_fast64_t> const& ddGroupVariableIndices) const;
600 std::vector<uint64_t> decodeGroupLabels(std::vector<uint_fast64_t> const& ddGroupVariableIndices,
601 storm::storage::BitVector const& ddLabelVariableIndices) const;
612 std::vector<std::pair<InternalAdd<DdType::Sylvan, ValueType>, InternalAdd<DdType::Sylvan, ValueType>>> splitIntoGroups(
613 InternalAdd<DdType::Sylvan, ValueType> vector, std::vector<uint_fast64_t> const& ddGroupVariableIndices) const;
624 std::vector<std::vector<InternalAdd<DdType::Sylvan, ValueType>>> splitIntoGroups(std::vector<InternalAdd<DdType::Sylvan, ValueType>> const& vectors,
625 std::vector<uint_fast64_t> const& ddGroupVariableIndices) const;
640 void toMatrixComponents(std::vector<uint_fast64_t> const& rowGroupIndices, std::vector<uint_fast64_t>& rowIndications,
641 std::vector<storm::storage::MatrixEntry<uint_fast64_t, ValueType>>& columnsAndValues, Odd const& rowOdd, Odd const& columnOdd,
642 std::vector<uint_fast64_t> const& ddRowVariableIndices, std::vector<uint_fast64_t> const& ddColumnVariableIndices,
643 bool writeValues) const;
653 static
InternalAdd<DdType::Sylvan, ValueType> fromVector(InternalDdManager<DdType::Sylvan> const* ddManager, std::vector<ValueType> const& values,
654 storm::dd::Odd const& odd, std::vector<uint_fast64_t> const& ddVariableIndices);
661 Odd createOdd(std::vector<uint_fast64_t> const& ddVariableIndices) const;
670 sylvan::Mtbdd getSylvanMtbdd() const;
677 static ValueType
getValue(MTBDD const& node);
679 std::string getStringId() const;
693 static std::shared_ptr<Odd> createOddRec(BDD dd, uint_fast64_t currentLevel, uint_fast64_t maxLevel, std::vector<uint_fast64_t> const& ddVariableIndices,
694 std::vector<std::unordered_map<BDD, std::shared_ptr<Odd>>>& uniqueTableForLevels);
708 void forEachRec(MTBDD dd, uint_fast64_t currentLevel, uint_fast64_t maxLevel, uint_fast64_t currentOffset, Odd const& odd,
709 std::vector<uint_fast64_t> const& ddVariableIndices, std::function<void(uint64_t const&, ValueType const&)> const& function) const;
723 void decodeGroupLabelsRec(MTBDD dd, std::vector<uint64_t>& labels, std::vector<uint_fast64_t> const& ddGroupVariableIndices,
724 storm::storage::BitVector const& ddLabelVariableIndices, uint_fast64_t currentLevel, uint_fast64_t maxLevel,
725 uint64_t label) const;
737 void splitIntoGroupsRec(MTBDD dd, bool negated, std::vector<InternalAdd<DdType::Sylvan, ValueType>>& groups,
738 std::vector<uint_fast64_t> const& ddGroupVariableIndices, uint_fast64_t currentLevel, uint_fast64_t maxLevel) const;
752 void splitIntoGroupsRec(MTBDD dd1, bool negated1, MTBDD dd2, bool negated2,
753 std::vector<std::pair<InternalAdd<DdType::Sylvan, ValueType>, InternalAdd<DdType::Sylvan, ValueType>>>& groups,
754 std::vector<uint_fast64_t> const& ddGroupVariableIndices, uint_fast64_t currentLevel, uint_fast64_t maxLevel) const;
766 void splitIntoGroupsRec(std::vector<MTBDD> const& dds, storm::storage::BitVector const& negatedDds,
767 std::vector<std::vector<InternalAdd<DdType::Sylvan, ValueType>>>& groups, std::vector<uint_fast64_t> const& ddGroupVariableIndices,
768 uint_fast64_t currentLevel, uint_fast64_t maxLevel) const;
781 static MTBDD
fromVectorRec(uint_fast64_t& currentOffset, uint_fast64_t currentLevel, uint_fast64_t maxLevel, std::vector<ValueType> const& values,
782 Odd const& odd, std::vector<uint_fast64_t> const& ddVariableIndices);
810 void toMatrixComponentsRec(MTBDD dd, bool negated, std::vector<uint_fast64_t> const& rowGroupOffsets, std::vector<uint_fast64_t>& rowIndications,
811 std::vector<storm::storage::MatrixEntry<uint_fast64_t, ValueType>>& columnsAndValues, Odd const& rowOdd, Odd const& columnOdd,
812 uint_fast64_t currentRowLevel, uint_fast64_t currentColumnLevel, uint_fast64_t maxLevel, uint_fast64_t currentRowOffset,
813 uint_fast64_t currentColumnOffset, std::vector<uint_fast64_t> const& ddRowVariableIndices,
814 std::vector<uint_fast64_t> const& ddColumnVariableIndices, bool writeValues) const;
821 static MTBDD getLeaf(double value);
828 static MTBDD getLeaf(uint_fast64_t value);
835 static MTBDD getLeaf(storm::RationalNumber const& value);
837#ifdef STORM_HAVE_CARL
843 static MTBDD getLeaf(storm::RationalFunction const& value);
850 sylvan::Mtbdd sylvanMtbdd;