pathfind

package
v0.0.0-...-8d7dea8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AStarFindPath

func AStarFindPath(
	start interface{},
	coster NodeCoster,
	estimator NodeEstimator,
	isGoaler NodeIsGoaler,
	nGen NeighborGenerator,
) (map[interface{}]interface{}, map[interface{}]float64, interface{})

func DijkstraFindPath

func DijkstraFindPath(start interface{}, coster NodeCoster, isGoal NodeIsGoaler, nGen NeighborGenerator, maxExpansions int) (map[interface{}]interface{}, map[interface{}]float64, interface{})

Types

type Neighbor

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

A Neighbor is something we manage in a neighbor-priority queue.

type NeighborGenerator

type NeighborGenerator func(n interface{}) []interface{}

type NeighborQueue

type NeighborQueue []*Neighbor

A NeighborQueue implements heap.Interface and holds Neighbors.

func (NeighborQueue) Len

func (nq NeighborQueue) Len() int

func (NeighborQueue) Less

func (nq NeighborQueue) Less(i, j int) bool

func (*NeighborQueue) Pop

func (nq *NeighborQueue) Pop() interface{}

func (*NeighborQueue) PopWrapper

func (nq *NeighborQueue) PopWrapper() *Neighbor

func (*NeighborQueue) Push

func (nq *NeighborQueue) Push(x interface{})

func (*NeighborQueue) PushWrapper

func (nq *NeighborQueue) PushWrapper(n *Neighbor)

func (NeighborQueue) Swap

func (nq NeighborQueue) Swap(i, j int)

type NodeCoster

type NodeCoster func(src, dst interface{}) float64

type NodeEstimator

type NodeEstimator func(dst interface{}) float64

type NodeIsGoaler

type NodeIsGoaler func(n interface{}) bool

Jump to

Keyboard shortcuts

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