path

package
v0.0.0-...-1e7a838 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AstarResult

type AstarResult[T comparable] struct {
	End  T
	Cost float64
	Path []T
}

type Edge

type Edge[T comparable] struct {
	To   T
	Cost float64
}

type Graph

type Graph[T comparable] map[T][]Edge[T]

func (*Graph[T]) Astar

func (g *Graph[T]) Astar(start, end T, h func(s T) float64) (cost float64, path []T)

func (*Graph[T]) AstarMultiple

func (g *Graph[T]) AstarMultiple(start T, endList []T, h func(s T) float64) (out []AstarResult[T])

func (Graph[T]) String

func (g Graph[T]) String() string

Jump to

Keyboard shortcuts

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