Browse Source

Added shortcut DD interface to compute \'greaterZero\' on a DD.

Former-commit-id: 65585533fd
tempestpy_adaptions
dehnert 11 years ago
parent
commit
b1f22c1747
  1. 4
      src/storage/dd/CuddDd.cpp
  2. 8
      src/storage/dd/CuddDd.h

4
src/storage/dd/CuddDd.cpp

@ -314,6 +314,10 @@ namespace storm {
return Dd<DdType::CUDD>(this->getDdManager(), this->cuddAdd.MatrixMultiply(otherMatrix.getCuddAdd(), summationDdVariables), containedMetaVariableNames);
}
Dd<DdType::CUDD> Dd<DdType::CUDD>::greaterZero() const {
return Dd<DdType::CUDD>(this->getDdManager(), this->getCuddAdd().BddStrictThreshold(0).Add(), this->getContainedMetaVariableNames());
}
uint_fast64_t Dd<DdType::CUDD>::getNonZeroCount() const {
std::size_t numberOfDdVariables = 0;
for (auto const& metaVariableName : this->containedMetaVariableNames) {

8
src/storage/dd/CuddDd.h

@ -291,6 +291,14 @@ namespace storm {
*/
Dd<DdType::CUDD> multiplyMatrix(Dd<DdType::CUDD> const& otherMatrix, std::set<std::string> const& summationMetaVariableNames) const;
/*!
* Computes a DD that represents the function in which all assignments with a function value strictly larger
* than zero are mapped to one and all others to zero.
*
* @return The resulting DD.
*/
Dd<DdType::CUDD> greaterZero() const;
/*!
* Retrieves the number of encodings that are mapped to a non-zero value.
*

Loading…
Cancel
Save