dijkstra

package
v0.0.0-...-c186ab4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge interface {
	Destination() Node
	Weight() float64
}

Edge is an interface for your own implementation of an edge between two vertices in a graph.

type Node

type Node interface {
	Edges() []Edge
}

Node is an interface for your own implementation of a vertex in a graph.

func ShortestPath

func ShortestPath(start, end Node) ([]Node, error)

ShortestPath finds a shortest path between the start and end nodes. The two nodes' underlying values must be pointers.

Jump to

Keyboard shortcuts

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