Graph

interface Graph(source)

Simple graph interface used to represent the graph of nodes in a io.github.yafrl.timeline.Timeline

Inheritors

Functions

Link copied to clipboard
abstract fun addBehavior(behavior: ExternalBehavior)
Link copied to clipboard
abstract fun addChild(behavior: BehaviorID, child: NodeID)

abstract fun addChild(parent: NodeID, child: NodeID)

Adds a parent-child edge to the graph.

Link copied to clipboard
abstract fun addNode(node: Node<*>)

Adds a node to the graph.

Link copied to clipboard
Link copied to clipboard
abstract fun getChildrenOf(id: NodeID): List<NodeID>

Get the list of all child nodes of a node in the graph.

Link copied to clipboard

Get the current list of the child map in the graph.

Link copied to clipboard
abstract fun getCurrentNodeMap(): Map<NodeID, Node<*>>

Get the current map of nodes in the graph.

Link copied to clipboard
abstract fun getCurrentNodes(): Collection<Node<*>>

Get the list of current nodes in the graph.

Link copied to clipboard
Link copied to clipboard
abstract fun getNode(id: NodeID): Node<*>?

Get the node (if any) corresponding to the given id.

Link copied to clipboard
abstract fun resetChildren(map: Map<NodeID, Collection<NodeID>>)

Reset the state of the child map to match that of the passed map.