Package org.jreliability.bdd
Interface BDD<T>
- Type Parameters:
T
- the type of the variables
- All Known Implementing Classes:
JBDD
public interface BDD<T>
-
Method Summary
Modifier and TypeMethodDescriptionallsat()
Returns the logicaland
of two BDDs.void
andWith
(Collection<T> that) Makes this BDD the logicaland
of this andthat
variables.void
void
Makes this BDD the logicaland
of this andthat
variable.copy()
Returns a copy of thisBDD
.boolean
TODO Returnstrue
if this BDD equalsthat
BDD.Returns thisBDD
after an existential quantification of the specified variable.Returns thisBDD
after a universal quantification of the specified variable.void
free()
Destroys thisBDD
.Returns the usedBDDProvider
.Returns the set of variables that are used in thisBDD
.high()
Returns thetrue
or1
branch of this BDD.Returns the logical implication of twoBDD
s.void
Returns the logical implication of twoBDD
s.void
Makes this BDD the logical implication of this andthat
variable.boolean
isOne()
Returnstrue
if this BDD is theone
BDD.boolean
isZero()
Returnstrue
if this BDD is thezero
BDD.int
level()
Returns the level of thisBDD
.low()
int
Returns the number of node in thisBDD
.not()
Returns the logical or of twoBDD
s.void
orWith
(Collection<T> that) Makes thisBDD
the logical or of this andthat
variables.void
Makes this BDD the logical or of this andthat
BDD
.void
Makes this BDD the logical or of this andthat
variable.void
replaceWith
(T variable1, T variable2) void
restrictWith
(BDD<T> that) Restricts the variables ofthat
to constant reliabilityFunctions in this BDD.sat()
Returns one satisfying variable assignment as aBDD
.var()
Returns the variable labeling theBDD
.Returns the logical xor of twoBDD
s.void
Makes thisBDD
the logical xor of this andthat
BDD.void
Makes thisBDD
the logical xor of this andthat
variable.
-
Method Details
-
allsat
- Returns:
- all satisfying variable assignments
-
and
Returns the logicaland
of two BDDs. Note: Both BDDs remain unchanged after this and-operation.- Parameters:
that
- the BDD to and with this BDD- Returns:
- the logical and of the two BDDs
-
andWith
Makes this BDD the logicaland
of this andthat
BDD
. Note:That
BDD is consumed(!) within this operation and invalid afterwards.- Parameters:
that
- the BDD to and with this BDD
-
andWith
Makes this BDD the logicaland
of this andthat
variables.- Parameters:
that
- the variables to and with this BDD
-
andWith
Makes this BDD the logicaland
of this andthat
variable.- Parameters:
that
- the variable to and with this BDD
-
equals
TODO Returnstrue
if this BDD equalsthat
BDD. -
exist
Returns thisBDD
after an existential quantification of the specified variable.- Parameters:
variable
- the variable for the existential quantification- Returns:
- this BDD after an existential quantification of the specified variables
-
forAll
Returns thisBDD
after a universal quantification of the specified variable.- Parameters:
variable
- the variable for the universal quantification- Returns:
- this BDD after a universal quantification of the specified variables
-
sat
Returns one satisfying variable assignment as aBDD
.- Returns:
- one satisfying variable assignment as a BDD
-
high
Returns thetrue
or1
branch of this BDD.- Returns:
- the true or 1 branch of this BDD
-
getProvider
BDDProvider<T> getProvider()Returns the usedBDDProvider
.- Returns:
- the used bdd provider
-
isOne
boolean isOne()Returnstrue
if this BDD is theone
BDD.- Returns:
- true if this BDD is the one BDD
-
isZero
boolean isZero()Returnstrue
if this BDD is thezero
BDD.- Returns:
- true if this BDD is the zero BDD
-
ite
Returns the if-then-else}BDD
with thisBDD
being the if, thethenBDD
being the then andelseBDD
being the else statement.- Parameters:
thenBDD
- the BDD for the then statementelseBDD
- the BDD for the else statement- Returns:
- the if-then-else BDD
-
level
int level()Returns the level of thisBDD
.- Returns:
- the level of this BDD
-
low
- Returns:
- the false or 0 branch of this BDD
-
not
- Returns:
- a BDD that is the negation of this BDD
-
nodeCount
int nodeCount()Returns the number of node in thisBDD
.- Returns:
- the number of nodes in this bdd
-
or
Returns the logical or of twoBDD
s. Note: Both BDDs remain unchanged after this or-operation.- Parameters:
that
- the BDD to or with this BDD- Returns:
- the logical or of the two BDDs
-
orWith
Makes this BDD the logical or of this andthat
BDD
. Note:That
BDD is consumed(!) within this operation and invalid afterwards.- Parameters:
that
- the BDD to or with this BDD
-
orWith
Makes thisBDD
the logical or of this andthat
variables.- Parameters:
that
- the variables to or with this BDD
-
orWith
Makes this BDD the logical or of this andthat
variable.- Parameters:
that
- the variable to or with this BDD
-
replace
- Parameters:
variable1
- the first variablevariable2
- the second variable- Returns:
- a BDD where the variable for variable1 is replaced with the variable of variable2
-
replaceWith
- Parameters:
variable1
- the first variablevariable2
- the second variable
-
restrict
Returns aBDD
where the variables ofthat
BDD
are set to constant reliabilityFunctions in this BDD. Note: Both BDDs remain unchanged after this or-operation.- Parameters:
that
- the BDD to restrict this BDD with- Returns:
- a new BDD representing this BDD restricted with that BDD
-
restrictWith
Restricts the variables ofthat
to constant reliabilityFunctions in this BDD. Note:That
BDD is consumed(!) within this operation and invalid afterwards.- Parameters:
that
- the BDD to restrict this BDD with
-
var
T var()Returns the variable labeling theBDD
.- Returns:
- the variable labeling the BDD
-
xor
Returns the logical xor of twoBDD
s. Note: Both BDDs remain unchanged after this xor-operation.- Parameters:
that
- the BDD to xor with this BDD- Returns:
- the logical xor of the two BDDs
-
xorWith
Makes thisBDD
the logical xor of this andthat
BDD. Note:That
BDD is consumed(!) within this operation and invalid afterwards.- Parameters:
that
- the BDD to xor with this BDD
-
xorWith
Makes thisBDD
the logical xor of this andthat
variable.- Parameters:
that
- the variable to or with this BDD
-
imp
Returns the logical implication of twoBDD
s. Note: Both BDDs remain unchanged after this and-operation.- Parameters:
that
- the BDD to implicate with this BDD- Returns:
- the logical implication of the two BDDs
-
impWith
Returns the logical implication of twoBDD
s. Note:That
BDD is consumed(!) within this operation and invalid afterwards.- Parameters:
that
- the BDD to implicate with this BDD
-
impWith
Makes this BDD the logical implication of this andthat
variable.- Parameters:
that
- the variable to implicate with this BDD
-
copy
Returns a copy of thisBDD
.- Returns:
- a copy of this object
-
getVariables
Returns the set of variables that are used in thisBDD
.- Returns:
- the set of variables that are used in this bdd
-
free
void free()Destroys thisBDD
.
-