Skip to content

MaterialDesignJsVeiwRenderer / view.utils.algos.graph / Graph

Graph

class Graph<T :Any>

Used for topological sorting and detection of circular dependencies.

One usage of this class is for detecting circular dependencies between positioning rule of RelativeLayout children and figuring which child to render first.

Constructors

<init>
Graph()
Used for topological sorting and detection of circular dependencies.

Functions

addEdge
fun addEdge(from:T, to:T):Unit

topologicalSort
fun topologicalSort():List<T>

Companion Object Functions

fromEdges
fun <T :Any> fromEdges(edges:List<<ERROR CLASS><T,T>>):Graph<T>