Class BDDTopEvent<T>

  • Type Parameters:
    T - the type of variables

    public class BDDTopEvent<T>
    extends java.lang.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 java.util.List<org.jreliability.bdd.BDDTopEvent.VarNode> nodes
      A list of all variables nodes (ordered from bottom to the root).
      protected org.jreliability.bdd.BDDTopEvent.Node one
      The instance of the one node.
      protected org.jreliability.bdd.BDDTopEvent.Node root
      The root of the bdd.
      protected java.util.Map<T,​org.jreliability.bdd.BDDTopEvent.Var> variables
      Map of the original variables to the internal structure of the variables.
      protected org.jreliability.bdd.BDDTopEvent.Node zero
      The instance of the zero node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.jreliability.bdd.BDDTopEvent.Node build​(BDD<T> bdd, java.util.Map<BDD<T>,​org.jreliability.bdd.BDDTopEvent.VarNode> map)
      Builds the internal node from a BDD node.
      double calculate​(org.apache.commons.collections15.Transformer<T,​java.lang.Double> transformer)
      Calculates the top event for the values given by the functionTransformer.
      protected org.jreliability.bdd.BDDTopEvent.Var getVariable​(BDD<T> bdd)
      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 Detail

      • variables

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

        protected java.util.List<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 Detail

      • BDDTopEvent

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

      • calculate

        public double calculate​(org.apache.commons.collections15.Transformer<T,​java.lang.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 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,
                                                              java.util.Map<BDD<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