net.sf.javabdd
Class JTLVJavaFactory

java.lang.Object
  extended by net.sf.javabdd.BDDFactory
      extended by net.sf.javabdd.BDDFactoryIntImpl
          extended by net.sf.javabdd.JTLVJavaFactory

public class JTLVJavaFactory
extends BDDFactoryIntImpl

A new Factory implementation based in the JFactory implementation, dedicated to JTLV user. The main two issues that were adjusted in this factory is the BDD toString, and the factory cloning for multi-threading.

Author:
yaniv

Nested Class Summary
 class JTLVJavaFactory.JTLVIntBDD
           
 class JTLVJavaFactory.JTLVIntBDDVarSet
           
 class JTLVJavaFactory.JTLVIntBDDVarSetWithFinalizer
           
 class JTLVJavaFactory.JTLVIntBDDWithFinalizer
           
 class JTLVJavaFactory.JTLVIntZDDVarSet
           
 class JTLVJavaFactory.JTLVIntZDDVarSetWithFinalizer
           
 
Nested classes/interfaces inherited from class net.sf.javabdd.BDDFactoryIntImpl
BDDFactoryIntImpl.IntBDD, BDDFactoryIntImpl.IntBDDBitVector, BDDFactoryIntImpl.IntBDDVarSet, BDDFactoryIntImpl.IntBDDVarSetWithFinalizer, BDDFactoryIntImpl.IntBDDWithFinalizer, BDDFactoryIntImpl.IntZDDVarSet, BDDFactoryIntImpl.IntZDDVarSetWithFinalizer
 
Nested classes/interfaces inherited from class net.sf.javabdd.BDDFactory
BDDFactory.BDDOp, BDDFactory.CacheStats, BDDFactory.GCStats, BDDFactory.ReorderMethod, BDDFactory.ReorderStats
 
Field Summary
static boolean FLUSH_CACHE_ON_GC
          Flush the operation cache on every garbage collection.
static java.lang.String REVISION
           
 
Fields inherited from class net.sf.javabdd.BDDFactory
and, biimp, diff, imp, invimp, less, nand, nor, or, REORDER_NONE, REORDER_RANDOM, REORDER_SIFT, REORDER_SIFTITE, REORDER_WIN2, REORDER_WIN2ITE, REORDER_WIN3, REORDER_WIN3ITE, xor
 
Method Summary
 void addVarBlock(int first, int last, boolean fixed)
           
 void autoReorder(BDDFactory.ReorderMethod method)
           
 void autoReorder(BDDFactory.ReorderMethod method, int max)
           
 void clearError()
           
 void clearVarBlocks()
           
 JTLVJavaFactory cloneFactory()
           
 BDD copyNode(BDD that)
          Use this function to translate BDD's from a JavaFactory into its clone.
 void disableReorder()
           
 void done()
           
 void enableReorder()
           
 int getCacheSize()
           
 int getNodeNum()
           
 int getNodeTableSize()
           
 BDDFactory.ReorderMethod getReorderMethod()
           
 int getReorderTimes()
           
 java.lang.String getVersion()
           
static BDDFactory init(int nodenum, int cachesize)
           
 boolean isInitialized()
           
 boolean isZDD()
           
 int level2Var(int level)
           
 BDD load(java.io.BufferedReader in, int[] translate)
           
 BDDPairing makePair()
           
 JTLVJavaFactory newCloneFactory()
           
 void printAll()
           
 void printOrder()
           
 void printStat()
           
 void reorder(BDDFactory.ReorderMethod m)
           
 int reorderGain()
           
 int reorderVerbose(int v)
           
 void reverseAllDomains()
           
 void reverseDomain(BDDDomain d)
           
 void save(java.io.BufferedWriter out, BDD b)
           
 double setCacheRatio(double x)
           
 int setCacheSize(int v)
           
 void setError(int code)
           
 double setIncreaseFactor(double x)
           
 int setMaxIncrease(int x)
           
 int setMaxNodeNum(int size)
           
 double setMinFreeNodes(double x)
           
 int setNodeTableSize(int size)
           
 int setVarNum(int num)
           
 void setVarOrder(int[] neworder)
           
 void setVarOrder(java.util.List domains)
           Set the variable order to be the given list of domains.
 void setVarOrder(java.lang.String ordering)
           
 void swapVar(int v1, int v2)
           
 void validateAll()
           
 void validateBDD(BDD b)
           
 int var2Level(int var)
           
 void varBlockAll()
           
 int varNum()
           
 
Methods inherited from class net.sf.javabdd.BDDFactoryIntImpl
deferredFree, emptySet, handleDeferredFree, ithVar, nithVar, nodeCount, one, printTable, universe, zero
 
Methods inherited from class net.sf.javabdd.BDDFactory
addVarBlock, buildCube, buildCube, buildVector, buildVector, buildVector, buildVector, clearAllDomains, constantVector, constantVector, extDomain, extDomain, extDomain, extDomain, extDomain, extVarNum, getCacheStats, getDomain, getGCStats, getProperty, getReorderStats, getVarOrder, init, load, load, makePair, makePair, makePair, makeSet, makeSet, makeVarOrdering, numberOfDomains, overlapDomain, registerGCCallback, registerReorderCallback, registerResizeCallback, reset, save, unregisterGCCallback, unregisterReorderCallback, unregisterResizeCallback
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLUSH_CACHE_ON_GC

