graphs

package
v0.0.0-...-27647ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ItEdges

func ItEdges[T comparable](it bt.Iterable[bt.Kv[T, bt.Iterable[T]]]) ctr.Map[T, ctr.Set[T]]

func SliceEdges

func SliceEdges[T comparable](m map[T][]T) ctr.Map[T, ctr.Set[T]]
func TraverseLinks[T comparable](data ctr.Map[T, ctr.Set[T]], keys bt.Iterable[T]) ctr.Set[T]

Types

type Dag

type Dag[T comparable] struct {
	// contains filtered or unexported fields
}

func NewDag

func NewDag[T comparable](inputSetsByOutput ctr.Map[T, ctr.Set[T]]) *Dag[T]

func (*Dag[T]) All

func (d *Dag[T]) All() ctr.Set[T]

func (*Dag[T]) InputSetsByOutput

func (d *Dag[T]) InputSetsByOutput() ctr.Map[T, ctr.Set[T]]

func (*Dag[T]) OutputSetsByOutput

func (d *Dag[T]) OutputSetsByOutput() ctr.Map[T, ctr.Set[T]]

func (*Dag[T]) Subdag

func (d *Dag[T]) Subdag(targets bt.Iterable[T], ignored bt.Iterable[T]) *Subdag[T]

type DuplicateNodeError

type DuplicateNodeError[T any] struct{ NodeError[T] }

func (DuplicateNodeError[T]) Error

func (e DuplicateNodeError[T]) Error() string

type NodeError

type NodeError[T any] struct{ Node T }

func (NodeError[T]) Error

func (e NodeError[T]) Error() string

type Subdag

type Subdag[T comparable] struct {
	// contains filtered or unexported fields
}

func (*Subdag[T]) All

func (sd *Subdag[T]) All() ctr.Set[T]

func (*Subdag[T]) Dag

func (sd *Subdag[T]) Dag() *Dag[T]

func (*Subdag[T]) Ignored

func (sd *Subdag[T]) Ignored() ctr.Set[T]

func (*Subdag[T]) Inputs

func (sd *Subdag[T]) Inputs() ctr.Set[T]

func (*Subdag[T]) OutputInputs

func (sd *Subdag[T]) OutputInputs() ctr.Set[T]

func (*Subdag[T]) Outputs

func (sd *Subdag[T]) Outputs() ctr.Set[T]

func (*Subdag[T]) Targets

func (sd *Subdag[T]) Targets() ctr.Set[T]

type Tree

type Tree[T any] struct {
	// contains filtered or unexported fields
}

func NewTree

func NewTree[T any](root T, walk func(T) bt.Iterable[T], he bt.HashEqImpl[T]) (*Tree[T], error)

func (Tree[T]) ChildSetsByNode

func (t Tree[T]) ChildSetsByNode() ctr.Map[bt.Optional[T], ctr.Set[T]]

func (Tree[T]) ChildrenByNode

func (t Tree[T]) ChildrenByNode() ctr.Map[bt.Optional[T], ctr.List[T]]

func (*Tree[T]) DepthsByNode

func (t *Tree[T]) DepthsByNode() ctr.Map[T, int]

func (Tree[T]) NodeSet

func (t Tree[T]) NodeSet() ctr.Set[T]

func (*Tree[T]) NodeSetsByType

func (t *Tree[T]) NodeSetsByType() map[reflect.Type]ctr.Set[T]

func (Tree[T]) Nodes

func (t Tree[T]) Nodes() ctr.List[T]

func (Tree[T]) ParentsByNode

func (t Tree[T]) ParentsByNode() ctr.Map[bt.Optional[T], bt.Optional[T]]

func (Tree[T]) Root

func (t Tree[T]) Root() T

func (Tree[T]) Walk

func (t Tree[T]) Walk() func(T) bt.Iterable[T]

type UnknownNodeError

type UnknownNodeError[T any] struct{ NodeError[T] }

func (UnknownNodeError[T]) Error

func (e UnknownNodeError[T]) Error() string

Directories

Path Synopsis
dot

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL