On Mon, Aug 3, 2009 at 11:17 AM, CK Kashyap
<ck_kashyap@yahoo.com> wrote:
Thanks Sebastian,
Array/accumArray sounds like what I am looking for.
Int -> ( a -> a ) -> [a] -> [a]
approach, would it not be expensive on memory as well? Or is it just speed?
Well memory will be garbage collected fairly quickly so I don' think that's an issue, other than the effects on speed that the extra allocations would have. It's probably mainly speed because each pixel would have time complexity O(n+m) rather than O(1) for an n*m image...