dijkstra

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CostFunction

type CostFunction func(from, to Point) int64

type PathFinder

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

func NewPathFinder

func NewPathFinder(start, end Point) *PathFinder

func (*PathFinder) AddConnection

func (pf *PathFinder) AddConnection(from Point, cost CostFunction, to ...Point)

func (*PathFinder) BestPath

func (pf *PathFinder) BestPath() ([]Point, error)

type Point

type Point interface {
	String() string
	Coordinates() (float64, float64)
}

Jump to

Keyboard shortcuts

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