Edge represents an edge in graph
type Edge struct { Source uint32 Target uint32 Next *Edge }
Graph represents a graph with link list
type Graph struct {
// contains filtered or unexported fields
}
func NewGraph() *Graph
NewGraph creates a Graph
func (g *Graph) Flatten(source uint32, log logr.Logger) []uint32
Flatten flattens the subtree from source (without checking whether it's a tree)
func (g *Graph) Insert(source uint32, target uint32)
Insert inserts an Edge into a graph from source to target
func (g *Graph) IterFrom(source uint32) *Edge
IterFrom starts iterating from source node