Storm
A Modern Probabilistic Model Checker
|
#include <Odd.h>
Public Member Functions | |
Odd (std::shared_ptr< Odd > elseNode, uint_fast64_t elseOffset, std::shared_ptr< Odd > thenNode, uint_fast64_t thenOffset) | |
Constructs an offset-labeled DD with the given topmost DD node, else- and then-successor. | |
Odd ()=default | |
Odd (Odd const &other)=default | |
Odd & | operator= (Odd const &other)=default |
Odd (Odd &&other)=default | |
Odd & | operator= (Odd &&other)=default |
Odd const & | getThenSuccessor () const |
Retrieves the then-successor of this ODD node. | |
Odd const & | getElseSuccessor () const |
Retrieves the else-successor of this ODD node. | |
uint_fast64_t | getElseOffset () const |
Retrieves the else-offset of this ODD node. | |
void | setElseOffset (uint_fast64_t newOffset) |
Sets the else-offset of this ODD node. | |
uint_fast64_t | getThenOffset () const |
Retrieves the then-offset of this ODD node. | |
void | setThenOffset (uint_fast64_t newOffset) |
Sets the then-offset of this ODD node. | |
uint_fast64_t | getTotalOffset () const |
Retrieves the total offset, i.e., the sum of the then- and else-offset. | |
uint_fast64_t | getNodeCount () const |
Retrieves the size of the ODD. | |
uint_fast64_t | getHeight () const |
Retrieves the height of the ODD. | |
bool | isTerminalNode () const |
Checks whether the given ODD node is a terminal node, i.e. | |
template<typename ValueType > | |
void | expandExplicitVector (storm::dd::Odd const &newOdd, std::vector< ValueType > const &oldValues, std::vector< ValueType > &newValues) const |
Adds the old values to the new values. | |
void | oldToNewIndex (storm::dd::Odd const &newOdd, std::function< void(uint64_t oldOffset, uint64_t newOffset)> const &callback) const |
Translates the indices of the old ODD to that of the new ODD by calling the callback for each old-new offset pair. | |
void | exportToDot (std::string const &filename) const |
Exports the ODD in the dot format to the given file. | |
void | exportToText (std::string const &filename) const |
Exports the ODD in the text format to the given file. | |
storm::storage::BitVector | getEncoding (uint64_t offset, uint64_t variableCount=0) const |
Retrieves the encoding for the given offset. | |
storm::dd::Odd::Odd | ( | std::shared_ptr< Odd > | elseNode, |
uint_fast64_t | elseOffset, | ||
std::shared_ptr< Odd > | thenNode, | ||
uint_fast64_t | thenOffset | ||
) |
Constructs an offset-labeled DD with the given topmost DD node, else- and then-successor.
dd | The DD node associated with this ODD node. |
elseNode | The else-successor of thie ODD node. |
elseOffset | The offset of the else-successor. |
thenNode | The then-successor of thie ODD node. |
thenOffset | The offset of the then-successor. |
|
default |
|
default |
|
default |
template void storm::dd::Odd::expandExplicitVector | ( | storm::dd::Odd const & | newOdd, |
std::vector< ValueType > const & | oldValues, | ||
std::vector< ValueType > & | newValues | ||
) | const |
Adds the old values to the new values.
It does so by writing the old values at their correct positions wrt. to the new ODD.
newOdd | The new ODD to use. |
oldValues | The old vector of values (which is being read). |
newValues | The new vector of values (which is being written). |
void storm::dd::Odd::exportToDot | ( | std::string const & | filename | ) | const |
void storm::dd::Odd::exportToText | ( | std::string const & | filename | ) | const |
uint_fast64_t storm::dd::Odd::getElseOffset | ( | ) | const |
Odd const & storm::dd::Odd::getElseSuccessor | ( | ) | const |
storm::storage::BitVector storm::dd::Odd::getEncoding | ( | uint64_t | offset, |
uint64_t | variableCount = 0 |
||
) | const |
uint_fast64_t storm::dd::Odd::getHeight | ( | ) | const |
uint_fast64_t storm::dd::Odd::getNodeCount | ( | ) | const |
uint_fast64_t storm::dd::Odd::getThenOffset | ( | ) | const |
Odd const & storm::dd::Odd::getThenSuccessor | ( | ) | const |
uint_fast64_t storm::dd::Odd::getTotalOffset | ( | ) | const |
bool storm::dd::Odd::isTerminalNode | ( | ) | const |
void storm::dd::Odd::oldToNewIndex | ( | storm::dd::Odd const & | newOdd, |
std::function< void(uint64_t oldOffset, uint64_t newOffset)> const & | callback | ||
) | const |
Translates the indices of the old ODD to that of the new ODD by calling the callback for each old-new offset pair.
Note that for each old offset, there may be multiple new offsets. The new ODD is expected to extend the old ODD by adding layers at the bottom.
newOdd | The new ODD to use. |
callback | The callback function. |
void storm::dd::Odd::setElseOffset | ( | uint_fast64_t | newOffset | ) |
void storm::dd::Odd::setThenOffset | ( | uint_fast64_t | newOffset | ) |