Hello David,
Saturday, April 8, 2006, 9:58:56 PM, you wrote:
bitsTable :: Array Word Int
bitsTable = array (0,255) $ [(i,bitcount i) | i - [0..255]]
bitsTable :: UArray Word Int
bitsTable = listArray (0,255) $ map bitcount [0..255]
UArray is much faster than Array but can be used only for
I just ran a simple metric for the dancing-links solver.
The only real metric I could use was the number of coverOthers calls which
counts the number of selections made (there is no distinction between certainty
and guessing).
So the minimum # of selections is 81 (of which 17 are the free hints,
Hello,
After great amount of procrastination I finally put online the next
installment of my Haskell tutorial, which could be found at
http://www.haskell.org/haskellwiki/Hitchhikers_Guide_to_the_Haskell
Many thanks to all who commented on my efforst, spell-checked the text
and urged me to go
Hello Robert,
Sunday, April 9, 2006, 2:54:58 AM, you wrote:
findMinIndex :: Word - Int
findMaxIndex :: Word - Int
on the other side, these procedures can use the same divide-to-bytes
technique as `size`
findMinIndex 0 = undefined
findMinIndex n = case (n `shiftR` 8) of
0 -
Hi Bulat,
On Apr 9, 2006, at 6:31 AM, Bulat Ziganshin wrote:
on the other side, these procedures can use the same divide-to-bytes
technique as `size`
findMinIndex 0 = undefined
findMinIndex n = case (n `shiftR` 8) of
0 - minIndexInByte ! (n .. 255)
b - 8
Am Samstag, 8. April 2006 10:21 schrieb Chris Kuklewicz:
Daniel Fischer wrote:
But, lo and behold, I also tried how plain Array fared in comparison to
DiffArray and ... reduced the running time to under ten minutes (a little
above for the list version), 5% GC time without -AxM, 1.2% with
Hello David,
Sunday, April 9, 2006, 5:47:03 PM, you wrote:
In an email to me, Jean-Philippe Bernardy expressed a concern that a
large table could needlessly fill the data cache. He proposed
checking 4 bits at a time and using a small table of 16 elements.
Not surprisingly, it isn't as
On 4/7/06, Jared Updike [EMAIL PROTECTED] wrote:
given an Ord instance (for a type T) a corresponding Eq instance can be
given by:
instance Eq T where
a == b = compare a b == EQ
where did this second -^ == come from? (I guess if if Ordering
derives Eq :-) I think you meant
I
The introduction to GADT usually starts with a little expression
evaluator. So I gave it a try, but there are some troubles.
Actually, the generalization is not necessarily trivial at all, depending on
what you need to do with your ASTs.
data E a where
Lit :: a - E a
App :: E (a - b) - E a