public static boolean FLUSH_CACHE_ON_GC
Flush the operation cache on every garbage collection. If this is false, we only clean the collected entries on every GC, rather than emptying the whole cache. For most problems, you should keep this set to true.


REVISION

public static final java.lang.String REVISION
See Also:
Constant Field Values
Method Detail

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in class BDDFactory

init

public static BDDFactory init(int nodenum,
                              int cachesize)

makePair

public BDDPairing makePair()
Specified by:
makePair in class BDDFactory

addVarBlock

public void addVarBlock(int first,
                        int last,
                        boolean fixed)
Specified by:
addVarBlock in class BDDFactory

varBlockAll

public void varBlockAll()
Specified by:
varBlockAll in class BDDFactory

clearVarBlocks

public void clearVarBlocks()
Specified by:
clearVarBlocks in class BDDFactory

printOrder

public void printOrder()
Specified by:
printOrder in class BDDFactory

getNodeTableSize

public int getNodeTableSize()
Specified by:
getNodeTableSize in class BDDFactory

setNodeTableSize

public int setNodeTableSize(int size)
Specified by:
setNodeTableSize in class BDDFactory

setCacheSize

public int setCacheSize(int v)
Specified by:
setCacheSize in class BDDFactory

isZDD

public boolean isZDD()
Overrides:
isZDD in class BDDFactory

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in class BDDFactory

done

public void done()
Overrides:
done in class BDDFactoryIntImpl

setError

public void setError(int code)
Specified by:
setError in class BDDFactory

clearError

public void clearError()
Specified by:
clearError in class BDDFactory

setMaxNodeNum

public int setMaxNodeNum(int size)
Specified by:
setMaxNodeNum in class BDDFactory

setMinFreeNodes

public double setMinFreeNodes(double x)
Specified by:
setMinFreeNodes in class BDDFactory

setMaxIncrease

public int setMaxIncrease(int x)
Specified by:
setMaxIncrease in class BDDFactory

setIncreaseFactor

public double setIncreaseFactor(double x)
Specified by:
setIncreaseFactor in class BDDFactory

getNodeNum

public int getNodeNum()
Specified by:
getNodeNum in class BDDFactory

getCacheSize

public int getCacheSize()
Specified by:
getCacheSize in class BDDFactory

reorderGain

public int reorderGain()
Specified by:
reorderGain in class BDDFactory

printStat

public void printStat()
Specified by:
printStat in class BDDFactory

setCacheRatio

public double setCacheRatio(double x)
Specified by:
setCacheRatio in class BDDFactory

varNum

public int varNum()
Specified by:
varNum in class BDDFactory

setVarNum

public int setVarNum(int num)
Specified by:
setVarNum in class BDDFactory

printAll

public void printAll()
Specified by:
printAll in class BDDFactory

load

public BDD load(java.io.BufferedReader in,
                int[] translate)
         throws java.io.IOException
Overrides:
load in class BDDFactory
Throws:
java.io.IOException

save

public void save(java.io.BufferedWriter out,
                 BDD b)
          throws java.io.IOException
Overrides:
save in class BDDFactory
Throws:
java.io.IOException

setVarOrder

public void setVarOrder(int[] neworder)
Specified by:
setVarOrder in class BDDFactory

level2Var

public int level2Var(int level)
Specified by:
level2Var in class BDDFactory

var2Level

public int var2Level(int var)
Specified by:
var2Level in class BDDFactory

getReorderTimes

public int getReorderTimes()
Specified by:
getReorderTimes in class BDDFactory

disableReorder

public void disableReorder()
Specified by:
disableReorder in class BDDFactory

enableReorder

public void enableReorder()
Specified by:
enableReorder in class BDDFactory

reorderVerbose

public int reorderVerbose(int v)
Specified by:
reorderVerbose in class BDDFactory

reorder

public void reorder(BDDFactory.ReorderMethod m)
Specified by:
reorder in class BDDFactory

autoReorder

public void autoReorder(BDDFactory.ReorderMethod method)
Specified by:
autoReorder in class BDDFactory

autoReorder

public void autoReorder(BDDFactory.ReorderMethod method,
                        int max)
Specified by:
autoReorder in class BDDFactory

swapVar

public void swapVar(int v1,
                    int v2)
Specified by:
swapVar in class BDDFactory

getReorderMethod

public BDDFactory.ReorderMethod getReorderMethod()
Specified by:
getReorderMethod in class BDDFactory

validateAll

public void validateAll()

validateBDD

public void validateBDD(BDD b)

reverseAllDomains

public void reverseAllDomains()

reverseDomain

public void reverseDomain(BDDDomain d)

setVarOrder

public void setVarOrder(java.lang.String ordering)

setVarOrder

public void setVarOrder(java.util.List domains)

Set the variable order to be the given list of domains.

Parameters:
domains - domain order

newCloneFactory

public JTLVJavaFactory newCloneFactory()

cloneFactory

public JTLVJavaFactory cloneFactory()

copyNode

public BDD copyNode(BDD that)
Use this function to translate BDD's from a JavaFactory into its clone. This will only work immediately after cloneFactory() is called, and before any other BDD operations are performed.

Parameters:
that - BDD in old factory
Returns:
a BDD in the new factory