18template<
typename ValueType>
19InternalAdd<DdType::CUDD, ValueType>::InternalAdd(InternalDdManager<DdType::CUDD>
const* ddManager, cudd::ADD cuddAdd)
20 : ddManager(ddManager), cuddAdd(cuddAdd) {
24template<
typename ValueType>
25bool InternalAdd<DdType::CUDD, ValueType>::operator==(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
26 return this->getCuddAdd() == other.getCuddAdd();
29template<
typename ValueType>
30bool InternalAdd<DdType::CUDD, ValueType>::operator!=(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
31 return !(*
this == other);
34template<
typename ValueType>
35InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::operator+(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
36 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd() + other.getCuddAdd());
39template<
typename ValueType>
40InternalAdd<DdType::CUDD, ValueType>& InternalAdd<DdType::CUDD, ValueType>::operator+=(InternalAdd<DdType::CUDD, ValueType>
const& other) {
41 this->cuddAdd = this->getCuddAdd() + other.getCuddAdd();
45template<
typename ValueType>
46InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::operator*(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
47 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd() * other.getCuddAdd());
50template<
typename ValueType>
51InternalAdd<DdType::CUDD, ValueType>& InternalAdd<DdType::CUDD, ValueType>::operator*=(InternalAdd<DdType::CUDD, ValueType>
const& other) {
52 this->cuddAdd = this->getCuddAdd() * other.getCuddAdd();
56template<
typename ValueType>
57InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::operator-(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
58 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd() - other.getCuddAdd());
61template<
typename ValueType>
62InternalAdd<DdType::CUDD, ValueType>& InternalAdd<DdType::CUDD, ValueType>::operator-=(InternalAdd<DdType::CUDD, ValueType>
const& other) {
63 this->cuddAdd = this->getCuddAdd() - other.getCuddAdd();
67template<
typename ValueType>
68InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::operator/(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
69 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().
Divide(other.getCuddAdd()));
72template<
typename ValueType>
73InternalAdd<DdType::CUDD, ValueType>& InternalAdd<DdType::CUDD, ValueType>::operator/=(InternalAdd<DdType::CUDD, ValueType>
const& other) {
74 this->cuddAdd = this->getCuddAdd().Divide(other.getCuddAdd());
78template<
typename ValueType>
79InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::equals(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
80 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().EqualsBdd(other.getCuddAdd()));
83template<
typename ValueType>
84InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::notEquals(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
85 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().NotEqualsBdd(other.getCuddAdd()));
88template<
typename ValueType>
89InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::less(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
90 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().LessThanBdd(other.getCuddAdd()));
93template<
typename ValueType>
94InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::lessOrEqual(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
95 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().LessThanOrEqualBdd(other.getCuddAdd()));
98template<
typename ValueType>
99InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::greater(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
100 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().GreaterThanBdd(other.getCuddAdd()));
103template<
typename ValueType>
104InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::greaterOrEqual(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
105 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().GreaterThanOrEqualBdd(other.getCuddAdd()));
108template<
typename ValueType>
109InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::pow(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
110 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().Pow(other.getCuddAdd()));
113template<
typename ValueType>
114InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::mod(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
115 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().Mod(other.getCuddAdd()));
118template<
typename ValueType>
119InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::logxy(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
120 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().LogXY(other.getCuddAdd()));
123template<
typename ValueType>
124InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::floor()
const {
125 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().
Floor());
128template<
typename ValueType>
129InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::ceil()
const {
130 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().
Ceil());
133template<
typename ValueType>
134InternalAdd<DdType::CUDD, storm::RationalNumber> InternalAdd<DdType::CUDD, ValueType>::sharpenKwekMehlhorn(
size_t )
const {
135 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported");
138template<
typename ValueType>
139InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::minimum(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
140 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().
Minimum(other.getCuddAdd()));
143template<
typename ValueType>
144InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::maximum(InternalAdd<DdType::CUDD, ValueType>
const& other)
const {
145 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().
Maximum(other.getCuddAdd()));
148template<
typename ValueType>
149template<
typename TargetValueType>
150typename std::enable_if<std::is_same<ValueType, TargetValueType>::value, InternalAdd<DdType::CUDD, TargetValueType>>
152 ::type InternalAdd<DdType::CUDD, ValueType>::toValueType()
const {
156template<
typename ValueType>
157template<
typename TargetValueType>
158typename std::enable_if<!std::is_same<ValueType, TargetValueType>::value, InternalAdd<DdType::CUDD, TargetValueType>>
160 ::type InternalAdd<DdType::CUDD, ValueType>::toValueType()
const {
161 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported");
164template<
typename ValueType>
165InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::sumAbstract(InternalBdd<DdType::CUDD>
const& cube)
const {
166 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().ExistAbstract(cube.toAdd<ValueType>().getCuddAdd()));
169template<
typename ValueType>
170InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::minAbstract(InternalBdd<DdType::CUDD>
const& cube)
const {
171 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().MinAbstract(cube.toAdd<ValueType>().getCuddAdd()));
174template<
typename ValueType>
175InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::minAbstractRepresentative(InternalBdd<DdType::CUDD>
const& cube)
const {
176 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().MinAbstractRepresentative(cube.toAdd<ValueType>().getCuddAdd()));
179template<
typename ValueType>
180InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::maxAbstract(InternalBdd<DdType::CUDD>
const& cube)
const {
181 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().MaxAbstract(cube.toAdd<ValueType>().getCuddAdd()));
184template<
typename ValueType>
185InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::maxAbstractRepresentative(InternalBdd<DdType::CUDD>
const& cube)
const {
186 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().MaxAbstractRepresentative(cube.toAdd<ValueType>().getCuddAdd()));
189template<
typename ValueType>
190bool InternalAdd<DdType::CUDD, ValueType>::equalModuloPrecision(InternalAdd<DdType::CUDD, ValueType>
const& other, ValueType
const& precision,
191 bool relative)
const {
193 return this->getCuddAdd().EqualSupNormRel(other.getCuddAdd(), precision);
195 return this->getCuddAdd().EqualSupNorm(other.getCuddAdd(), precision);
200bool InternalAdd<DdType::CUDD, storm::RationalNumber>::equalModuloPrecision(InternalAdd<DdType::CUDD, storm::RationalNumber>
const& ,
201 storm::RationalNumber
const& ,
bool )
const {
202 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
205template<
typename ValueType>
206InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::swapVariables(std::vector<InternalBdd<DdType::CUDD>>
const& from,
207 std::vector<InternalBdd<DdType::CUDD>>
const& to)
const {
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());
215 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().SwapVariables(fromAdd, toAdd));
218template<
typename ValueType>
219InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::permuteVariables(std::vector<InternalBdd<DdType::CUDD>>
const& from,
220 std::vector<InternalBdd<DdType::CUDD>>
const& to)
const {
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();
231 InternalAdd<DdType::CUDD, ValueType> result(ddManager, this->getCuddAdd().Permute(permutation));
233 delete[] permutation;
237template<
typename ValueType>
238InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::multiplyMatrix(
239 InternalAdd<DdType::CUDD, ValueType>
const& otherMatrix, std::vector<InternalBdd<DdType::CUDD>>
const& summationDdVariables)
const {
241 std::vector<cudd::ADD> summationAdds;
242 for (
auto const& ddVariable : summationDdVariables) {
243 summationAdds.push_back(ddVariable.toAdd<ValueType>().getCuddAdd());
248 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().MatrixMultiply(otherMatrix.getCuddAdd(), summationAdds));
251template<
typename ValueType>
252InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::multiplyMatrix(
253 InternalBdd<DdType::CUDD>
const& otherMatrix, std::vector<InternalBdd<DdType::CUDD>>
const& summationDdVariables)
const {
254 return this->multiplyMatrix(otherMatrix.template toAdd<ValueType>(), summationDdVariables);
257template<
typename ValueType>
258InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::greater(ValueType
const& value)
const {
259 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().BddStrictThreshold(value));
263InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, storm::RationalNumber>::greater(storm::RationalNumber
const& value)
const {
264 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
267template<
typename ValueType>
268InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::greaterOrEqual(ValueType
const& value)
const {
269 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().BddThreshold(value));
273InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, storm::RationalNumber>::greaterOrEqual(storm::RationalNumber
const& value)
const {
274 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
277template<
typename ValueType>
278InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::less(ValueType
const& value)
const {
279 return InternalBdd<DdType::CUDD>(ddManager, ~this->getCuddAdd().BddThreshold(value));
283InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, storm::RationalNumber>::less(storm::RationalNumber
const& value)
const {
284 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
287template<
typename ValueType>
288InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::lessOrEqual(ValueType
const& value)
const {
289 return InternalBdd<DdType::CUDD>(ddManager, ~this->getCuddAdd().BddStrictThreshold(value));
293InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, storm::RationalNumber>::lessOrEqual(storm::RationalNumber
const& value)
const {
294 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported.");
297template<
typename ValueType>
298InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::notZero()
const {
299 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().BddPattern());
302template<
typename ValueType>
303InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::constrain(InternalAdd<DdType::CUDD, ValueType>
const& constraint)
const {
304 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().Constrain(constraint.getCuddAdd()));
307template<
typename ValueType>
308InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::restrict(InternalAdd<DdType::CUDD, ValueType>
const& constraint)
const {
309 return InternalAdd<DdType::CUDD, ValueType>(ddManager, this->getCuddAdd().Restrict(constraint.getCuddAdd()));
312template<
typename ValueType>
313InternalBdd<DdType::CUDD> InternalAdd<DdType::CUDD, ValueType>::getSupport()
const {
314 return InternalBdd<DdType::CUDD>(ddManager, this->getCuddAdd().Support());
317template<
typename ValueType>
318uint_fast64_t InternalAdd<DdType::CUDD, ValueType>::getNonZeroCount(uint_fast64_t numberOfDdVariables)
const {
321 if (numberOfDdVariables == 0) {
324 return static_cast<uint_fast64_t
>(this->getCuddAdd().CountMinterm(
static_cast<int>(numberOfDdVariables)));
327template<
typename ValueType>
328uint_fast64_t InternalAdd<DdType::CUDD, ValueType>::getLeafCount()
const {
329 return static_cast<uint_fast64_t
>(this->getCuddAdd().CountLeaves());
332template<
typename ValueType>
333uint_fast64_t InternalAdd<DdType::CUDD, ValueType>::getNodeCount()
const {
334 return static_cast<uint_fast64_t
>(this->getCuddAdd().nodeCount());
337template<
typename ValueType>
338ValueType InternalAdd<DdType::CUDD, ValueType>::getMin()
const {
339 cudd::ADD constantMinAdd = this->getCuddAdd().FindMin();
340 return storm::utility::convertNumber<ValueType>(Cudd_V(constantMinAdd.getNode()));
343template<
typename ValueType>
344ValueType InternalAdd<DdType::CUDD, ValueType>::getMax()
const {
345 cudd::ADD constantMaxAdd = this->getCuddAdd().FindMax();
346 return storm::utility::convertNumber<ValueType>(Cudd_V(constantMaxAdd.getNode()));
349template<
typename ValueType>
350ValueType InternalAdd<DdType::CUDD, ValueType>::getValue()
const {
351 return storm::utility::convertNumber<ValueType>(Cudd_V(this->getCuddAdd().getNode()));
354template<
typename ValueType>
355bool InternalAdd<DdType::CUDD, ValueType>::isOne()
const {
356 return this->getCuddAdd().IsOne();
359template<
typename ValueType>
360bool InternalAdd<DdType::CUDD, ValueType>::isZero()
const {
361 return this->getCuddAdd().IsZero();
364template<
typename ValueType>
365bool InternalAdd<DdType::CUDD, ValueType>::isConstant()
const {
366 return Cudd_IsConstant(this->getCuddAdd().getNode());
369template<
typename ValueType>
370uint_fast64_t InternalAdd<DdType::CUDD, ValueType>::getIndex()
const {
371 return static_cast<uint_fast64_t
>(this->getCuddAdd().NodeReadIndex());
374template<
typename ValueType>
375uint_fast64_t InternalAdd<DdType::CUDD, ValueType>::getLevel()
const {
376 return static_cast<uint_fast64_t
>(ddManager->getCuddManager().ReadPerm(this->getIndex()));
379template<
typename ValueType>
380void InternalAdd<DdType::CUDD, ValueType>::exportToDot(std::string
const& filename, std::vector<std::string>
const& ddVariableNamesAsStrings,
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>
415void InternalAdd<DdType::CUDD, ValueType>::exportToText(std::string
const&)
const {
416 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Operation not supported");
419template<
typename ValueType>
420AddIterator<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::begin(DdManager<DdType::CUDD>
const& fullDdManager, InternalBdd<DdType::CUDD>
const&,
421 uint_fast64_t, std::set<storm::expressions::Variable>
const& metaVariables,
422 bool enumerateDontCareMetaVariables)
const {
425 DdGen* generator = this->getCuddAdd().FirstCube(&cube, &value);
426 return AddIterator<DdType::CUDD, ValueType>(fullDdManager, generator, cube, storm::utility::convertNumber<ValueType>(value),
427 (Cudd_IsGenEmpty(generator) != 0), &metaVariables, enumerateDontCareMetaVariables);
430template<
typename ValueType>
431AddIterator<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::end(DdManager<DdType::CUDD>
const& fullDdManager)
const {
432 return AddIterator<DdType::CUDD, ValueType>(fullDdManager,
nullptr,
nullptr, 0,
true,
nullptr,
false);
435template<
typename ValueType>
436cudd::ADD InternalAdd<DdType::CUDD, ValueType>::getCuddAdd()
const {
437 return this->cuddAdd;
440template<
typename ValueType>
441DdNode* InternalAdd<DdType::CUDD, ValueType>::getCuddDdNode()
const {
442 return this->getCuddAdd().getNode();
445template<
typename ValueType>
446std::string InternalAdd<DdType::CUDD, ValueType>::getStringId()
const {
447 std::stringstream ss;
448 ss << this->getCuddDdNode();
452template<
typename ValueType>
453Odd InternalAdd<DdType::CUDD, ValueType>::createOdd(std::vector<uint_fast64_t>
const& ddVariableIndices)
const {
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>
466std::shared_ptr<Odd> InternalAdd<DdType::CUDD, ValueType>::createOddRec(DdNode* dd, cudd::Cudd
const& manager, uint_fast64_t currentLevel,
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>
515InternalDdManager<DdType::CUDD>
const& InternalAdd<DdType::CUDD, ValueType>::getInternalDdManager()
const {
519template<
typename ValueType>
520void InternalAdd<DdType::CUDD, ValueType>::composeWithExplicitVector(
storm::dd::Odd const& odd, std::vector<uint_fast64_t>
const& ddVariableIndices,
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>
528void InternalAdd<DdType::CUDD, ValueType>::forEach(Odd
const& odd, std::vector<uint_fast64_t>
const& ddVariableIndices,
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>
534void InternalAdd<DdType::CUDD, ValueType>::composeWithExplicitVector(
storm::dd::Odd const& odd, std::vector<uint_fast64_t>
const& ddVariableIndices,
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>
545void InternalAdd<DdType::CUDD, ValueType>::forEachRec(DdNode
const* dd, uint_fast64_t currentLevel, uint_fast64_t maxLevel, uint_fast64_t currentOffset,
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);
560 forEachRec(dd, currentLevel + 1, maxLevel, currentOffset + odd.getElseOffset(), odd.getThenSuccessor(), 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>
569std::vector<uint64_t> InternalAdd<DdType::CUDD, ValueType>::decodeGroupLabels(std::vector<uint_fast64_t>
const& ddGroupVariableIndices,
571 std::vector<uint64_t> result;
572 decodeGroupLabelsRec(this->getCuddDdNode(), result, ddGroupVariableIndices, ddLabelVariableIndices, 0, ddGroupVariableIndices.size(), 0);
576template<
typename ValueType>
577void InternalAdd<DdType::CUDD, ValueType>::decodeGroupLabelsRec(DdNode* dd, std::vector<uint64_t>& labels,
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>
608std::vector<InternalAdd<DdType::CUDD, ValueType>> InternalAdd<DdType::CUDD, ValueType>::splitIntoGroups(
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>
616void InternalAdd<DdType::CUDD, ValueType>::splitIntoGroupsRec(DdNode* dd, std::vector<InternalAdd<DdType::CUDD, ValueType>>& groups,
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>
638std::vector<std::pair<InternalAdd<DdType::CUDD, ValueType>, InternalAdd<DdType::CUDD, ValueType>>> InternalAdd<DdType::CUDD, ValueType>::splitIntoGroups(
639 InternalAdd<DdType::CUDD, ValueType> vector, std::vector<uint_fast64_t>
const& ddGroupVariableIndices)
const {
640 std::vector<std::pair<InternalAdd<DdType::CUDD, ValueType>, InternalAdd<DdType::CUDD, ValueType>>> result;
641 splitIntoGroupsRec(this->getCuddDdNode(), vector.getCuddDdNode(), result, ddGroupVariableIndices, 0, ddGroupVariableIndices.size());
645template<
typename ValueType>
646void InternalAdd<DdType::CUDD, ValueType>::splitIntoGroupsRec(
647 DdNode* dd1, DdNode* dd2, std::vector<std::pair<InternalAdd<DdType::CUDD, ValueType>, InternalAdd<DdType::CUDD, ValueType>>>& groups,
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>
675std::vector<std::vector<InternalAdd<DdType::CUDD, ValueType>>> InternalAdd<DdType::CUDD, ValueType>::splitIntoGroups(
676 std::vector<InternalAdd<DdType::CUDD, ValueType>>
const& vectors, std::vector<uint_fast64_t>
const& ddGroupVariableIndices)
const {
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>
689void InternalAdd<DdType::CUDD, ValueType>::splitIntoGroupsRec(std::vector<DdNode*>
const& dds,
690 std::vector<std::vector<InternalAdd<DdType::CUDD, ValueType>>>& groups,
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>
728void InternalAdd<DdType::CUDD, ValueType>::toMatrixComponents(std::vector<uint_fast64_t>
const& rowGroupIndices, std::vector<uint_fast64_t>& rowIndications,
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>
738void InternalAdd<DdType::CUDD, ValueType>::toMatrixComponentsRec(DdNode
const* dd, std::vector<uint_fast64_t>
const& rowGroupOffsets,
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);
787 toMatrixComponentsRec(elseElse, rowGroupOffsets, rowIndications, columnsAndValues, rowOdd.getElseSuccessor(), columnOdd.getElseSuccessor(),
788 currentRowLevel + 1, currentColumnLevel + 1, maxLevel, currentRowOffset, currentColumnOffset, ddRowVariableIndices,
789 ddColumnVariableIndices, generateValues);
791 toMatrixComponentsRec(elseThen, rowGroupOffsets, rowIndications, columnsAndValues, rowOdd.getElseSuccessor(), columnOdd.getThenSuccessor(),
792 currentRowLevel + 1, currentColumnLevel + 1, maxLevel, currentRowOffset, currentColumnOffset + columnOdd.getElseOffset(),
793 ddRowVariableIndices, ddColumnVariableIndices, generateValues);
795 toMatrixComponentsRec(thenElse, rowGroupOffsets, rowIndications, columnsAndValues, rowOdd.getThenSuccessor(), columnOdd.getElseSuccessor(),
796 currentRowLevel + 1, currentColumnLevel + 1, maxLevel, currentRowOffset + rowOdd.getElseOffset(), currentColumnOffset,
797 ddRowVariableIndices, ddColumnVariableIndices, generateValues);
799 toMatrixComponentsRec(thenThen, rowGroupOffsets, rowIndications, columnsAndValues, rowOdd.getThenSuccessor(), columnOdd.getThenSuccessor(),
800 currentRowLevel + 1, currentColumnLevel + 1, maxLevel, currentRowOffset + rowOdd.getElseOffset(),
801 currentColumnOffset + columnOdd.getElseOffset(), ddRowVariableIndices, ddColumnVariableIndices, generateValues);
805template<
typename ValueType>
806InternalAdd<DdType::CUDD, ValueType> InternalAdd<DdType::CUDD, ValueType>::fromVector(InternalDdManager<DdType::CUDD>
const* ddManager,
808 std::vector<uint_fast64_t>
const& ddVariableIndices) {
809 uint_fast64_t offset = 0;
810 return InternalAdd<DdType::CUDD, ValueType>(
811 ddManager, cudd::ADD(ddManager->getCuddManager(),
812 fromVectorRec(ddManager->getCuddManager().getManager(), offset, 0, ddVariableIndices.size(), values, odd, ddVariableIndices)));
815template<
typename ValueType>
816DdNode* InternalAdd<DdType::CUDD, ValueType>::fromVectorRec(::DdManager* manager, uint_fast64_t& currentOffset, uint_fast64_t currentLevel,
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) {
823 if (odd.getThenOffset() > 0) {
824 return Cudd_addConst(manager, values[currentOffset++]);
826 return Cudd_ReadZero(manager);
830 if (odd.getThenOffset() + odd.getElseOffset() == 0) {
831 return Cudd_ReadZero(manager);
835 DdNode* elseSuccessor =
nullptr;
836 if (odd.getElseOffset() > 0) {
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;
845 if (odd.getThenOffset() > 0) {
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);
871DdNode* InternalAdd<DdType::CUDD, storm::RationalNumber>::fromVectorRec(::DdManager* manager, uint_fast64_t& currentOffset, uint_fast64_t currentLevel,
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");
878template<
typename ValueType>
881 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
882 "of Storm with CUDD support.");
885template<
typename ValueType>
888 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
889 "of Storm with CUDD support.");
892template<
typename ValueType>
895 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
896 "of Storm with CUDD support.");
899template<
typename ValueType>
902 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
903 "of Storm with CUDD support.");
906template<
typename ValueType>
909 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
910 "of Storm with CUDD support.");
913template<
typename ValueType>
916 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
917 "of Storm with CUDD support.");
920template<
typename ValueType>
923 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
924 "of Storm with CUDD support.");
927template<
typename ValueType>
930 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
931 "of Storm with CUDD support.");
934template<
typename ValueType>
937 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
938 "of Storm with CUDD support.");
941template<
typename ValueType>
944 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
945 "of Storm with CUDD support.");
948template<
typename ValueType>
951 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
952 "of Storm with CUDD support.");
955template<
typename ValueType>
958 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
959 "of Storm with CUDD support.");
962template<
typename ValueType>
965 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
966 "of Storm with CUDD support.");
969template<
typename ValueType>
972 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
973 "of Storm with CUDD support.");
976template<
typename ValueType>
979 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
980 "of Storm with CUDD support.");
983template<
typename ValueType>
986 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
987 "of Storm with CUDD support.");
990template<
typename ValueType>
993 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
994 "of Storm with CUDD support.");
997template<
typename ValueType>
1000 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1001 "of Storm with CUDD support.");
1004template<
typename ValueType>
1007 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1008 "of Storm with CUDD support.");
1011template<
typename ValueType>
1014 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1015 "of Storm with CUDD support.");
1018template<
typename ValueType>
1021 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1022 "of Storm with CUDD support.");
1025template<
typename ValueType>
1028 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1029 "of Storm with CUDD support.");
1032template<
typename ValueType>
1035 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1036 "of Storm with CUDD support.");
1039template<
typename ValueType>
1042 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1043 "of Storm with CUDD support.");
1046template<
typename ValueType>
1047template<
typename TargetValueType>
1051 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1052 "of Storm with CUDD support.");
1055template<
typename ValueType>
1056template<
typename TargetValueType>
1060 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1061 "of Storm with CUDD support.");
1064template<
typename ValueType>
1067 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1068 "of Storm with CUDD support.");
1071template<
typename ValueType>
1074 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1075 "of Storm with CUDD support.");
1078template<
typename ValueType>
1081 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1082 "of Storm with CUDD support.");
1085template<
typename ValueType>
1088 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1089 "of Storm with CUDD support.");
1092template<
typename ValueType>
1095 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1096 "of Storm with CUDD support.");
1099template<
typename ValueType>
1101 bool relative)
const {
1103 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1104 "of Storm with CUDD support.");
1109 storm::RationalNumber
const& ,
bool )
const {
1111 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1112 "of Storm with CUDD support.");
1115template<
typename ValueType>
1119 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1120 "of Storm with CUDD support.");
1123template<
typename ValueType>
1127 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1128 "of Storm with CUDD support.");
1131template<
typename ValueType>
1135 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1136 "of Storm with CUDD support.");
1139template<
typename ValueType>
1143 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1144 "of Storm with CUDD support.");
1147template<
typename ValueType>
1150 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1151 "of Storm with CUDD support.");
1157 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1158 "of Storm with CUDD support.");
1161template<
typename ValueType>
1164 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1165 "of Storm with CUDD support.");
1171 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1172 "of Storm with CUDD support.");
1175template<
typename ValueType>
1178 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1179 "of Storm with CUDD support.");
1185 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1186 "of Storm with CUDD support.");
1189template<
typename ValueType>
1192 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1193 "of Storm with CUDD support.");
1199 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1200 "of Storm with CUDD support.");
1203template<
typename ValueType>
1206 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1207 "of Storm with CUDD support.");
1210template<
typename ValueType>
1213 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1214 "of Storm with CUDD support.");
1217template<
typename ValueType>
1220 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1221 "of Storm with CUDD support.");
1224template<
typename ValueType>
1227 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1228 "of Storm with CUDD support.");
1231template<
typename ValueType>
1234 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1235 "of Storm with CUDD support.");
1238template<
typename ValueType>
1241 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1242 "of Storm with CUDD support.");
1245template<
typename ValueType>
1248 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1249 "of Storm with CUDD support.");
1252template<
typename ValueType>
1255 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1256 "of Storm with CUDD support.");
1259template<
typename ValueType>
1262 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1263 "of Storm with CUDD support.");
1266template<
typename ValueType>
1269 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1270 "of Storm with CUDD support.");
1273template<
typename ValueType>
1276 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1277 "of Storm with CUDD support.");
1280template<
typename ValueType>
1283 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1284 "of Storm with CUDD support.");
1287template<
typename ValueType>
1290 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1291 "of Storm with CUDD support.");
1294template<
typename ValueType>
1297 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1298 "of Storm with CUDD support.");
1301template<
typename ValueType>
1304 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1305 "of Storm with CUDD support.");
1308template<
typename ValueType>
1310 bool showVariablesIfPossible)
const {
1312 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1313 "of Storm with CUDD support.");
1316template<
typename ValueType>
1319 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1320 "of Storm with CUDD support.");
1323template<
typename ValueType>
1325 uint_fast64_t, std::set<storm::expressions::Variable>
const& metaVariables,
1326 bool enumerateDontCareMetaVariables)
const {
1328 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1329 "of Storm with CUDD support.");
1332template<
typename ValueType>
1335 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1336 "of Storm with CUDD support.");
1339template<
typename ValueType>
1342 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1343 "of Storm with CUDD support.");
1346template<
typename ValueType>
1349 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1350 "of Storm with CUDD support.");
1353template<
typename ValueType>
1356 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1357 "of Storm with CUDD support.");
1360template<
typename ValueType>
1362 std::vector<ValueType>& targetVector,
1363 std::function<ValueType(ValueType
const&, ValueType
const&)>
const& function)
const {
1365 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1366 "of Storm with CUDD support.");
1369template<
typename ValueType>
1371 std::function<
void(uint64_t
const&, ValueType
const&)>
const& function)
const {
1373 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1374 "of Storm with CUDD support.");
1377template<
typename ValueType>
1379 std::vector<uint_fast64_t>
const& offsets, std::vector<ValueType>& targetVector,
1380 std::function<ValueType(ValueType
const&, ValueType
const&)>
const& function)
const {
1382 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1383 "of Storm with CUDD support.");
1386template<
typename ValueType>
1390 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1391 "of Storm with CUDD support.");
1394template<
typename ValueType>
1396 std::vector<uint_fast64_t>
const& ddGroupVariableIndices)
const {
1398 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1399 "of Storm with CUDD support.");
1402template<
typename ValueType>
1406 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1407 "of Storm with CUDD support.");
1410template<
typename ValueType>
1414 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1415 "of Storm with CUDD support.");
1418template<
typename ValueType>
1421 Odd const& rowOdd,
Odd const& columnOdd, std::vector<uint_fast64_t>
const& ddRowVariableIndices,
1422 std::vector<uint_fast64_t>
const& ddColumnVariableIndices,
bool writeValues)
const {
1424 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1425 "of Storm with CUDD support.");
1428template<
typename ValueType>
1431 std::vector<uint_fast64_t>
const& ddVariableIndices) {
1433 "This version of Storm was compiled without support for CUDD. Yet, a method was called that requires this support. Please choose a version "
1434 "of Storm with CUDD support.");
A bit vector that is internally represented as a vector of 64-bit values.
bool get(uint64_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)
SFTBDDChecker::ValueType ValueType
SettingsManager const & manager()
Retrieves the settings manager.
Extremum< storm::OptimizationDirection::Minimize, ValueType > Minimum
Extremum< storm::OptimizationDirection::Maximize, ValueType > Maximum