JGraphTDependencyGraph

class JGraphTDependencyGraph<T>(environment: Environment<T, *>) : DependencyGraph<T>

This class offers an implementation of a dependency graph, namely a data structure which can address in an efficient way the problem of finding those reactions affected by the execution of another reaction. This class relies heavily on the ReactionHandler interface.

Parameters

concentration type

Constructors

Link copied to clipboard
constructor(environment: Environment<T, *>)

Functions

Link copied to clipboard
open override fun addNeighbor(n1: Node<T>, n2: Node<T>)
Link copied to clipboard
open override fun createDependencies(newReaction: Actionable<T>)

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.

Link copied to clipboard
open override fun globalInputContextReactions(): <Error class: unknown class><Actionable<T>>
Link copied to clipboard
open override fun outboundDependencies(reaction: Actionable<T>?): <Error class: unknown class><Actionable<T>>

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

Link copied to clipboard
open override fun removeDependencies(reaction: Actionable<T>)

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

Link copied to clipboard
open override 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.

Link copied to clipboard
open override fun toString(): <Error class: unknown class>