Class BDDTopEvent<T>

java.lang.Object
org.jreliability.bdd.BDDTopEvent<T>
Type Parameters:
T - the type of variables

public class BDDTopEvent<T> extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    protected 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

    Constructors
    Constructor
    Description
    Constructs the BDDTopEvent calculator for a given BDD.
  • Method Summary

    Modifier and Type
    Method
    Description
    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 a BDD node.
    double
    calculate(org.apache.commons.collections15.Transformer<T,Double> transformer)
    Calculates the top event for the values given by the functionTransformer.
    protected BDDTopEvent<T>.org.jreliability.bdd.BDDTopEvent.Var
    Returns the internal variable for a BDD.

    Methods inherited from class java.lang.Object

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

    • variables

      protected Map<T,BDDTopEvent<T>.org.jreliability.bdd.BDDTopEvent.Var> variables
      Map of the original variables to the internal structure of the variables.
    • nodes

      protected List<BDDTopEvent<T>.org.jreliability.bdd.BDDTopEvent.VarNode> nodes
      A list of all variables nodes (ordered from bottom to the root).
    • zero

      protected org.jreliability.bdd.BDDTopEvent.Node zero
      The instance of the zero node.
    • one

      protected org.jreliability.bdd.BDDTopEvent.Node one
      The instance of the one node.
    • root

      protected org.jreliability.bdd.BDDTopEvent.Node root
      The root of the bdd.
  • Constructor Details

    • BDDTopEvent

      public BDDTopEvent(BDD<T> bdd)
      Constructs the BDDTopEvent calculator for a given BDD.
      Parameters:
      bdd - the given BDD
  • Method Details

    • calculate

      public double calculate(org.apache.commons.collections15.Transformer<T,Double> transformer)
      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

      protected BDDTopEvent<T>.org.jreliability.bdd.BDDTopEvent.Var getVariable(BDD<T> bdd)
      Returns the internal variable for a BDD.
      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 a BDD node.
      Parameters:
      bdd - the original BDD node
      map - a map from the internal node to the BDD node
      Returns:
      the internal node