The Node class represents an LVBDD node. More...
#include <lavabdd.h>
Public Member Functions | |
Node (int index, const V &val, const NodePtr &lo, const NodePtr &hi) | |
Constructor. Do not use this unless you know what you're doing. Wrong use of this constructor will lead to normal form violation. | |
int | index () const |
Returns the nodes's index (zero for terminal nodes, and larger for nonterminal nodes). | |
size_t | hash () const |
Returns a hash value for the node. This is the XOR of four hashes : the index, the value and the lo and hi child pointers. | |
int | refcount () const |
Returns the node's reference count. | |
const V & | value () const |
Returns the node's label value. | |
void | value (V &value) const |
Returns the node's label value. | |
NodePtr | lo () const |
Returns the node's low-child. | |
NodePtr | hi () const |
Returns the node's high-child. | |
bool | operator== (const Node &other) const |
Node equality operator. Returns true iff the compared Node has the same index, the same value and the same low- and high-child pointers. Runs in O(1). | |
bool | operator!= (const Node &other) const |
Node inequality operator. Same remark as Node::operator==. | |
Static Public Member Functions | |
static void | print_graphviz (ostream &out=cout, NodePtr root=NULL) |
Outputs a DOT diagram representation of all descendants of a node. |
The Node class represents an LVBDD node.
To avoid memory leaks and corruption, this package will not let you access this class directly; see NodePtr.
lava::Node< L, F >::Node | ( | int | index, | |
const V & | val, | |||
const NodePtr & | lo, | |||
const NodePtr & | hi | |||
) | [inline] |
Constructor. Do not use this unless you know what you're doing. Wrong use of this constructor will lead to normal form violation.
[in] | index | : An index value strictly larger than zero for non-terminal nodes and equal to zero for terminal nodes. |
[in] | val | : The value labeling the node. |
[in] | lo | : The node's low-child (must be NULL for terminal nodes, non-NULL for nonterminal nodes) |
[in] | hi | : The node's high-child (must be NULL for terminal nodes, non-NULL for nonterminal nodes) |
static void lava::Node< L, F >::print_graphviz | ( | ostream & | out = cout , |
|
NodePtr | root = NULL | |||
) | [inline, static] |
Outputs a DOT diagram representation of all descendants of a node.
[in] | out | : The output stream on which to write. |
[in] | root | : The root node of which we want to print the descendants. If NULL, all nodes are printed. |