Documentation ¶
Index ¶
- type AcyclicGraph
- func (g *AcyclicGraph[T]) AddEdge(from, to T)
- func (g *AcyclicGraph[T]) AddVertex(v T)
- func (g *AcyclicGraph[T]) TopologicalSort(sortFunc SortFunc[T]) (result []T)
- func (g *AcyclicGraph[T]) TransitiveReduction(target T) AcyclicGraph[T]
- func (g *AcyclicGraph[T]) Validate() error
- func (g *AcyclicGraph[T]) Walk(target T, visitor WalkFunc[T])
- type SortFunc
- type WalkFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcyclicGraph ¶
type AcyclicGraph[T comparable] struct { Vertices syncmap.Map Edges syncmap.Map }
func Clone ¶
func Clone[T comparable](g *AcyclicGraph[T]) *AcyclicGraph[T]
func (*AcyclicGraph[T]) AddEdge ¶
func (g *AcyclicGraph[T]) AddEdge(from, to T)
func (*AcyclicGraph[T]) AddVertex ¶
func (g *AcyclicGraph[T]) AddVertex(v T)
func (*AcyclicGraph[T]) TopologicalSort ¶
func (g *AcyclicGraph[T]) TopologicalSort(sortFunc SortFunc[T]) (result []T)
func (*AcyclicGraph[T]) TransitiveReduction ¶
func (g *AcyclicGraph[T]) TransitiveReduction(target T) AcyclicGraph[T]
func (*AcyclicGraph[T]) Validate ¶
func (g *AcyclicGraph[T]) Validate() error
func (*AcyclicGraph[T]) Walk ¶
func (g *AcyclicGraph[T]) Walk(target T, visitor WalkFunc[T])
Click to show internal directories.
Click to hide internal directories.