![]() ![]() |
MQT Core
The Backbone of the Munich Quantum Toolkit (MQT)
|
A DD node with a cached edge weight. More...
#include <CachedEdge.hpp>
Public Member Functions | |
| CachedEdge ()=default | |
| CachedEdge (Node *n, const ComplexValue &v) | |
| CachedEdge (Node *n, const Complex &c) | |
| bool | operator== (const CachedEdge &other) const |
| Compares node pointers and approximately compares the weights. | |
| bool | operator!= (const CachedEdge &other) const |
| constexpr bool | isTerminal () const |
| Check whether this is a terminal. | |
Static Public Member Functions | |
| static constexpr CachedEdge | terminal (const ComplexValue &w) |
| Create a terminal edge with the given weight. | |
| static constexpr CachedEdge | terminal (const std::complex< fp > &w) |
| Create a terminal edge with the given weight. | |
| static constexpr CachedEdge | terminal (const Complex &w) |
| Create a terminal edge with the given weight. | |
| static constexpr CachedEdge | zero () |
| Create a zero terminal edge. | |
| static constexpr CachedEdge | one () |
| Create a one terminal edge. | |
Public Attributes | |
| Node * | p {} |
| ComplexValue | w |
A DD node with a cached edge weight.
Some DD operations create intermediate results that are not part of the final result. To avoid storing these intermediate results in the unique table, they are represented via cached numbers.
| Node | Type of the DD node |
|
default |
|
inline |
|
inline |
|
inline |
Compares node pointers and approximately compares the weights.
Weight comparison uses a tolerance to account for floating-point error.
|
inline |
|
inlinestaticnodiscardconstexpr |
Create a terminal edge with the given weight.
| w | The weight of the terminal edge. |
|
inlinestaticnodiscardconstexpr |
Create a terminal edge with the given weight.
| w | The weight of the terminal edge. |
|
inlinestaticnodiscardconstexpr |
Create a terminal edge with the given weight.
| w | The weight of the terminal edge. |
|
inlinestaticnodiscardconstexpr |
Create a zero terminal edge.
|
inlinestaticnodiscardconstexpr |
Create a one terminal edge.
|
inlinenodiscardconstexpr |
Check whether this is a terminal.
| Node* dd::CachedEdge< Node >::p {} |
| ComplexValue dd::CachedEdge< Node >::w |