Vincent Hennebert wrote:
Hi All,

Good news: before-floats are working. There probably are bugs and place
for improvement but I think it is time to submit a first patch, so that
you may see what I've done.

I'm currently cleaning up and documenting my code, and I think the
handling of the activeLines array may be simplified: currently, for a
line l, activeLines[2*l] points to the first active node for this line,
and activeLines[2*l+1] points to the last node. But the last node is
never directly accessed, only by starting at the first one and following
the links.

Perhaps I misunderstand your question, but I think the last active node in a line is used when adding yet another active node for that line at the end of the linked list. In BreakingAlgorithm:addNode():

   activeLines[headIdx + 1].next = node;

On the other hand, a different data structure of nodes might very well open up different improvement. The current structure of using a linked list for each line, is just the best I could come up with at the time.

regards,
finn

Reply via email to