DependencyGraph

interface DependencyGraph<T>

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

Parameters

<T>

The parametrization type for reactions

Functions

Link copied to clipboard
abstract fun addNeighbor(n1: Node<T>, n2: Node<T>)
Given two nodes, the graph assumes they are now neighbors and calculates the neighborhood dependencies between them.
Link copied to clipboard
abstract fun createDependencies(reactionHandler: Actionable<T>)
This method creates the dependencies when a new reaction is added to the environment.
Link copied to clipboard
Link copied to clipboard
abstract fun outboundDependencies(reaction: Actionable<T>): ListSet<Actionable<T>>
Returns the set of reactions that may be influenced by the provided reaction.
Link copied to clipboard
abstract fun removeDependencies(reactionHandler: Actionable<T>)
This method removes all the dependencies (both in and out dependencies) for a given reaction handler.
Link copied to clipboard
abstract fun removeNeighbor(n1: Node<T>, n2: Node<T>)
Given two nodes, the engine assumes they are no longer neighbors and deletes the neighborhood dependencies between them.