DirectedGraph
class DirectedGraph<V, E>( val out: MutableMap<V, MutableMap<V, E>> = mutableMapOf(), val in: MutableMap<V, MutableSet<V>> = mutableMapOf())(source)
A mutable representation of a directed graph consisting of vertices and directed edges.
Parameters
V
the type representing the vertices in the graph.
E
the type representing the edges in the graph.
Constructors
Link copied to clipboard
constructor(out: MutableMap<V, MutableMap<V, E>> = mutableMapOf(), in: MutableMap<V, MutableSet<V>> = mutableMapOf())
Properties
Link copied to clipboard
a map where keys are vertices, and the values are sets of vertices representing the incoming connections to those vertices.
Link copied to clipboard
a map where the keys represent vertices and the values are maps of adjacent vertices with their associated edge values representing outgoing connections.