18template<
typename ValueType>
20 : ddManager(ddManager), cuddAdd(cuddAdd) {
24template<
typename ValueType>
26 return this->getCuddAdd() == other.getCuddAdd();
29template<
typename ValueType>
31 return !(*
this == other);
34template<
typename ValueType>
39template<
typename ValueType>
41 this->cuddAdd = this->getCuddAdd() + other.getCuddAdd();
45template<
typename ValueType>
50template<
typename ValueType>
52 this->cuddAdd = this->getCuddAdd() * other.getCuddAdd();
56template<
typename ValueType>
61template<
typename ValueType>
63 this->cuddAdd = this->getCuddAdd() - other.getCuddAdd();
67template<
typename ValueType>
72template<
typename ValueType>
74 this->cuddAdd = this->getCuddAdd().Divide(other.getCuddAdd());
78template<
typename ValueType>
83template<
typename ValueType>
88template<
typename ValueType>
93template<
typename ValueType>
98template<
typename ValueType>
103template<
typename ValueType>
108template<
typename ValueType>
113template<
typename ValueType>
118template<
typename ValueType>
123template<
typename ValueType>
128template<
typename ValueType>
133template<
typename ValueType>
135 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported");
138template<
typename ValueType>
143template<
typename ValueType>
148template<
typename ValueType>
149template<
typename TargetValueType>
156template<
typename ValueType>
157template<
typename TargetValueType>
161 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported");
164template<
typename ValueType>
169template<
typename ValueType>
174template<
typename ValueType>
176 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().MinAbstractRepresentative(cube.toAdd<ValueType>().getCuddAdd()));
179template<
typename ValueType>
184template<
typename ValueType>
186 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().MaxAbstractRepresentative(cube.toAdd<ValueType>().getCuddAdd()));
189template<
typename ValueType>
191 bool relative)
const {
193 return this->getCuddAdd().EqualSupNormRel(other.getCuddAdd(), precision);
195 return this->getCuddAdd().EqualSupNorm(other.getCuddAdd(), precision);
201 storm::RationalNumber
const& ,
bool )
const {
202 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
205template<
typename ValueType>
208 std::vector<cudd::ADD> fromAdd;
209 std::vector<cudd::ADD> toAdd;
210 STORM_LOG_ASSERT(fromAdd.size() == toAdd.size(),
"Sizes of vectors do not match.");
211 for (
auto it1 = from.begin(), ite1 = from.end(), it2 = to.begin(); it1 != ite1; ++it1, ++it2) {
212 fromAdd.push_back(it1->getCuddBdd().Add());
213 toAdd.push_back(it2->getCuddBdd().Add());
218template<
typename ValueType>
222 uint64_t numberOfVariables = ddManager->getCuddManager().ReadSize();
223 int* permutation =
new int[numberOfVariables];
224 for (uint64_t variable = 0; variable < numberOfVariables; ++variable) {
225 permutation[variable] = variable;
228 for (
auto it1 = from.begin(), ite1 = from.end(), it2 = to.begin(); it1 != ite1; ++it1, ++it2) {
229 permutation[it1->getIndex()] = it2->getIndex();
233 delete[] permutation;
237template<
typename ValueType>
241 std::vector<cudd::ADD> summationAdds;
242 for (
auto const& ddVariable : summationDdVariables) {
243 summationAdds.push_back(ddVariable.toAdd<ValueType>().getCuddAdd());
251template<
typename ValueType>
254 return this->multiplyMatrix(otherMatrix.template toAdd<ValueType>(), summationDdVariables);
257template<
typename ValueType>
264 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
267template<
typename ValueType>
274 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
277template<
typename ValueType>
284 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
287template<
typename ValueType>
294 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
297template<
typename ValueType>
302template<
typename ValueType>
307template<
typename ValueType>
312template<
typename ValueType>
317template<
typename ValueType>
321 if (numberOfDdVariables == 0) {
324 return static_cast<uint_fast64_t
>(this->getCuddAdd().CountMinterm(
static_cast<int>(numberOfDdVariables)));
327template<
typename ValueType>
329 return static_cast<uint_fast64_t
>(this->getCuddAdd().CountLeaves());
332template<
typename ValueType>
334 return static_cast<uint_fast64_t
>(this->getCuddAdd().nodeCount());
337template<
typename ValueType>
339 cudd::ADD constantMinAdd = this->getCuddAdd().FindMin();
340 return storm::utility::convertNumber<ValueType>(Cudd_V(constantMinAdd.getNode()));
343template<
typename ValueType>
345 cudd::ADD constantMaxAdd = this->getCuddAdd().FindMax();
346 return storm::utility::convertNumber<ValueType>(Cudd_V(constantMaxAdd.getNode()));
349template<
typename ValueType>
351 return storm::utility::convertNumber<ValueType>(Cudd_V(this->getCuddAdd().getNode()));
354template<
typename ValueType>
356 return this->getCuddAdd().IsOne();
359template<
typename ValueType>
361 return this->getCuddAdd().IsZero();
364template<
typename ValueType>
366 return Cudd_IsConstant(this->getCuddAdd().getNode());
369template<
typename ValueType>
371 return static_cast<uint_fast64_t
>(this->getCuddAdd().NodeReadIndex());
374template<
typename ValueType>
376 return static_cast<uint_fast64_t
>(ddManager->getCuddManager().ReadPerm(this->getIndex()));
379template<
typename ValueType>
381 bool showVariablesIfPossible)
const {
383 std::vector<char*> ddNames;
384 std::string ddName(
"f");
385 ddNames.push_back(
new char[ddName.size() + 1]);
386 std::copy(ddName.c_str(), ddName.c_str() + 2, ddNames.back());
389 std::vector<char*> ddVariableNames;
390 for (
auto const& element : ddVariableNamesAsStrings) {
391 ddVariableNames.push_back(
new char[element.size() + 1]);
392 std::copy(element.c_str(), element.c_str() + element.size() + 1, ddVariableNames.back());
396 FILE* filePointer = fopen(filename.c_str(),
"w");
397 std::vector<cudd::ADD> cuddAddVector = {this->getCuddAdd()};
398 if (showVariablesIfPossible) {
399 ddManager->getCuddManager().DumpDot(cuddAddVector, ddVariableNames.data(), &ddNames[0], filePointer);
401 ddManager->getCuddManager().DumpDot(cuddAddVector,
nullptr, &ddNames[0], filePointer);
406 for (
char* element : ddNames) {
409 for (
char* element : ddVariableNames) {
414template<
typename ValueType>
416 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported");
419template<
typename ValueType>
421 uint_fast64_t, std::set<storm::expressions::Variable>
const& metaVariables,
422 bool enumerateDontCareMetaVariables)
const {
425 DdGen* generator = this->getCuddAdd().FirstCube(&cube, &value);
427 (Cudd_IsGenEmpty(generator) != 0), &metaVariables, enumerateDontCareMetaVariables);
430template<
typename ValueType>
435template<
typename ValueType>
437 return this->cuddAdd;
440template<
typename ValueType>
442 return this->getCuddAdd().getNode();
445template<
typename ValueType>
447 std::stringstream ss;
448 ss << this->getCuddDdNode();
452template<
typename ValueType>
455 std::vector<std::unordered_map<DdNode*, std::shared_ptr<Odd>>> uniqueTableForLevels(ddVariableIndices.size() + 1);
458 std::shared_ptr<Odd> rootOdd =
459 createOddRec(this->getCuddDdNode(), ddManager->getCuddManager(), 0, ddVariableIndices.size(), ddVariableIndices, uniqueTableForLevels);
462 return Odd(*rootOdd);
465template<
typename ValueType>
467 uint_fast64_t maxLevel, std::vector<uint_fast64_t>
const& ddVariableIndices,
468 std::vector<std::unordered_map<DdNode*, std::shared_ptr<Odd>>>& uniqueTableForLevels) {
470 auto const& iterator = uniqueTableForLevels[currentLevel].find(dd);
471 if (iterator != uniqueTableForLevels[currentLevel].end()) {
472 return iterator->second;
478 if (currentLevel == maxLevel) {
479 uint_fast64_t elseOffset = 0;
480 uint_fast64_t thenOffset = 0;
483 if (dd != Cudd_ReadZero(manager.getManager())) {
487 auto oddNode = std::make_shared<Odd>(
nullptr, elseOffset,
nullptr, thenOffset);
488 uniqueTableForLevels[currentLevel].emplace(dd, oddNode);
490 }
else if (ddVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd)) {
493 std::shared_ptr<Odd> elseNode = createOddRec(dd, manager, currentLevel + 1, maxLevel, ddVariableIndices, uniqueTableForLevels);
494 std::shared_ptr<Odd> thenNode = elseNode;
495 auto oddNode = std::make_shared<Odd>(elseNode, elseNode->getElseOffset() + elseNode->getThenOffset(), thenNode,
496 thenNode->getElseOffset() + thenNode->getThenOffset());
497 uniqueTableForLevels[currentLevel].emplace(dd, oddNode);
501 std::shared_ptr<Odd> elseNode = createOddRec(Cudd_E(dd), manager, currentLevel + 1, maxLevel, ddVariableIndices, uniqueTableForLevels);
502 std::shared_ptr<Odd> thenNode = createOddRec(Cudd_T(dd), manager, currentLevel + 1, maxLevel, ddVariableIndices, uniqueTableForLevels);
504 uint_fast64_t totalElseOffset = elseNode->getElseOffset() + elseNode->getThenOffset();
505 uint_fast64_t totalThenOffset = thenNode->getElseOffset() + thenNode->getThenOffset();
507 auto oddNode = std::make_shared<Odd>(elseNode, totalElseOffset, thenNode, totalThenOffset);
508 uniqueTableForLevels[currentLevel].emplace(dd, oddNode);
514template<
typename ValueType>
519template<
typename ValueType>
521 std::vector<ValueType>& targetVector,
522 std::function<ValueType(ValueType
const&, ValueType
const&)>
const& function)
const {
523 forEachRec(this->getCuddDdNode(), 0, ddVariableIndices.size(), 0, odd, ddVariableIndices,
524 [&function, &targetVector](uint64_t
const& offset, ValueType
const& value) { targetVector[offset] = function(targetVector[offset], value); });
527template<
typename ValueType>
529 std::function<
void(uint64_t
const&, ValueType
const&)>
const& function)
const {
530 forEachRec(this->getCuddDdNode(), 0, ddVariableIndices.size(), 0, odd, ddVariableIndices, function);
533template<
typename ValueType>
535 std::vector<uint_fast64_t>
const& offsets, std::vector<ValueType>& targetVector,
536 std::function<ValueType(ValueType
const&, ValueType
const&)>
const& function)
const {
537 forEachRec(this->getCuddDdNode(), 0, ddVariableIndices.size(), 0, odd, ddVariableIndices,
538 [&function, &targetVector, &offsets](uint64_t
const& offset, ValueType
const& value) {
539 ValueType& targetValue = targetVector[offsets[offset]];
540 targetValue = function(targetValue, value);
544template<
typename ValueType>
546 Odd const& odd, std::vector<uint_fast64_t>
const& ddVariableIndices,
547 std::function<
void(uint64_t
const&, ValueType
const&)>
const& function)
const {
549 if (dd == Cudd_ReadZero(ddManager->getCuddManager().getManager())) {
554 if (currentLevel == maxLevel) {
555 function(currentOffset, storm::utility::convertNumber<ValueType>(Cudd_V(dd)));
556 }
else if (ddVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd)) {
559 forEachRec(dd, currentLevel + 1, maxLevel, currentOffset, odd.
getElseSuccessor(), ddVariableIndices, function);
563 forEachRec(Cudd_E_const(dd), currentLevel + 1, maxLevel, currentOffset, odd.
getElseSuccessor(), ddVariableIndices, function);
564 forEachRec(Cudd_T_const(dd), currentLevel + 1, maxLevel, currentOffset + odd.
getElseOffset(), odd.
getThenSuccessor(), ddVariableIndices, function);
568template<
typename ValueType>
571 std::vector<uint64_t> result;
572 decodeGroupLabelsRec(this->getCuddDdNode(), result, ddGroupVariableIndices, ddLabelVariableIndices, 0, ddGroupVariableIndices.
size(), 0);
576template<
typename ValueType>
578 std::vector<uint_fast64_t>
const& ddGroupVariableIndices,
580 uint_fast64_t maxLevel, uint64_t label)
const {
582 if (dd == Cudd_ReadZero(ddManager->getCuddManager().getManager())) {
586 if (currentLevel == maxLevel) {
587 labels.push_back(label);
589 uint64_t elseLabel = label;
590 uint64_t thenLabel = label;
592 if (ddLabelVariableIndices.
get(currentLevel)) {
594 thenLabel = (thenLabel << 1) | 1;
597 if (ddGroupVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd)) {
598 decodeGroupLabelsRec(dd, labels, ddGroupVariableIndices, ddLabelVariableIndices, currentLevel + 1, maxLevel, elseLabel);
599 decodeGroupLabelsRec(dd, labels, ddGroupVariableIndices, ddLabelVariableIndices, currentLevel + 1, maxLevel, thenLabel);
601 decodeGroupLabelsRec(Cudd_E(dd), labels, ddGroupVariableIndices, ddLabelVariableIndices, currentLevel + 1, maxLevel, elseLabel);
602 decodeGroupLabelsRec(Cudd_T(dd), labels, ddGroupVariableIndices, ddLabelVariableIndices, currentLevel + 1, maxLevel, thenLabel);
607template<
typename ValueType>
609 std::vector<uint_fast64_t>
const& ddGroupVariableIndices)
const {
610 std::vector<InternalAdd<DdType::CUDD, ValueType>> result;
611 splitIntoGroupsRec(this->getCuddDdNode(), result, ddGroupVariableIndices, 0, ddGroupVariableIndices.size());
615template<
typename ValueType>
617 std::vector<uint_fast64_t>
const& ddGroupVariableIndices, uint_fast64_t currentLevel,
618 uint_fast64_t maxLevel)
const {
620 if (dd == Cudd_ReadZero(ddManager->getCuddManager().getManager())) {
624 if (currentLevel == maxLevel) {
625 groups.push_back(InternalAdd<DdType::CUDD, ValueType>(ddManager, cudd::ADD(ddManager->getCuddManager(), dd)));
626 }
else if (ddGroupVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd)) {
627 splitIntoGroupsRec(dd, groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
628 splitIntoGroupsRec(dd, groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
632 splitIntoGroupsRec(Cudd_E(dd), groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
633 splitIntoGroupsRec(Cudd_T(dd), groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
637template<
typename ValueType>
641 splitIntoGroupsRec(this->getCuddDdNode(), vector.getCuddDdNode(), result, ddGroupVariableIndices, 0, ddGroupVariableIndices.size());
645template<
typename ValueType>
648 std::vector<uint_fast64_t>
const& ddGroupVariableIndices, uint_fast64_t currentLevel, uint_fast64_t maxLevel)
const {
650 if (dd1 == Cudd_ReadZero(ddManager->getCuddManager().getManager()) && dd2 == Cudd_ReadZero(ddManager->getCuddManager().getManager())) {
654 if (currentLevel == maxLevel) {
655 groups.push_back(std::make_pair(InternalAdd<DdType::CUDD, ValueType>(ddManager, cudd::ADD(ddManager->getCuddManager(), dd1)),
656 InternalAdd<DdType::CUDD, ValueType>(ddManager, cudd::ADD(ddManager->getCuddManager(), dd2))));
657 }
else if (ddGroupVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd1)) {
658 if (ddGroupVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd2)) {
659 splitIntoGroupsRec(dd1, dd2, groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
660 splitIntoGroupsRec(dd1, dd2, groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
662 splitIntoGroupsRec(dd1, Cudd_T(dd2), groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
663 splitIntoGroupsRec(dd1, Cudd_E(dd2), groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
665 }
else if (ddGroupVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd2)) {
666 splitIntoGroupsRec(Cudd_T(dd1), dd2, groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
667 splitIntoGroupsRec(Cudd_E(dd1), dd2, groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
669 splitIntoGroupsRec(Cudd_T(dd1), Cudd_T(dd2), groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
670 splitIntoGroupsRec(Cudd_E(dd1), Cudd_E(dd2), groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
674template<
typename ValueType>
677 std::vector<std::vector<InternalAdd<DdType::CUDD, ValueType>>> result;
678 std::vector<DdNode*> dds;
679 for (
auto const& vector : vectors) {
680 dds.push_back(vector.getCuddDdNode());
682 dds.push_back(this->getCuddDdNode());
684 splitIntoGroupsRec(dds, result, ddGroupVariableIndices, 0, ddGroupVariableIndices.size());
688template<
typename ValueType>
691 std::vector<uint_fast64_t>
const& ddGroupVariableIndices, uint_fast64_t currentLevel,
692 uint_fast64_t maxLevel)
const {
696 for (
auto const& dd : dds) {
697 if (dd != Cudd_ReadZero(ddManager->getCuddManager().getManager())) {
707 if (currentLevel == maxLevel) {
708 std::vector<InternalAdd<DdType::CUDD, ValueType>> newGroup;
709 for (
auto dd : dds) {
710 newGroup.emplace_back(ddManager, cudd::ADD(ddManager->getCuddManager(), dd));
712 groups.push_back(std::move(newGroup));
714 std::vector<DdNode*> thenSubDds(dds), elseSubDds(dds);
715 for (uint64_t ddIndex = 0; ddIndex < dds.size(); ++ddIndex) {
716 auto const& dd = dds[ddIndex];
717 if (ddGroupVariableIndices[currentLevel] == Cudd_NodeReadIndex(dd)) {
718 thenSubDds[ddIndex] = Cudd_T(dd);
719 elseSubDds[ddIndex] = Cudd_E(dd);
722 splitIntoGroupsRec(thenSubDds, groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
723 splitIntoGroupsRec(elseSubDds, groups, ddGroupVariableIndices, currentLevel + 1, maxLevel);
727template<
typename ValueType>
730 Odd const& rowOdd,
Odd const& columnOdd, std::vector<uint_fast64_t>
const& ddRowVariableIndices,
731 std::vector<uint_fast64_t>
const& ddColumnVariableIndices,
bool writeValues)
const {
732 return toMatrixComponentsRec(this->getCuddDdNode(), rowGroupIndices, rowIndications, columnsAndValues, rowOdd, columnOdd, 0, 0,
733 ddRowVariableIndices.size() + ddColumnVariableIndices.size(), 0, 0, ddRowVariableIndices, ddColumnVariableIndices,
737template<
typename ValueType>
739 std::vector<uint_fast64_t>& rowIndications,
741 Odd const& rowOdd,
Odd const& columnOdd, uint_fast64_t currentRowLevel,
742 uint_fast64_t currentColumnLevel, uint_fast64_t maxLevel, uint_fast64_t currentRowOffset,
743 uint_fast64_t currentColumnOffset, std::vector<uint_fast64_t>
const& ddRowVariableIndices,
744 std::vector<uint_fast64_t>
const& ddColumnVariableIndices,
bool generateValues)
const {
746 if (dd == Cudd_ReadZero(ddManager->getCuddManager().getManager())) {
751 if (currentRowLevel + currentColumnLevel == maxLevel) {
752 if (generateValues) {
753 columnsAndValues[rowIndications[rowGroupOffsets[currentRowOffset]]] =
756 ++rowIndications[rowGroupOffsets[currentRowOffset]];
758 DdNode
const* elseElse;
759 DdNode
const* elseThen;
760 DdNode
const* thenElse;
761 DdNode
const* thenThen;
763 if (ddColumnVariableIndices[currentColumnLevel] < Cudd_NodeReadIndex(dd)) {
764 elseElse = elseThen = thenElse = thenThen = dd;
765 }
else if (ddRowVariableIndices[currentColumnLevel] < Cudd_NodeReadIndex(dd)) {
766 elseElse = thenElse = Cudd_E_const(dd);
767 elseThen = thenThen = Cudd_T_const(dd);
769 DdNode
const* elseNode = Cudd_E_const(dd);
770 if (ddColumnVariableIndices[currentColumnLevel] < Cudd_NodeReadIndex(elseNode)) {
771 elseElse = elseThen = elseNode;
773 elseElse = Cudd_E_const(elseNode);
774 elseThen = Cudd_T_const(elseNode);
777 DdNode
const* thenNode = Cudd_T_const(dd);
778 if (ddColumnVariableIndices[currentColumnLevel] < Cudd_NodeReadIndex(thenNode)) {
779 thenElse = thenThen = thenNode;
781 thenElse = Cudd_E_const(thenNode);
782 thenThen = Cudd_T_const(thenNode);
788 currentRowLevel + 1, currentColumnLevel + 1, maxLevel, currentRowOffset, currentColumnOffset, ddRowVariableIndices,
789 ddColumnVariableIndices, generateValues);
792 currentRowLevel + 1, currentColumnLevel + 1, maxLevel, currentRowOffset, currentColumnOffset + columnOdd.
getElseOffset(),
793 ddRowVariableIndices, ddColumnVariableIndices, generateValues);
796 currentRowLevel + 1, currentColumnLevel + 1, maxLevel, currentRowOffset + rowOdd.
getElseOffset(), currentColumnOffset,
797 ddRowVariableIndices, ddColumnVariableIndices, generateValues);
800 currentRowLevel + 1, currentColumnLevel + 1, maxLevel, currentRowOffset + rowOdd.
getElseOffset(),
801 currentColumnOffset + columnOdd.
getElseOffset(), ddRowVariableIndices, ddColumnVariableIndices, generateValues);
805template<
typename ValueType>
808 std::vector<uint_fast64_t>
const& ddVariableIndices) {
809 uint_fast64_t offset = 0;
811 ddManager, cudd::ADD(ddManager->getCuddManager(),
812 fromVectorRec(ddManager->getCuddManager().getManager(), offset, 0, ddVariableIndices.size(), values, odd, ddVariableIndices)));
815template<
typename ValueType>
817 uint_fast64_t maxLevel, std::vector<ValueType>
const& values,
Odd const& odd,
818 std::vector<uint_fast64_t>
const& ddVariableIndices) {
819 if (currentLevel == maxLevel) {
824 return Cudd_addConst(manager, values[currentOffset++]);
826 return Cudd_ReadZero(manager);
831 return Cudd_ReadZero(manager);
835 DdNode* elseSuccessor =
nullptr;
837 elseSuccessor = fromVectorRec(manager, currentOffset, currentLevel + 1, maxLevel, values, odd.
getElseSuccessor(), ddVariableIndices);
839 elseSuccessor = Cudd_ReadZero(manager);
841 Cudd_Ref(elseSuccessor);
844 DdNode* thenSuccessor =
nullptr;
846 thenSuccessor = fromVectorRec(manager, currentOffset, currentLevel + 1, maxLevel, values, odd.
getThenSuccessor(), ddVariableIndices);
848 thenSuccessor = Cudd_ReadZero(manager);
850 Cudd_Ref(thenSuccessor);
853 DdNode* result = Cudd_addIthVar(manager,
static_cast<int>(ddVariableIndices[currentLevel]));
855 DdNode* newResult = Cudd_addIte(manager, result, thenSuccessor, elseSuccessor);
859 Cudd_RecursiveDeref(manager, result);
860 Cudd_RecursiveDeref(manager, thenSuccessor);
861 Cudd_RecursiveDeref(manager, elseSuccessor);
864 Cudd_Deref(newResult);
872 uint_fast64_t maxLevel, std::vector<storm::RationalNumber>
const& values,
873 Odd const& odd, std::vector<uint_fast64_t>
const& ddVariableIndices) {
874 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported");
882#ifdef STORM_HAVE_CARL
InternalAdd< DdType::Sylvan, double > toValueType() const
InternalAdd< DdType::Sylvan, storm::RationalNumber > operator+(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > multiplyMatrix(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &otherMatrix, std::vector< InternalBdd< DdType::Sylvan > > const &summationDdVariables) const
storm::RationalNumber getValue(MTBDD const &node)
InternalBdd< DdType::CUDD > lessOrEqual(storm::RationalNumber const &value) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > maximum(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
storm::RationalNumber getMin() const
InternalAdd< DdType::Sylvan, storm::RationalNumber > & operator+=(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other)
InternalAdd< DdType::Sylvan, storm::RationalNumber > & operator-=(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other)
InternalAdd< DdType::Sylvan, storm::RationalNumber > operator*(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > & operator/=(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other)
InternalBdd< DdType::CUDD > greaterOrEqual(storm::RationalNumber const &value) const
InternalBdd< DdType::Sylvan > maxAbstractRepresentative(InternalBdd< DdType::Sylvan > const &cube) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > & operator*=(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other)
InternalBdd< DdType::Sylvan > equals(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
storm::RationalNumber getMax() const
InternalBdd< DdType::Sylvan > minAbstractRepresentative(InternalBdd< DdType::Sylvan > const &cube) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > operator-(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > ceil() const
InternalAdd< DdType::Sylvan, storm::RationalNumber > sumAbstract(InternalBdd< DdType::Sylvan > const &cube) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > floor() const
InternalAdd< DdType::Sylvan, storm::RationalNumber > pow(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
bool equalModuloPrecision(InternalAdd< DdType::CUDD, storm::RationalNumber > const &, storm::RationalNumber const &, bool) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > maxAbstract(InternalBdd< DdType::Sylvan > const &cube) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > minAbstract(InternalBdd< DdType::Sylvan > const &cube) const
InternalBdd< DdType::CUDD > less(storm::RationalNumber const &value) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > logxy(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &) const
DdNode * fromVectorRec(::DdManager *manager, uint_fast64_t ¤tOffset, uint_fast64_t currentLevel, uint_fast64_t maxLevel, std::vector< storm::RationalNumber > const &values, Odd const &odd, std::vector< uint_fast64_t > const &ddVariableIndices)
InternalAdd< DdType::Sylvan, storm::RationalNumber > operator/(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > minimum(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
InternalAdd< DdType::Sylvan, storm::RationalNumber > mod(InternalAdd< DdType::Sylvan, storm::RationalNumber > const &other) const
InternalBdd< DdType::CUDD > greater(storm::RationalNumber const &value) const
Odd const & getThenSuccessor() const
Retrieves the then-successor of this ODD node.
uint_fast64_t getElseOffset() const
Retrieves the else-offset of this ODD node.
Odd const & getElseSuccessor() const
Retrieves the else-successor of this ODD node.
uint_fast64_t getThenOffset() const
Retrieves the then-offset of this ODD node.
A bit vector that is internally represented as a vector of 64-bit values.
size_t size() const
Retrieves the number of bits this bit vector can store.
bool get(uint_fast64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_THROW(cond, exception, message)