booster / com.didiglobal.booster.graph / Graph

Graph

class Graph<N : Node> : Iterable<Edge<N>>

Represents a graph

Author
johnsonlee

Types

Builder

class Builder<N : Node>

Properties

nodes

val nodes: Collection<N>

title

val title: String

Functions

get

operator fun get(from: N): Set<N>

getPredecessors

fun getPredecessors(node: N): Set<N>

getSuccessors

fun getSuccessors(node: N): Set<N>

iterator

fun iterator(): Iterator<Edge<N>>

print

Print this graph

fun print(out: PrintWriter = PrintWriter(System.out, true), transform: (Graph<N>) -> CharSequence): Unit

reversed

fun reversed(): Graph<N>