Documentation
¶
Index ¶
- type Cycle
- type Edge
- type Graph
- func (g *Graph[T]) AddFromToEdge(fromId string, toIds ...string) error
- func (g *Graph[T]) AddNode(node *Node[T])
- func (g *Graph[T]) AllNodes() []*Node[T]
- func (g *Graph[T]) Edge(uid, vid int64) graph.Edge
- func (g *Graph[T]) From(id int64) graph.Nodes
- func (g *Graph[T]) FromId(id string) []*Node[T]
- func (g *Graph[T]) Get(id string) *Node[T]
- func (g *Graph[T]) GetNodesWithoutParents() []*Node[T]
- func (g *Graph[T]) Has(nodeId string) bool
- func (g *Graph[T]) HasEdgeBetween(xid, yid int64) bool
- func (g *Graph[T]) HasEdgeFromTo(uid, vid int64) bool
- func (g *Graph[T]) Node(id int64) graph.Node
- func (g *Graph[T]) Nodes() graph.Nodes
- func (g *Graph[T]) RemoveCycles(node *Node[T]) []Cycle
- func (g *Graph[T]) RemoveFromToEdge(fromId string, toId string)
- func (g *Graph[T]) RemoveJohnsonCycles() []Cycle
- func (g *Graph[T]) To(id int64) graph.Nodes
- func (g *Graph[T]) ToId(id string) []*Node[T]
- type Node
- type Nodes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶ added in v0.17.4
type Edge[T any] struct { // contains filtered or unexported fields }
func (*Edge[T]) ReversedEdge ¶ added in v0.17.4
type Graph ¶
type Graph[T any] struct { // contains filtered or unexported fields }
func (*Graph[T]) AddFromToEdge ¶ added in v0.17.4
func (*Graph[T]) GetNodesWithoutParents ¶ added in v0.19.0
func (*Graph[T]) HasEdgeBetween ¶ added in v0.17.4
func (*Graph[T]) HasEdgeFromTo ¶ added in v0.17.4
func (*Graph[T]) RemoveCycles ¶ added in v0.17.4
func (*Graph[T]) RemoveFromToEdge ¶ added in v0.17.4
func (*Graph[T]) RemoveJohnsonCycles ¶ added in v0.19.0
type Node ¶
type Node[T any] struct { // Id identifies the node with a string. This is typically the absolute path // of a file in dep-tree. Id string // Errors This node might hold some errors that are worth rendering to the user. // For example, if the node is a file, maybe it failed to be parsed. Errors []error // Data is a generic implementation-defined data bucket. Implementations can put // whatever they want here. Data T }
type Nodes ¶ added in v0.17.4
type Nodes[T any] struct { // contains filtered or unexported fields }
func NewNodesIterator ¶ added in v0.17.4
Click to show internal directories.
Click to hide internal directories.