Documentation ¶
Index ¶
- type Graph
- func (g *Graph[T]) Add(from, to T)
- func (g *Graph[T]) All(yield func(from, to T) bool) bool
- func (g *Graph[T]) AnyNode() (T, bool)
- func (g *Graph[T]) ContainsEdge(from, to T) bool
- func (g *Graph[T]) ContainsNode(node T) bool
- func (g *Graph[T]) EdgeCount() int
- func (g *Graph[T]) EdgesFrom(from T) []T
- func (g *Graph[T]) EdgesTo(to T) []T
- func (g *Graph[T]) FindFrom(f func(module T) bool) (T, bool)
- func (g *Graph[T]) FindLeafNode() (T, bool)
- func (g *Graph[T]) FindRootNode() (T, bool)
- func (g *Graph[T]) FindTo(f func(module T) bool) (T, bool)
- func (g *Graph[T]) HasEdgesFrom(from T) bool
- func (g *Graph[T]) HasEdgesTo(to T) bool
- func (g *Graph[T]) Inverse() *Graph[T]
- func (g *Graph[T]) LeafNodes() []T
- func (g *Graph[T]) Map(fn func(T) T) *Graph[T]
- func (g *Graph[T]) NodeCount() int
- func (g *Graph[T]) Remove(from, to T)
- func (g *Graph[T]) RootNodes() []T
- func (g *Graph[T]) SubgraphFrom(f func(from T) bool) *Graph[T]
- func (g *Graph[T]) SubgraphTo(f func(to T) bool) *Graph[T]
- func (g *Graph[T]) SubgraphUntil(f func(to T) bool) *Graph[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph[T comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[T comparable]() *Graph[T]
func (*Graph[T]) ContainsEdge ¶
func (*Graph[T]) ContainsNode ¶
func (*Graph[T]) FindLeafNode ¶
func (*Graph[T]) FindRootNode ¶
func (*Graph[T]) HasEdgesFrom ¶
func (*Graph[T]) HasEdgesTo ¶
func (*Graph[T]) SubgraphFrom ¶
func (*Graph[T]) SubgraphTo ¶
func (*Graph[T]) SubgraphUntil ¶
Click to show internal directories.
Click to hide internal directories.