Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Algorithm.Munkres.Simple
Description
A simple and typesafe layer over Data.Algorithm.Munkres.
Problems
An association problem, consisting of two sets of items, and a weight function between them. Construct with problem
.
problem :: (Ord a, Ord b) => Set a -> Set b -> (a -> b -> Double) -> Problem a b Source
Constructs an association problem, checking whether the sets of objects are the same size first.
Solutions
associatedA :: (Ord a, Ord b) => Solution a b -> b -> Maybe a Source
In a solution of type Solution a b
, finds the a that a given b is paired with. Returns nothing if the given b was not a part of the initial problem.
associatedB :: (Ord a, Ord b) => Solution a b -> a -> Maybe b Source
In a solution of type Solution a b
, finds the b that a given a is paired with. Returns nothing if the given a was not a part of the initial problem.
associationList :: Solution a b -> [(a, b)] Source
A list of the pairs of items in a solution.