graph

package
Version: v0.0.0-...-3bd8aaf Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2015 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	AdjacencyList map[Node][]Node
}

func NewFromGrid

func NewFromGrid(g Grid) *Graph

func (*Graph) EachAdjacencyList

func (g *Graph) EachAdjacencyList(cb func(n Node, l []Node))

func (*Graph) Path

func (g *Graph) Path(from, to Node) []Node

type Grid

type Grid interface {
	Nodes() []Node
}

type Node

type Node interface {
	Adjacent() []Node
}

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