SableJBDD.bdd.internal
Class BddNodePool

java.lang.Object
  extended bySableJBDD.bdd.internal.BddNodePool
All Implemented Interfaces:
BddNodeFactory, Profiling
Direct Known Subclasses:
NonReclaimableNodePool, ReclaimableNodePool

public abstract class BddNodePool
extends java.lang.Object
implements BddNodeFactory

A BDD node pool pre-allocates and recycles bdd nodes. This class implements all necessary pooling functions, including adding, creating nodes. When the pool is empty, new nodes are created and subclasses get notified of newNodeCreated event, and can perform some pooling and recycling operations by changing pooled node queue.


Field Summary
 
Fields inherited from interface SableJBDD.bdd.util.Profiling
PROFILING
 
Method Summary
 JBddNode getFreshNode(JBddVariable var, JBddNode low, JBddNode high)
          Gets a node from a pool either by reusing an existing node or by creating a new object.
 void reportStatistics(java.io.PrintStream out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFreshNode

public JBddNode getFreshNode(JBddVariable var,
                             JBddNode low,
                             JBddNode high)
Gets a node from a pool either by reusing an existing node or by creating a new object. NOTE: a JBddNode is a unique object,

Specified by:
getFreshNode in interface BddNodeFactory

reportStatistics

public void reportStatistics(java.io.PrintStream out)
Specified by:
reportStatistics in interface Profiling