bfs

package
Version: v0.0.0-...-36d9f8f Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(rootNode graph.Node, node graph.Node) []graph.Node

func Height

func Height(rootNode graph.Node) int

func Traverse

func Traverse(rootNode graph.Node, visit VisitFn)

func TraverseLevel

func TraverseLevel(rootNode graph.Node, level int) []graph.Node

Types

type NodeQueue

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

func (*NodeQueue) Len

func (n *NodeQueue) Len() int

func (*NodeQueue) Nodes

func (n *NodeQueue) Nodes() []graph.Node

func (*NodeQueue) Peek

func (n *NodeQueue) Peek() (node *Path)

func (*NodeQueue) Push

func (n *NodeQueue) Push(nodes ...*Path)

func (*NodeQueue) Shift

func (n *NodeQueue) Shift() (node *Path)

type Path

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

func (*Path) Append

func (p *Path) Append(node graph.Node) *Path

func (*Path) Path

func (p *Path) Path() []graph.Node

type VisitFn

type VisitFn func(int, *Path) bool

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL