Graph

interface Graph<T> : Map<Graph.Vertex<T>, List<Graph.Edge<T>>>

Inheritors

Types

Link copied to clipboard
data class Edge<T>(val source: Graph.Vertex<T>, val destination: Graph.Vertex<T>)
Link copied to clipboard
data class Vertex<T>(val index: Int, val value: T)

Properties

Link copied to clipboard
open val circularVertexes: Map<T, List<T>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val keys: Set<Graph.Vertex<T>>
Link copied to clipboard
abstract val missingVertexes: Set<T>
Link copied to clipboard
abstract var renderer: Any?.() -> String
Link copied to clipboard
abstract val size: Int
Link copied to clipboard
abstract val values: Collection<List<Graph.Edge<T>>>

Functions

Link copied to clipboard
open fun asString(): String
Link copied to clipboard
open fun contains(value: T): Boolean
open fun contains(value: T, predicate: (T) -> Boolean): Boolean
Link copied to clipboard
Link copied to clipboard
abstract fun containsKey(key: Graph.Vertex<T>): Boolean
Link copied to clipboard
abstract fun containsValue(value: List<Graph.Edge<T>>): Boolean
Link copied to clipboard
Link copied to clipboard
abstract operator fun get(key: Graph.Vertex<T>): List<Graph.Edge<T>>?
Link copied to clipboard
abstract fun isEmpty(): Boolean
Link copied to clipboard
open fun renderer(block: Any?.() -> String)
Link copied to clipboard
open fun toGraph(): Graph<T>
Link copied to clipboard
Link copied to clipboard
open fun vertexesFor(vararg values: T): List<T>
open fun vertexesFor(value: T, predicate: (T) -> Boolean = { it == value }): List<T>