packages feed

Munkres-simple 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+5/−5 lines, 2 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Data.Algorithm.Munkres.Simple: solve :: (Ord a, Ord b) => Problem a b -> Solution a b

Files

Munkres-simple.cabal view
@@ -1,7 +1,7 @@ name:                Munkres-simple-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Simple and typesafe layer over the Munkres package.--- description:         +description:         Simple and typesafe layer over the Munkres package. license:             BSD3 license-file:        LICENSE author:              Josh Kirklin
src/Data/Algorithm/Munkres/Simple.hs view
@@ -5,7 +5,7 @@     Problem,      problem,      -- * Solutions-    Solution, associatedA, associatedB, associationList)+    Solution, solve, associatedA, associatedB, associationList)     where  import qualified Data.Set as S (Set, size, toAscList)@@ -57,12 +57,12 @@          assocs = [((m,n), weightFunction p a b) | (m,a) <- as, (n, b) <- bs] --- | 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.+-- | 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.  associatedA :: (Ord a, Ord b) => Solution a b -> b -> Maybe a associatedA s b = B.lookupR b . solutionBimap $ s --- | 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.+-- | 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.  associatedB :: (Ord a, Ord b) => Solution a b -> a -> Maybe b associatedB s a = B.lookup a . solutionBimap $ s