Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

## Synopsis

- cumulativeWeighter :: Num e => Weighter v e e
- maximumWeightWeighter :: (Bounded e, Ord e) => Weighter v e e

# 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.