dag

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MPL-2.0, MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugEvent

type DebugEvent struct {
	Type   DebugEventType
	Detail interface{}
}

type DebugEventType

type DebugEventType string
const (
	AddEvent     DebugEventType = "Add"
	ConnectEvent DebugEventType = "Connect"
)

type DebugLog

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

func (*DebugLog) Add

func (l *DebugLog) Add(eventType DebugEventType, detail interface{})

func (*DebugLog) All

func (l *DebugLog) All() []DebugEvent

func (*DebugLog) Len

func (l *DebugLog) Len() int

type Graph

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

Graph wraps dag.AcyclicGraph in order to provide a restricted, smaller API with modified behaviors such as additional error checks and validation.

func NewGraph

func NewGraph() Graph

func (*Graph) Add

func (g *Graph) Add(vertex interface{})

func (*Graph) Connect

func (g *Graph) Connect(start, end interface{}) error

func (*Graph) Copy

func (g *Graph) Copy() (c Graph, err error)

func (*Graph) DebugLogEvents

func (g *Graph) DebugLogEvents() []DebugEvent

func (*Graph) HasEdge

func (g *Graph) HasEdge(start, end interface{}) bool

func (*Graph) HasPathDepthFirst

func (g *Graph) HasPathDepthFirst(start, end interface{}) (bool, error)

func (*Graph) HasVertex

func (g *Graph) HasVertex(v interface{}) bool

func (*Graph) String

func (g *Graph) String() string

func (*Graph) VerticesFrom

func (g *Graph) VerticesFrom(origin interface{}) (vertices []interface{})

Jump to

Keyboard shortcuts

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