[Haskell-cafe] Re: Tree traversal / stack overflow

2009-05-20 Thread Matthew Eastman
time, so I checked and there's a ticket in GHC trac about it: http://hackage.haskell.org/trac/ghc/ticket/2236 . On 20-May-09, at 12:02 AM, Matthew Eastman wrote: ... The code I have right now works great on point sets of size ~10,000, but when I go up much higher things start to go wron

[Haskell-cafe] Tree traversal / stack overflow

2009-05-19 Thread Matthew Eastman
Hi, I've been writing some code to calculate the stretch factor of a tree of points. What it means is that for every node in a tree (lets call it 'pivot'), I have to traverse the same tree (lets call each node 'current') and sum d_t(pivot, current) / d(pivot, current) for each node, where

Re: [Haskell-cafe] Red-Blue Stack

2008-09-27 Thread Matthew Eastman
Matthew Brecknell wrote: Matthew Eastman said: i.e. popping Blue in [Red, Red, Blue, Red, Blue] would give [Red, Red, Blue] Hmm, did you mean [Red,Blue] or [Red,Red,Red,Blue]? Judging by your implementation of remUseless, I'm guessing the latter. Yes, I meant the latter. Popping Bl

[Haskell-cafe] Red-Blue Stack

2008-09-24 Thread Matthew Eastman
Hey guys, This is probably more of a question about functional programming than it is about Haskell, but hopefully you can help me out. I'm new to thinking about things in a functional way so I'm not sure what the best way to do some things are. I'm in a data structures course right now,