dag

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAG

type DAG struct {
	NameMap map[string]*Node
}

DAG is a simple implementation of a directed acyclic graph.

func NewDAG

func NewDAG() *DAG

func (*DAG) Add

func (d *DAG) Add(name string, dependants []string) *Node

func (*DAG) Delete

func (d *DAG) Delete(name string)

func (*DAG) GetChildren

func (d *DAG) GetChildren(name string) []string

func (*DAG) Has

func (d *DAG) Has(name string) bool

type Node

type Node struct {
	Name     string
	Present  bool
	Parents  map[string]*Node
	Children map[string]*Node
}

Jump to

Keyboard shortcuts

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