dag

package
v1.0.487 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2016 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 {
	// contains filtered or unexported fields
}

DAG represents a directected acyclic graph

func NewDAG

func NewDAG(nodes map[string][]string) *DAG

func (*DAG) Ancestors

func (d *DAG) Ancestors(id string, from []string) []string

func (*DAG) Descendants

func (d *DAG) Descendants(id string, to []string) []string

func (*DAG) Ghosts

func (d *DAG) Ghosts() []string

Ghosts returns nodes that were referenced as parents but never created.

func (*DAG) Leaves

func (d *DAG) Leaves() []string

func (*DAG) NewNode

func (d *DAG) NewNode(id string, parents []string)

func (*DAG) Sorted

func (d *DAG) Sorted() []string

Sorted returns all nodes in a topologically sorted order

Jump to

Keyboard shortcuts

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