Package org.jreliability.bdd.javabdd
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>
The
JBDDProvider
used to get JBDD
BDDs.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.github.javabdd.BDDFactory
The usedBDDFactory
.protected int
The factor to extend the number of variables in case more variables are required.protected int
The offset of the variables.protected int
The number of variables. -
Constructor Summary
ConstructorsConstructorDescriptionJBDDProvider
(int vars) Constructs aJBDDProvider
with a given number of variables.JBDDProvider
(int vars, int variableGrowthFactor, int initialNumberofNodes) Constructs aJBDDProvider
with a given number of variables, the growth rate of the number of variables, and the initial number of nodes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Register variables in the specified order.void
Register variables in the specified order.Returns thevariable
that is represented by theBDD
.Returns theBDD
that represents thevariable
.com.github.javabdd.BDDFactory
Returns the usedBDDFactory
.one()
Returns thetrue
or1
BDD.zero()
Returns thefalse
or0
BDD.
-
Field Details
-
variableOffset
protected int variableOffsetThe offset of the variables. -
factory
protected com.github.javabdd.BDDFactory factoryThe usedBDDFactory
. -
variableToInt
-
intToVariable
-
vars
protected int varsThe number of variables. -
variableGrowthFactor
protected int variableGrowthFactorThe factor to extend the number of variables in case more variables are required.
-
-
Constructor Details
-
JBDDProvider
public JBDDProvider(int vars) Constructs aJBDDProvider
with a given number of variables.- Parameters:
vars
- the number of variables
-
JBDDProvider
public JBDDProvider(int vars, int variableGrowthFactor, int initialNumberofNodes) Constructs aJBDDProvider
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 variablesvariableGrowthFactor
- the factor by which to extend the number of variables if requiredinitialNumberofNodes
- the initial number of nodes reserved in the BDD factory
-
-
Method Details
-
add
Description copied from interface:BDDProvider
Register variables in the specified order.- Specified by:
add
in interfaceBDDProvider<T>
- Parameters:
variables
- the variables to register
-
add
Description copied from interface:BDDProvider
Register variables in the specified order.- Specified by:
add
in interfaceBDDProvider<T>
- Parameters:
variables
- the variables to register
-
zero
Description copied from interface:BDDProvider
Returns thefalse
or0
BDD.- Specified by:
zero
in interfaceBDDProvider<T>
- Returns:
- the false or 0 BDD
-
one
Description copied from interface:BDDProvider
Returns thetrue
or1
BDD.- Specified by:
one
in interfaceBDDProvider<T>
- Returns:
- the true or 1 BDD
-
get
Description copied from interface:BDDProvider
Returns theBDD
that represents thevariable
.- Specified by:
get
in interfaceBDDProvider<T>
- Parameters:
variable
- the variable- Returns:
- the BDD that represents the Object
-
get
Description copied from interface:BDDProvider
Returns thevariable
that is represented by theBDD
.- Specified by:
get
in interfaceBDDProvider<T>
- Parameters:
bdd
- the bdd- Returns:
- the variable represented by the BDD
-
getFactory
public com.github.javabdd.BDDFactory getFactory()Returns the usedBDDFactory
.- Returns:
- the used bdd factory
-