net.sf.javabdd
Class BDDVarSet

java.lang.Object
  extended by net.sf.javabdd.BDDVarSet
Direct Known Subclasses:
BDDFactoryIntImpl.IntBDDVarSet, BDDVarSet.DefaultImpl, TypedBDDFactory.TypedBDDVarSet

public abstract class BDDVarSet
extends Object

Some BDD methods, namely exist(), forall(), unique(), relprod(), applyAll(), applyEx(), applyUni(), and satCount() take a BDDVarSet argument.

Version:
$Id$
Author:
jwhaley

Nested Class Summary
static class BDDVarSet.DefaultImpl
          Default implementation of BDDVarSet based on BDDs.
 
Constructor Summary
BDDVarSet()
           
 
Method Summary
abstract  boolean equals(BDDVarSet that)
          Returns true if the sets are equal.
 boolean equals(Object o)
           
abstract  void free()
           
 BDDDomain[] getDomains()
          Scans this BDD and copies the stored variables into an array of BDDDomains.
abstract  BDDFactory getFactory()
          Returns the factory that created this BDDVarSet.
abstract  int hashCode()
           
abstract  BDDVarSet id()
           
abstract  BDDVarSet intersect(BDDVarSet b)
          Returns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet.
abstract  BDDVarSet intersectWith(BDDVarSet b)
          Modifies this BDDVarSet to include all of the vars in the given set.
abstract  boolean isEmpty()
           
abstract  int size()
           
abstract  int[] toArray()
           
abstract  BDD toBDD()
           
abstract  int[] toLevelArray()
           
 String toString()
           
abstract  BDDVarSet union(BDDVarSet b)
          Returns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet.
abstract  BDDVarSet union(int var)
          Returns a new BDDVarSet that is the union of the current BDDVarSet and the given variable.
abstract  BDDVarSet unionWith(BDDVarSet b)
          Modifies this BDDVarSet to include all of the vars in the given set.
abstract  BDDVarSet unionWith(int var)
          Modifies this BDDVarSet to include the given variable.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BDDVarSet

public BDDVarSet()
Method Detail

getFactory

public abstract BDDFactory getFactory()

Returns the factory that created this BDDVarSet.

Returns:
factory that created this BDDVarSet

toBDD

public abstract BDD toBDD()

id

public abstract BDDVarSet id()

free

public abstract void free()

size

public abstract int size()

isEmpty

public abstract boolean isEmpty()

toArray

public abstract int[] toArray()

toLevelArray

public abstract int[] toLevelArray()

toString

public String toString()
Overrides:
toString in class Object

getDomains

public BDDDomain[] getDomains()

Scans this BDD and copies the stored variables into an array of BDDDomains. The domains returned are guaranteed to be in ascending order.

Compare to fdd_scanset.

Returns:
int[]

union

public abstract BDDVarSet union(BDDVarSet b)

Returns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet. This constructs a new set; neither the current nor the given BDDVarSet is modified.

Parameters:
b - BDDVarSet to union with
Returns:
a new BDDVarSet that is the union of the two sets

union

public abstract BDDVarSet union(int var)

Returns a new BDDVarSet that is the union of the current BDDVarSet and the given variable. This constructs a new set; the current BDDVarSet is not modified.

Parameters:
b - variable to add to set
Returns:
a new BDDVarSet that includes the given variable

unionWith

public abstract BDDVarSet unionWith(BDDVarSet b)

Modifies this BDDVarSet to include all of the vars in the given set. This modifies the current set in place and consumes the given set.

Parameters:
b - BDDVarSet to union in
Returns:
this

unionWith

public abstract BDDVarSet unionWith(int var)

Modifies this BDDVarSet to include the given variable. This modifies the current set in place.

Parameters:
b - variable to add to set
Returns:
this

intersect

public abstract BDDVarSet intersect(BDDVarSet b)

Returns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet. This constructs a new set; neither the current nor the given BDDVarSet is modified.

Parameters:
b - BDDVarSet to union with
Returns:
a new BDDVarSet that is the union of the two sets

intersectWith

public abstract BDDVarSet intersectWith(BDDVarSet b)

Modifies this BDDVarSet to include all of the vars in the given set. This modifies the current set in place and consumes the given set.

Parameters:
b - BDDVarSet to union in
Returns:
this

hashCode

public abstract int hashCode()
Overrides:
hashCode in class Object

equals

public abstract boolean equals(BDDVarSet that)
Returns true if the sets are equal.

Parameters:
that - other set
Returns:
true if the sets are equal

equals

public final boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2003-2007 John Whaley. All Rights Reserved.