Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEdgeConflicts = errors.New("edge conflicts")
View Source
var ErrUndefinedNode = errors.New("undefined node")
Functions ¶
func NewDirected ¶ added in v0.0.2
func NewDirected[ID comparable]() *directedGraph[ID]
Types ¶
type Graph ¶
type Graph[ID comparable] interface { Nodes() []ID NodesLen() int CheckNode(id ID) bool AddNode(id ID) bool DeleteNode(id ID) bool ChildrenOf(id ID) ([]ID, bool) ParentsOf(id ID) ([]ID, bool) GetEdge(src, tgt ID) (Weight, bool) AddEdge(src, tgt ID, w Weight) error SetEdge(src, tgt ID, w Weight) error DeleteEdge(src, tgt ID) bool }
type Runtime ¶
type Runtime[ID comparable] struct { // contains filtered or unexported fields }
func NewRuntime ¶
func NewRuntime[ID comparable](graph Graph[ID]) *Runtime[ID]
func (*Runtime[ID]) DAGSortAll ¶
Click to show internal directories.
Click to hide internal directories.