xO      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg h i j k l m n o p q r s t u v w xyz{|}~  Safe-InferedObject must be in .     None      Safe-Infered#This class is similar to the  class from the base package  but adds % and misses the rotation stuff. !"#$%&'()*+ !"#$%&'()*+ #$%&'()!"*+ !"#$%&'()*+ Safe-Infered ,-./0123,-./0123,-./0123,-./0123 Safe-Infered45678456785648745678 None  NoneNone5The list of keys must be a subset of the queue keys. NoneNoneA faster first addition step. 9In the first addition we do not need to propagate carry. =We use this fact for reducing the number of rows to a third. *9:;<=>?@9:;<=>?@'9:;<=>?@None5The list of keys must be a subset of the queue keys.      Safe-Infered          None ABCDEFGHABCDEFGHABCDHGEF ABCDEFGHNoneNone LThe state of the search.  usedSubsets1 contains the partial partition built up so far. availableSubsets? is the list of sets we can still try to put into a partition.  The lists  usedSubsets and availableSubsets are disjoint, Nbut their union is not necessarily equal to the list of initially given sets. 6There are sets not contained in the partial partition )that overlap with the partial partition. :Those sets are not available for extending the partition.  freeElements, contains the elements that are not covered by the partial partition in  usedSubsets. unions usedSubset and  freeElements are disjoint ,and their union is the set of all elements. QQ) 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 d. 5I have decided to separate sets and labels this way, :since it is the easiest way to assign a meaning to a set. 4If you really want to know the sets in a partition, then you can fill the S field with the set. WGThis class provides all operations needed for the set cover algorithm. $It allows to use the same algorithm  both for  containers' W* and for sets represented by bit vectors. \minimize free assigns finds a set element x from free 4 that is contained in the least number of sets in assigns. % Then it returns the assigns where x% is contained in the associated set. * This formulation allows us not to name x 6 and thus we do not need a second type variable for set elements  and no type family from set to its element type. Unchecked preconditions:  free4 must be a superset of all sets in the assign list.  free must be non-empty.  The assigns list may be empty. E The output of assigns must be a subsequence of the input assigns, O that is, it must be a subset of the input and it must be in the same order. - This requirement was originally needed by \ for , . but currently it is not utilized anywhere. ]Construction of a labeled set. ^*You may use this to post-process a set of Qs -in order to speedup the solver considerably. "You must process the whole set of Q s at once, 7i.e. do not process only parts of the assignment list. The output of ^" should go into the solver as is. _Like ^ but generates    instead of ! bitvectors. 2Since containers-0.5.5 as shipped with GHC-7.8.4,  ' should usually be more efficient than !. b)This is the key of the search algorithm. /The search algorithm tries to build partitions 1by adding sets to a partition list successively. %A step starts on a partial partition ,and looks for new sets that could be added. BThe goal is to avoid to check a set again down in a search branch Dand to quickly determine search directions that lead to a dead end. 8To this end a search step selects a certain set element -and tries all sets that contain that element 4and that do not overlap with the partial partition.  Practically, b, selects an element with the minimal number ,of non-overlapping sets it is contained in. GIf this number is zero, then the search can be aborted in this branch. (Most oftenly the power of the algorithm Doriginates from the formulation of a problem as a set-cover problem .and from the equal treatment of all elements. E.g. in the Soma cube example Bthe algorithm chooses whether to do a case analysis on all bricks that cover a certain position, Qor to do a case analysis on all positions that are possible for a certain brick. 1The algorithm might not be extraordinarily fast, 0but in all cases it consumes only little memory ;since it only has to maintain the current state of search. Precondition: O' of the input state must not be empty. c;Start the search for partitions on a certain search state. This can be an `) or the result of performing some search bs. 1In the examples we use this for parallelization: We perform some steps manually  and then run c on the results in parallel. dpartitions [assign '0' set0, assign '1' set1, assign '2' set2]  computes unions [set0, set1, set2]& and tries to partition the union set using the sets set0, set1, set2. d returns all such partitions. $If a set is chosen for a partition, *then its label is included in the output. E.g. set0 = Set.fromList [0,1], set1 = Set.fromList [2], set2 = Set.fromList [0,1,2], then d returns [01, 2]. 0The order of partitions and the order of labels depends on the implementation and you must not rely on them.  You may use - in order to select only the first solution. "%This instance supports Maps of Sets. 5This way you can structure your sets hierarchically. :You may also use it to combine several low-level bitsets. &A Map must not contain empty subsets. +IJKLMNOPQRSTUVWXYZ[\#$]^_%`abcdef&'()*+,"-.IJKLMNOPQRSTUVWXYZ[\]^_`abcdefQRST]^_dcbLMNOP`aWXYZ[\IKJfeUVIKJLMNOPQRSTUVWXYZ[\#$]^_%`abcdef&'()*+,"-. Noneghijklm/nopqrstuvwIJKQST]ghijklmnopqrstuvwQSTST]ponghijklmIKJrqstuwvghijklm/nopqrstuvwNonexyz{|}~0123459:;<=>?@xyz{|}~xyz{|}~=>?@<:;9 xyz{|}~012345 None6789:;<=>? 6789:;<=>? None@We add bytes with saturation. >The first operand must consist exclusively of zeros and ones. AWith saturation we perform the same as the unoptimized algorithm Iif the element with minimum occurrence is contained in at most 254 sets. -This is pretty much and should never happen. ,If all elements occur in more than 254 sets "then we will choose the first one 7which might lead to an unnecessary long case analysis, 'but would still yield correct results. AAIn general this function will choose a different minimal element than keepMinimumMasked. @BCDEFGHIJKLMN@OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrAst <BCDEFGHIJKLMN@OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrAst None"uvwxyz{|}~ uvwxyz{|}~ !"#$%&'()*+,,-./0122344567/89:;<==>617?/@5ABCDEF2GHIJK1LM30/.NOPQQRSTUUVWXY=1?Z/[\]^_`abcde Q Q R f T _ ` a b c d e g h i j kQQRSTlmnopc q q r s t Q Q R S T l m n o p c Q Q R S T _ ` a b cuvwxyz{|}~'}~ . ,,Iq/?,K, 7[                                  ! " # $ % & ' ( ) * + , - . / [ 0 F F   2 2 q ? 1 2 3 4 5 7 [6 set-cover-0.1Math.SetCover.CuboidMath.SetCover.QueueMath.SetCover.BitMath.SetCover.BitSetMath.SetCover.BitPositionMath.SetCover.Exact.KneadMath.SetCover.BitPriorityQueueMath.SetCover.ExactMath.SetCover.Exact.Priority Math.SetCover.Exact.Knead.Vector#Math.SetCover.Exact.Knead.SaturatedMath.SetCover.Exact.UArrayMath.SetCover.EnumMapMath.SetCover.Queue.MapMath.SetCover.Queue.SetMath.SetCover.Exact.Block"Math.SetCover.Exact.Knead.SymbolicMath.SetCover.Queue.BitMath.SetCover.BitMap$Math.SetCover.Queue.BitPriorityQueue Data.Maybe listToMaybeSize PackedCoordsCoordscoordsFromStringcoordsFrom2LayerStringnumberOf2LayerAtomsforNestedCoordsrotXrotYrotZ primRotations rotations rotationsGen unpackCoords packCoords normalFormsizemove allPositionsallOrientationsallOrientationsGenMethods fromEnumMap partition difference findMinValuenullSetIdfindMinSumCempty keepMinimum.|..&.xorbitLeftbitRightSetgetBitsdisjointSizedunpack bitPosition singletonBlockDimSetDimBlockIdBitSet nullBlockblocksFromSetskeepMinimumBitQueuefromSets elemUnionsTreeBranchLeafStateavailableSubsets freeElements usedSubsetsAssignlabel labeledSetChoosechooseMinimizeunionsminimizeassignbitVectorFromSetAssignsintSetFromSetAssigns initState updateStatestepsearch partitions completeTree decisionTreequeuequeueMapqueueSetqueueBit queueIntSet queueBitPQ initStateIO updateStateIOstepIOsearchIO partitionsIOBlockblock0block1 ByteVector$fTraversableCoords$fFoldableCoords$fApplicativeCoords$fFunctorCoords $fEnumSetIdbase Data.BitsBits$fCSum $fCIntSet $fCInteger $fCWord64 $fCWord32 $fCWord16$fCWord8 $fMonoidSet$fSemigroupSetbitbitPositionPlain unpackGen decompose positionMasksbitPositionGenword64bitSumbitSumPosition bitSumUnpack $fSizedWord64 $fSizedWord32 $fSizedWord16 $fSizedWord8const intersectionattachconstMap transposeSet transposeMapconstIntMapFromBitstransposeBitSet constIntMaptransposeIntSetmethods checkSubQueue addMinSize applyWriterapply updatePSQ partitionPSQ differencePSQ_differencePSQdeleteSetFromPSQdifferenceSizedSetblocksFromInts blockFromBits_add3DigitDimDigitIdkeepMinimumBitPrimaddLowaddHighadd2zbAtomhalfBags elseIfThenremoveDimensionsumLoop addSingleDim_sumBagsadd3 digitDim2 thirdBags condAccesssumBags3differenceWithRowgetRownullSet disjointRow disjointRows findIndices collectRowsfilterDisjointRows$fBitSetWord64$fBitSetWord32$fBitSetWord16 $fBitSetWord8 MethodsIntSet methodsIntSetMapunMapfromSetaddincsubdec mapAccumAffix_mapAccumAffixintersectionSet differenceSet normalize minimumSet $fMonoidMap$fSemigroupMapkeysBitscontainers-0.4.2.1Data.Map Data.IntSetIntSet integer-gmpGHC.Integer.TypeInteger$fSetMap histogramSet histogramMap mapIntFromSet$fFunctorState$fFunctorAssign$fChooseIntSet $fSetIntSet $fChooseSet$fSetSet $fChooseMap $fChooseSet0 $fSetSet0 nextStates _minimumSetdifferenceWithRowNull affectedRows blockSizegetByte_putByte toWord128 fromWord128 $fBitSetBlock$fCBlock $fLogicBlock $fCBlock0$fStorableBlockincSatkeepMinimumMaskedVecIxVectorBitDim CounterDimBitId CounterIdBlock16SubblockCountersCounter NumCountersbitSize numCountersrepVec incSatGeneric incSatX86sumRows extrudeBitsextrudeCounters toCounters _pickBitsword16 toBlock16 fromBlock16 pickBitsX86uninterleaveBitsmvvecextract extractBlockflattenCountersbitPos singleBitargMin argMinimum _keepMinimum argMinMasked testBlockBitflattenBlockBitsargMinimumMasked_keepMinimumMasked argMinVecargMinMaskedVectestBlockBitVecflattenBlockBitsVecargMinimumMaskedVec counterIds_keepMinimumMaskedVectorargMinMaskedVecHalfkeepMinimumMaskedCascadeDifferenceWithRowdoubleadd2TransposedSTadd2STsumBags_sumBagsTransposed