gonum: gonum.org/v1/gonum/graph/path/dynamic Index | Files

package dynamic

import "gonum.org/v1/gonum/graph/path/dynamic"

Package dynamic provides incremental heuristic graph path finding functions.

Index

Package Files

doc.go dstarlite.go

type DStarLite Uses

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

DStarLite implements the D* Lite dynamic re-planning path search algorithm.

doi:10.1109/tro.2004.838026 and ISBN:0-262-51129-0 pp476-483

func NewDStarLite Uses

func NewDStarLite(s, t graph.Node, g graph.Graph, h path.Heuristic, m WorldModel) *DStarLite

NewDStarLite returns a new DStarLite planner for the path from s to t in g using the heuristic h. The world model, m, is used to store shortest path information during path planning. The world model must be an empty graph when NewDStarLite is called.

If h is nil, the DStarLite will use the g.HeuristicCost method if g implements path.HeuristicCoster, falling back to path.NullHeuristic otherwise. If the graph does not implement graph.Weighter, path.UniformCost is used. NewDStarLite will panic if g has a negative edge weight.

func (*DStarLite) Here Uses

func (d *DStarLite) Here() graph.Node

Here returns the current location.

func (*DStarLite) MoveTo Uses

func (d *DStarLite) MoveTo(n graph.Node)

MoveTo moves to n in the world graph.

func (*DStarLite) Path Uses

func (d *DStarLite) Path() (p []graph.Node, weight float64)

Path returns the path from the current location to the goal and the weight of the path.

func (*DStarLite) Step Uses

func (d *DStarLite) Step() bool

Step performs one movement step along the best path towards the goal. It returns false if no further progression toward the goal can be achieved, either because the goal has been reached or because there is no path.

func (*DStarLite) UpdateWorld Uses

func (d *DStarLite) UpdateWorld(changes []graph.Edge)

UpdateWorld updates or adds edges in the world graph. UpdateWorld will panic if changes include a negative edge weight.

type WorldModel Uses

type WorldModel interface {
    graph.WeightedBuilder
    graph.WeightedDirected
}

WorldModel is a mutable weighted directed graph that returns nodes identified by id number.

Package dynamic imports 6 packages (graph). Updated 2019-01-30. Refresh now. Tools for package owners.