Documentation ¶
Index ¶
- Variables
- type CheckFn
- type DepMap
- type DependencyInfo
- type Graph
- func (g *Graph[T, V]) AddNode(node T)
- func (g *Graph[T, V]) DependOn(child, parent T) error
- func (g *Graph[T, V]) Dependencies(child T) NodeSet[T]
- func (g *Graph[T, V]) Dependents(parent T) NodeSet[T]
- func (g *Graph[T, V]) DependsOn(child, parent T) bool
- func (g *Graph[T, V]) Exists(node T) bool
- func (g *Graph[T, V]) ForEach(f CheckFn[T, V]) error
- func (g *Graph[T, V]) GetNodeInfo(node T) *NodeInfo[V]
- func (g *Graph[T, V]) GetProviderNode(provides T) *DependencyInfo[T]
- func (g *Graph[T, V]) HasDependent(parent, child T) bool
- func (g *Graph[T, V]) ImmediateDependencies(node T) NodeSet[T]
- func (g *Graph[T, V]) Len() int
- func (g *Graph[T, V]) Provides(provides T, depInfo *alpm.Depend, node T)
- func (g *Graph[T, V]) ProvidesExists(provides T) bool
- func (g *Graph[T, V]) Prune(node T) []T
- func (g *Graph[T, V]) SetNodeInfo(node T, nodeInfo *NodeInfo[V])
- func (g *Graph[T, V]) String() string
- func (g *Graph[T, V]) TopoSortedLayerMap(checkFn CheckFn[T, V]) []map[T]V
- type NodeInfo
- type NodeSet
- type ProvidesMap
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CheckFn ¶
type CheckFn[T comparable, V any] func(T, V) error
type DepMap ¶
type DepMap[T comparable] map[T]NodeSet[T]
type DependencyInfo ¶
type DependencyInfo[T comparable] struct { Provider T alpm.Depend }
type Graph ¶
type Graph[T comparable, V any] struct { // contains filtered or unexported fields }
func New ¶
func New[T comparable, V any]() *Graph[T, V]
func (*Graph[T, V]) Dependencies ¶
func (*Graph[T, V]) Dependents ¶
func (*Graph[T, V]) GetNodeInfo ¶
func (*Graph[T, V]) GetProviderNode ¶
func (g *Graph[T, V]) GetProviderNode(provides T) *DependencyInfo[T]
func (*Graph[T, V]) HasDependent ¶
func (*Graph[T, V]) ImmediateDependencies ¶
func (*Graph[T, V]) Provides ¶
func (g *Graph[T, V]) Provides(provides T, depInfo *alpm.Depend, node T)
func (*Graph[T, V]) ProvidesExists ¶
func (*Graph[T, V]) Prune ¶
func (g *Graph[T, V]) Prune(node T) []T
Prune removes the node, its dependencies if there are no other dependents and its dependents
func (*Graph[T, V]) SetNodeInfo ¶
func (*Graph[T, V]) TopoSortedLayerMap ¶
TopoSortedLayerMap returns a slice of all of the graph nodes in topological sort order with their node info.
type NodeSet ¶
type NodeSet[T comparable] map[T]bool
type ProvidesMap ¶
type ProvidesMap[T comparable] map[T]*DependencyInfo[T]
Click to show internal directories.
Click to hide internal directories.