dijkstra

package module
v0.0.0-...-68b647a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2014 License: MIT Imports: 5 Imported by: 0

README

dijkstra

Dijkstra's shortest path - in Golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidates

type Candidates []Vertex

func (Candidates) IsEmpty

func (h Candidates) IsEmpty() bool

func (Candidates) Len

func (h Candidates) Len() int

func (Candidates) Less

func (h Candidates) Less(i, j int) bool

func (*Candidates) Pop

func (h *Candidates) Pop() (v Vertex)

func (*Candidates) Push

func (h *Candidates) Push(v Vertex)

func (Candidates) Swap

func (h Candidates) Swap(i, j int)

type Edge

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

type Graph

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

func NewGraph

func NewGraph(vs map[int]Vertex) *Graph

func NewGraphFromFile

func NewGraphFromFile(fn string) *Graph

func (*Graph) Len

func (g *Graph) Len() int

func (*Graph) ShortestPath

func (g *Graph) ShortestPath(src, dest int) (x int)

type Vertex

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

Jump to

Keyboard shortcuts

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