lava::Node< L, F > Class Template Reference

The Node class represents an LVBDD node. More...

#include <lavabdd.h>

List of all members.

Public Member Functions

 Node (int index, const V &val, NodePtr lo, 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.
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.

Detailed Description

template<class L, int F>
class lava::Node< L, F >

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.


Constructor & Destructor Documentation

template<class L, int F>
lava::Node< L, F >::Node ( int  index,
const V &  val,
NodePtr  lo,
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.

Parameters:
[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)

Member Function Documentation

template<class L, int F>
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.

Parameters:
[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.

The documentation for this class was generated from the following file:
Generated on Tue Feb 23 19:27:52 2010 for LaVaBDD by  doxygen 1.6.3