dijkstra-simple-0.1.0: A simpler Dijkstra shortest paths implementation

Safe HaskellSafe
LanguageHaskell2010

Graph.DijkstraSimple.Weighters

Contents

Synopsis

How weighters are used

Weighters requires two components:

  • a value for the initial weight of a Path
  • a function which gives a new output weight from an input weight (the edge weight) and a Path

The algorithm will try to minimize the output weight of paths.

Be sure that the output weight is always positive, it is not checked, but it will break the algorithm.

cumulativeWeighter :: Num e => Weighter v e e Source #

The classical weighter: the weight of a path is the sum of each edge weight.

maximumWeightWeighter :: (Bounded e, Ord e) => Weighter v e e Source #

Here we are looking for the heaviest edge weight