Class JBDDProvider<T>

  • Type Parameters:
    T - the type of the variables
    All Implemented Interfaces:
    BDDProvider<T>

    public class JBDDProvider<T>
    extends java.lang.Object
    implements BDDProvider<T>
    The JBDDProvider used to get JBDD BDDs.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected net.sf.javabdd.BDDFactory factory
      The used BDDFactory.
      protected java.util.Map<java.lang.Integer,​T> intToVariable
      A translation of the Integer in the real BDD to the variable.
      protected int variableGrowthFactor
      The factor to extend the number of variables in case more variables are required.
      protected int variableOffset
      The offset of the variables.
      protected java.util.Map<T,​java.lang.Integer> variableToInt
      A translation of the variable to an Integer for the real BDD.
      protected int vars
      The number of variables.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.util.List<T> variables)
      Register variables in the specified order.
      void add​(T... variables)
      Register variables in the specified order.
      T get​(BDD<T> bdd)
      Returns the variable that is represented by the BDD.
      BDD<T> get​(T variable)
      Returns the BDD that represents the variable.
      net.sf.javabdd.BDDFactory getFactory()
      Returns the used BDDFactory.
      BDD<T> one()
      Returns the true or 1 BDD.
      BDD<T> zero()
      Returns the false or 0 BDD.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • variableOffset

        protected int variableOffset
        The offset of the variables.
      • factory

        protected net.sf.javabdd.BDDFactory factory
        The used BDDFactory.
      • variableToInt

        protected java.util.Map<T,​java.lang.Integer> variableToInt
        A translation of the variable to an Integer for the real BDD.
      • intToVariable

        protected java.util.Map<java.lang.Integer,​T> intToVariable
        A translation of the Integer in the real BDD to the variable.
      • vars

        protected int vars
        The number of variables.
      • variableGrowthFactor

        protected int variableGrowthFactor
        The factor to extend the number of variables in case more variables are required.
    • Constructor Detail

      • JBDDProvider

        public JBDDProvider​(JBDDProviderFactory.Type type,
                            int vars,
                            int variableGrowthFactor,
                            int initialNumberofNodes)
        Constructs a JBDDProvider with the JBDDProviderFactory.Type of the BDD library to use, a given number of variables, the growth rate of the number of variables, and the initial number of nodes.
        Parameters:
        type - the type of the BDD library
        vars - the number of variables
        variableGrowthFactor - the factor by which to extend the number of variables if required
        initialNumberofNodes - the initial number of nodes reserved in the BDD factory
    • Method Detail

      • add

        public void add​(java.util.List<T> variables)
        Description copied from interface: BDDProvider
        Register variables in the specified order.
        Specified by:
        add in interface BDDProvider<T>
        Parameters:
        variables - the variables to register
      • add

        public void add​(T... variables)
        Description copied from interface: BDDProvider
        Register variables in the specified order.
        Specified by:
        add in interface BDDProvider<T>
        Parameters:
        variables - the variables to register
      • zero

        public BDD<T> zero()
        Description copied from interface: BDDProvider
        Returns the false or 0 BDD.
        Specified by:
        zero in interface BDDProvider<T>
        Returns:
        the false or 0 BDD
      • one

        public BDD<T> one()
        Description copied from interface: BDDProvider
        Returns the true or 1 BDD.
        Specified by:
        one in interface BDDProvider<T>
        Returns:
        the true or 1 BDD
      • get

        public BDD<T> get​(T variable)
        Description copied from interface: BDDProvider
        Returns the BDD that represents the variable.
        Specified by:
        get in interface BDDProvider<T>
        Parameters:
        variable - the variable
        Returns:
        the BDD that represents the Object
      • get

        public T get​(BDD<T> bdd)
        Description copied from interface: BDDProvider
        Returns the variable that is represented by the BDD.
        Specified by:
        get in interface BDDProvider<T>
        Parameters:
        bdd - the bdd
        Returns:
        the variable represented by the BDD
      • getFactory

        public net.sf.javabdd.BDDFactory getFactory()
        Returns the used BDDFactory.
        Returns:
        the used bdd factory