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

Safe HaskellNone

Math.SetCover.Exact.UArray

Description

This implements Math.SetCover.Exact using unboxed arrays of bit vectors. It should always be faster than using Integers as bit vectors. In contrast to IntSet the set representation here is dense, but has a much simpler structure. It should be faster than IntSet for most applications.

Documentation

partitions :: Ord a => [Assign label (Set a)] -> [[label]]Source

search :: State label -> [[label]]Source

step :: State label -> [State label]Source

data State label Source

Constructors

State 

Fields

availableSubsets :: (Array SetId label, UArray (SetId, BlockId) Block)
 
freeElements :: UArray BlockId Block
 
usedSubsets :: [label]
 

initState :: Ord a => [Assign label (Set a)] -> State labelSource

updateState :: SetId -> State label -> State labelSource