Documentation ¶
Index ¶
- func AStarFindPath(start interface{}, coster NodeCoster, estimator NodeEstimator, ...) (map[interface{}]interface{}, map[interface{}]float64, interface{})
- func DijkstraFindPath(start interface{}, coster NodeCoster, isGoal NodeIsGoaler, ...) (map[interface{}]interface{}, map[interface{}]float64, interface{})
- type Neighbor
- type NeighborGenerator
- type NeighborQueue
- func (nq NeighborQueue) Len() int
- func (nq NeighborQueue) Less(i, j int) bool
- func (nq *NeighborQueue) Pop() interface{}
- func (nq *NeighborQueue) PopWrapper() *Neighbor
- func (nq *NeighborQueue) Push(x interface{})
- func (nq *NeighborQueue) PushWrapper(n *Neighbor)
- func (nq NeighborQueue) Swap(i, j int)
- type NodeCoster
- type NodeEstimator
- type NodeIsGoaler
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
Click to show internal directories.
Click to hide internal directories.