Documentation
¶
Overview ¶
The package contains sorting algorithms for graph
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetParentOnlyVertices ¶
func GetParentOnlyVertices(g *parts.Graph) (*list.VerticeStore, error)
Go through the graph looking for vertices that has no incoming edges.
func Kahn ¶
Kahn sorting algorithm for graph. It uses list store for storing vertices. This function will make a deep copy of the graph. So be cautious if your graph is big as it will consume double the memory.
It returs three values. The `bool` value is used for if the graph is cyclic. The second value is the sorted list of the vertices. The error returns as the third value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.