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

Safe HaskellNone

Math.SetCover.Exact.Knead

Description

This re-implements Math.SetCover.Exact.UArray using LLVM.

Documentation

partitionsIO :: Ord a => IO ([Assign label (Set a)] -> T [[label]])Source

searchIO :: IO (State label -> T [[label]])Source

stepIO :: IO (State label -> T [State label])Source

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

data State label Source

Constructors

State 

Fields

availableSubsets :: (Array SetDim label, Array (SetDim, BlockDim) Block)
 
freeElements :: Array BlockDim Block
 
usedSubsets :: [label]
 

initStateIO :: Ord a => [Assign label (Set a)] -> IO (State label)Source

updateStateIO :: IO (SetId -> State label -> T (State label))Source

class Logic block => BitSet block whereSource

Methods

nullBlock :: Exp block -> Exp BoolSource

blocksFromSets :: Ord a => [Set a] -> ([[block]], [block])Source

keepMinimumBit :: Exp block -> Exp blockSource