Package 

Interface DependencyGraph


  • 
    public interface DependencyGraph<T>
    
                        

    This interface allows to separate the usage of a dependency graph from its implementation.

    • Method Summary

      Modifier and Type Method Description
      abstract void addNeighbor(Node<T> n1, Node<T> n2) Given two nodes, the graph assumes they are now neighbors and calculates theneighborhood dependencies between them.
      abstract void createDependencies(Reaction<T> rh) This method creates the dependencies when a new reaction is added to theenvironment.
      abstract void removeDependencies(Reaction<T> rh) This method removes all the dependencies (both in and out dependencies) for agiven reaction handler.
      abstract void removeNeighbor(Node<T> n1, Node<T> n2) Given two nodes, the engine assumes they are no longer neighbors and deletesthe neighborhood dependencies between them.
      abstract ListSet<Reaction<T>> outboundDependencies(Reaction<T> reaction) Returns the set of reactions that may be influenced by the provided reaction.
      abstract ListSet<Reaction<T>> globalInputContextReactions()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addNeighbor

         abstract void addNeighbor(Node<T> n1, Node<T> n2)

        Given two nodes, the graph assumes they are now neighbors and calculates theneighborhood dependencies between them.

        Parameters:
        n1 - The first node
        n2 - The second node
      • createDependencies

         abstract void createDependencies(Reaction<T> rh)

        This method creates the dependencies when a new reaction is added to theenvironment. Please be careful when building the environment and populatingthe existing reactions map: this method assumes that all the dependenciesamong the existing reactions are correct and up to date.

        Parameters:
        rh - the reaction handler whose dependencies should be calculated.
      • removeDependencies

         abstract void removeDependencies(Reaction<T> rh)

        This method removes all the dependencies (both in and out dependencies) for agiven reaction handler. This method is meant to be used in order to keep thedependencies clean when removing a reaction.

        Parameters:
        rh - the reaction handler whose dependencies will be deleted.
      • removeNeighbor

         abstract void removeNeighbor(Node<T> n1, Node<T> n2)

        Given two nodes, the engine assumes they are no longer neighbors and deletesthe neighborhood dependencies between them.

        Parameters:
        n1 - The first node
        n2 - The second node
      • outboundDependencies

         abstract ListSet<Reaction<T>> outboundDependencies(Reaction<T> reaction)

        Returns the set of reactions that may be influenced by the provided reaction.

        Parameters:
        reaction - the input reaction