spbf

package
v0.0.0-...-e7df020 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package spd finds the shortest path using Bellman-Ford algorithm. It works with negative edges.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SPBF

func SPBF(g *gsd.Graph, src, dst string) (string, bool)

SPBF returns false if there is a negatively-weighted cycle that is reachable from the source vertex , which means that there is no shortest path since the negatively-weighted cycle adds up the infinite negative. Otherwise it returns the shortest path in the graph that can contain negative edges.

func TrackSPBF

func TrackSPBF(g *gsd.Graph, source, target, end *gsd.Vertex, result *slice.Sequence)

Types

This section is empty.

Jump to

Keyboard shortcuts

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