On Fri, 13 May 2011, Aaron Windsor wrote:
On Fri, May 13, 2011 at 12:47 PM, Nishchal Devnur
wrote: Hi All,
I am trying to use the Chrobak_Payne_straight_line_drawing function to get a straight line drawing of a biconnected and maximally planar graph. But I am getting a stackoverflow error in the the Chrobak_Payne_drawing.hpp file. https://docs.google.com/leaf?id=0B4H5FyR7-PhTYTg1ZmFjNDctNmE1ZC00NzYyLWIwM2UtZDljMTQyMzM2MGFh&hl=en this is the link to theĀ screenshot of the stacktrace. The accumulate_offset in the hpp file is being recursively called and hence the stackoverflow. I am not sure whats the cause of this error.
<snip>
Hi Nishchal,
It looks like that function (accumulate_offsets) is written recursively, so unfortunately with a large enough graph you will get a stack overflow. But it's a really simple function, I'd recommend re-writing it to use an explicit stack - so instead of:
(snip) I did the kind of changes that you suggested and checked them into the Boost trunk (r71929). Could you (Aaron and/or Nishchal) please check whether it works for you? -- Jeremiah Willcock