dijkstra

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph[T any] interface {
	Nodes() []T
	Equal(t1, t2 T) bool
	AreNeighbours(t1, t2 T) bool
	DistanceBetween(t1, t2 T) float64
}

type Path

type Path[T any] struct {
	Nodes    []T
	Distance float64
}

func ShortestPath

func ShortestPath[T any](graph Graph[T], start T, target T) (*Path[T], error)

Jump to

Keyboard shortcuts

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