-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Partition the sequence of items to the subsequences in the order given -- -- The LinearSplit module implements partitioning the sequence of items -- to the subsequences in the order given. The items can be splitted -- using greedy heuristic or using the linear partition algorithm to -- minimize the maximum cost over all ranges (see the 'The Algorithm -- Design Manual' by Steven S. Skiena..). -- -- The library can be used to balance the work across processors to -- minimize the run time. For the library usage take a look in -- examples/Splitter.hs. @package LinearSplit @version 0.2.1 -- | The LinearSplit module implements partitioning the sequence of items -- to the subsequences in the order given. The next functions are -- exported: -- -- module Data.LinearSplit -- | Representation of the work item data Item a b Item :: a -> b -> Item a b -- | item id item :: Item a b -> a -- | weight of the item weight :: Item a b -> b -- | Partition items to minimize the maximum cost over all ranges lPartition :: (Num b, Ord b) => Int -> [Item a b] -> [[Item a b]] -- | Partition items with accumulating items ltPartition :: (Num b, Ord b) => Int -> [Item a b] -> b -> [[Item a b]] -- | Partition the items based on the greedy algoritm gPartition :: ([Item a b] -> Bool) -> Int -> [Item a b] -> [[Item a b]] instance Eq b => Eq (Cell b) instance Show b => Show (Cell b) instance Ord b => Ord (Cell b) instance (Eq a, Eq b) => Eq (Item a b) instance (Show a, Show b) => Show (Item a b) instance (Ord a, Ord b) => Ord (Item a b)