1#ifndef STORM_STORAGE_DD_ODD_H_
2#define STORM_STORAGE_DD_ODD_H_
7#include <unordered_set>
27 Odd(std::shared_ptr<Odd> elseNode, uint_fast64_t elseOffset, std::shared_ptr<Odd> thenNode, uint_fast64_t thenOffset);
117 template<
typename ValueType>
128 void oldToNewIndex(
storm::dd::Odd const& newOdd, std::function<
void(uint64_t oldOffset, uint64_t newOffset)>
const& callback)
const;
135 void exportToDot(std::string
const& filename)
const;
160 void addToLevelToOddNodesMap(std::map<uint_fast64_t, std::unordered_set<storm::dd::Odd const*>>& levelToOddNodesMap, uint_fast64_t level = 0)
const;
173 template<
typename ValueType>
174 static void expandValuesToVectorRec(uint_fast64_t oldOffset,
storm::dd::Odd const& oldOdd, std::vector<ValueType>
const& oldValues, uint_fast64_t newOffset,
177 static void oldToNewIndexRec(uint_fast64_t oldOffset,
storm::dd::Odd const& oldOdd, uint_fast64_t newOffset,
storm::dd::Odd const& newOdd,
178 std::function<
void(uint64_t oldOffset, uint64_t newOffset)>
const& callback);
181 std::shared_ptr<Odd> elseNode;
182 std::shared_ptr<Odd> thenNode;
185 uint_fast64_t elseOffset;
186 uint_fast64_t thenOffset;
Odd const & getThenSuccessor() const
Retrieves the then-successor of this ODD node.
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.
Odd & operator=(Odd const &other)=default
void exportToText(std::string const &filename) const
Exports the ODD in the text format to the given file.
uint_fast64_t getNodeCount() const
Retrieves the size of the ODD.
uint_fast64_t getTotalOffset() const
Retrieves the total offset, i.e., the sum of the then- and else-offset.
uint_fast64_t getElseOffset() const
Retrieves the else-offset of this ODD node.
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...
Odd & operator=(Odd &&other)=default
Odd(Odd const &other)=default
void setElseOffset(uint_fast64_t newOffset)
Sets the else-offset of this ODD node.
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.
void setThenOffset(uint_fast64_t newOffset)
Sets the then-offset of this ODD node.
storm::storage::BitVector getEncoding(uint64_t offset, uint64_t variableCount=0) const
Retrieves the encoding for the given offset.
Odd const & getElseSuccessor() const
Retrieves the else-successor of this ODD node.
void exportToDot(std::string const &filename) const
Exports the ODD in the dot format to the given file.
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.
storage::BitVector BitVector