Package org.batfish

Class BDDDomain<T>

java.lang.Object
org.batfish.BDDDomain<T>

public final class BDDDomain<T> extends Object
Class that wraps a BDDInteger around a finite collection of values and provides an API for dealing directly with the values.
  • Constructor Details

    • BDDDomain

      public BDDDomain(net.sf.javabdd.BDDFactory factory, List<T> values, int index)
    • BDDDomain

      public BDDDomain(BDDDomain<T> other)
    • BDDDomain

      public BDDDomain(net.sf.javabdd.BDD pred, BDDDomain<T> other)
      Parameters:
      pred - a predicate based on which the given BDDDomain is restricted.
      other - A BDDDomain
  • Method Details

    • getIsValidConstraint

      public net.sf.javabdd.BDD getIsValidConstraint()
      Returns the constraint that represents any value within the domain.
    • numBits

      public static int numBits(int size)
      Returns the number of bits used to represent a domain of the given size.
      Parameters:
      size - the number of elements in the domain
      Returns:
      the number of bits required
    • value

      public net.sf.javabdd.BDD value(T value)
    • satAssignmentToValue

      public T satAssignmentToValue(net.sf.javabdd.BDD satAssignment)
    • setValue

      public void setValue(T value)
    • support

      public net.sf.javabdd.BDD support()
      Produces a BDD that represents the support (i.e., the set of BDD variables) of this domain.
    • getInteger

      public MutableBDDInteger getInteger()
    • setInteger

      public void setInteger(MutableBDDInteger i)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object