set-cover-0.0.9: Solve exact set cover problems like Sudoku, 8 Queens, Soma Cube, Tetris Cube

Safe HaskellNone
LanguageHaskell98

Math.SetCover.Exact.Priority

Description

This implementation uses priority queues and avoids full scans through available sets. It can be faster than Math.SetCover.Exact if there is a huge number of sets.

Synopsis

Documentation

data Assign label set Source #

Assign allows to associate a set with a label. If a particular set is chosen for a set cover, then its label is included in the output of partitions.

I have decided to separate sets and labels this way, since it is the easiest way to assign a meaning to a set. If you really want to know the sets in a partition, then you can fill the label field with the set.

Instances

Functor (Assign label) Source # 

Methods

fmap :: (a -> b) -> Assign label a -> Assign label b #

(<$) :: a -> Assign label b -> Assign label a #

label :: Assign label set -> label Source #

labeledSet :: Assign label set -> set Source #

assign :: label -> set -> Assign label set Source #

Construction of a labeled set.

partitions :: Methods queue set -> [Assign label set] -> [[label]] Source #

search :: Methods queue set -> State queue label set -> [[label]] Source #

step :: Methods queue set -> State queue label set -> [State queue label set] Source #

data State queue label set Source #

Constructors

State 

Fields

initState :: Methods queue set -> [Assign label set] -> State queue label set Source #

updateState :: Methods queue set -> Assign label set -> State queue label set -> State queue label set Source #

queueMap :: Ord a => Methods queue set -> Methods a queue set Source #

queueSet :: Ord a => Methods a Source #

queueBit :: C bits => Methods bits Source #

queueBitPQ :: C bits => Methods bits Source #