Class JBDDProvider<T>

java.lang.Object
org.jreliability.bdd.javabdd.JBDDProvider<T>
Type Parameters:
T - the type of the variables
All Implemented Interfaces:
BDDProvider<T>

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

    Fields
    Modifier and Type
    Field
    Description
    protected com.github.javabdd.BDDFactory
    The used BDDFactory.
    protected Map<Integer,T>
    A translation of the Integer in the real BDD to the variable.
    protected int
    The factor to extend the number of variables in case more variables are required.
    protected int
    The offset of the variables.
    protected Map<T,Integer>
    A translation of the variable to an Integer for the real BDD.
    protected int
    The number of variables.
  • Constructor Summary

    Constructors
    Constructor
    Description
    JBDDProvider(int vars)
    Constructs a JBDDProvider with a given number of variables.
    JBDDProvider(int vars, int variableGrowthFactor, int initialNumberofNodes)
    Constructs a JBDDProvider with a given number of variables, the growth rate of the number of variables, and the initial number of nodes.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(List<T> variables)
    Register variables in the specified order.
    void
    add(T... variables)
    Register variables in the specified order.
    get(BDD<T> bdd)
    Returns the variable that is represented by the BDD.
    get(T variable)
    Returns the BDD that represents the variable.
    com.github.javabdd.BDDFactory
    Returns the used BDDFactory.
    one()
    Returns the true or 1 BDD.
    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 Details

    • variableOffset

      protected int variableOffset
      The offset of the variables.
    • factory

      protected com.github.javabdd.BDDFactory factory
      The used BDDFactory.
    • variableToInt

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

      protected Map<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 Details

    • JBDDProvider

      public JBDDProvider(int vars)
      Constructs a JBDDProvider with a given number of variables.
      Parameters:
      vars - the number of variables
    • JBDDProvider

      public JBDDProvider(int vars, int variableGrowthFactor, int initialNumberofNodes)
      Constructs a JBDDProvider with a given number of variables, the growth rate of the number of variables, and the initial number of nodes.
      Parameters:
      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 Details

    • add

      public void add(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 com.github.javabdd.BDDFactory getFactory()
      Returns the used BDDFactory.
      Returns:
      the used bdd factory