Package org.jreliability.bdd
Class BDDTopEvent<T>
java.lang.Object
org.jreliability.bdd.BDDTopEvent<T>
- Type Parameters:
T
- the type of variables
The
BDDTopEvent
allows the fast calculation of the top event for a
given BDD
.
Here, the BDD
is copied to an internal structure such that the
BDD.free()
method does not interfere with this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
<BDDTopEvent<T>.org.jreliability.bdd.BDDTopEvent.VarNode> A list of all variables nodes (ordered from bottom to the root).protected org.jreliability.bdd.BDDTopEvent.Node
The instance of the one node.protected org.jreliability.bdd.BDDTopEvent.Node
The root of the bdd.protected Map
<T, BDDTopEvent<T>.org.jreliability.bdd.BDDTopEvent.Var> Map of the original variables to the internal structure of the variables.protected org.jreliability.bdd.BDDTopEvent.Node
The instance of the zero node. -
Constructor Summary
ConstructorsConstructorDescriptionBDDTopEvent
(BDD<T> bdd) Constructs theBDDTopEvent
calculator for a givenBDD
. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.jreliability.bdd.BDDTopEvent.Node
Builds the internal node from aBDD
node.double
Calculates the top event for the values given by the functionTransformer.protected BDDTopEvent<T>.org.jreliability.bdd.BDDTopEvent.Var
getVariable
(BDD<T> bdd) Returns the internal variable for aBDD
.
-
Field Details
-
variables
Map of the original variables to the internal structure of the variables. -
nodes
A list of all variables nodes (ordered from bottom to the root). -
zero
protected org.jreliability.bdd.BDDTopEvent.Node zeroThe instance of the zero node. -
one
protected org.jreliability.bdd.BDDTopEvent.Node oneThe instance of the one node. -
root
protected org.jreliability.bdd.BDDTopEvent.Node rootThe root of the bdd.
-
-
Constructor Details
-
BDDTopEvent
Constructs theBDDTopEvent
calculator for a givenBDD
.- Parameters:
bdd
- the given BDD
-
-
Method Details
-
calculate
Calculates the top event for the values given by the functionTransformer.- Parameters:
transformer
- the transformer from the variables to the values- Returns:
- the top event
-
getVariable
Returns the internal variable for aBDD
.- Parameters:
bdd
- the BDD- Returns:
- the corresponding internal variable
-
build
protected org.jreliability.bdd.BDDTopEvent.Node build(BDD<T> bdd, Map<BDD<T>, BDDTopEvent<T>.org.jreliability.bdd.BDDTopEvent.VarNode> map) Builds the internal node from aBDD
node.- Parameters:
bdd
- the original BDD nodemap
- a map from the internal node to the BDD node- Returns:
- the internal node
-