pachyderm: github.com/pachyderm/pachyderm/src/server/pkg/dag Index | Files

package dag

import "github.com/pachyderm/pachyderm/src/server/pkg/dag"

Index

Package Files

dag.go

type DAG Uses

type DAG struct {
    // contains filtered or unexported fields
}

DAG represents a directected acyclic graph

func NewDAG Uses

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

NewDAG creates a DAG and populates it with the given nodes.

func (*DAG) Ancestors Uses

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

Ancestors returns a slice containing all ancestors of a node, 'id', in d which are a descendant of at least one of the nodes in 'from'.

func (*DAG) Descendants Uses

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

Descendants returns a slice containing all descendants of a node, 'id', in d which are an ancestor of at least one of the nodes in 'to'.

func (*DAG) Ghosts Uses

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

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

func (*DAG) Leaves Uses

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

Leaves returns a slice containing all leaves in d.

func (*DAG) NewNode Uses

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

NewNode adds a node to d.

func (*DAG) Sorted Uses

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

Sorted returns all nodes in a topologically sorted order

Package dag is imported by 1 packages. Updated 2019-01-29. Refresh now. Tools for package owners.