org.jetbrains.kotlinx.jupyter.api.graphs.GraphNode.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jupyter-api Show documentation
Show all versions of kotlin-jupyter-api Show documentation
API for libraries supporting Kotlin Jupyter notebooks
package org.jetbrains.kotlinx.jupyter.api.graphs
/**
* Graph node which represents the object as a part of some hierarchy
*
* Classes implementing this interface should take care of [equals] and [hashCode]
* because they are used for testing the nodes for equality, and wrong implementation
* of these methods may lead to the wrong graph rendering, StackOverflow / OutOfMemory
* errors and so on. See example in [NodeWrapper]
*
* @param T Underlying object type
*/
interface GraphNode {
/**
* Node label with all required information
*/
val label: Label
/**
* Nodes which are connected with the ingoing edges to this one:
* {this} <- {inNode}
*/
val inNodes: List>
/**
* Nodes which are connected with the outgoing edges to this one:
* {this} -> {outNode}
*/
val outNodes: List>
/**
* Nodes which are connected with the undirected edges to this one:
* {this} -- {biNode}
*/
val biNodes: List>
companion object
}