Interface DependencyGraph
-
- All Implemented Interfaces:
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 the neighborhood dependencies between them. abstract void
createDependencies(Actionable<T> reactionHandler)
This method creates the dependencies when a new reaction is added to the environment. abstract void
removeDependencies(Actionable<T> reactionHandler)
This method removes all the dependencies (both in and out dependencies) for a given reaction handler. abstract void
removeNeighbor(Node<T> n1, Node<T> n2)
Given two nodes, the engine assumes they are no longer neighbors and deletes the neighborhood dependencies between them. abstract ListSet<Actionable<T>>
outboundDependencies(Actionable<T> reaction)
Returns the set of reactions that may be influenced by the provided reaction. abstract ListSet<Actionable<T>>
globalInputContextReactions()
-
-
Method Detail
-
addNeighbor
abstract void addNeighbor(Node<T> n1, Node<T> n2)
Given two nodes, the graph assumes they are now neighbors and calculates the neighborhood dependencies between them.
- Parameters:
n1
- The first noden2
- The second node
-
createDependencies
abstract void createDependencies(Actionable<T> reactionHandler)
This method creates the dependencies when a new reaction is added to the environment. Please be careful when building the environment and populating the existing reactions map: this method assumes that all the dependencies among the existing reactions are correct and up to date.
- Parameters:
reactionHandler
- the reaction handler whose dependencies should be calculated.
-
removeDependencies
abstract void removeDependencies(Actionable<T> reactionHandler)
This method removes all the dependencies (both in and out dependencies) for a given reaction handler. This method is meant to be used in order to keep the dependencies clean when removing a reaction.
- Parameters:
reactionHandler
- 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 deletes the neighborhood dependencies between them.
- Parameters:
n1
- The first noden2
- The second node
-
outboundDependencies
abstract ListSet<Actionable<T>> outboundDependencies(Actionable<T> reaction)
Returns the set of reactions that may be influenced by the provided reaction.
- Parameters:
reaction
- the input reaction- Returns:
the set of reactions that may be influenced by the provided reaction
-
globalInputContextReactions
abstract ListSet<Actionable<T>> globalInputContextReactions()
- Returns:
the set of all reactions with a GLOBAL input context
-
-
-
-