Just a quick update. I eventually settled on a 64bit 2D array, with each
64bit element in the array representing 64 spaces in the grid merely for
tracking the state of space being used or unused. Turns out much faster
this way. There will still be a list of blocks (or windows if it was a
window manager) placed but this is an entirely separate issue. For example
in the test code I keep track of the coordinates (returned by the
algorithm) and dimensions of placed blocks in an array.code/demo here: http://jwm-art.net/boxyseq/freespace_grid.tar.bz2
video/demo here: http://jwm-art.net/art/freespace_grid.ogv
running 'make' in the src, builds a demo/test program which produces
similar output to the video - this is where the good old xterm wins - set
font to 'tiny' and maximize vertically and widen it to atleast 128 chars
and xterm displays fast enough it looks like an animation.I'm hoping this will work well enough for real-time placement, though the
worst case scenario has changed from just being 255 windows placed, to
something like.... placing a 1x1 block in a non-empty grid full of (any
dimensioned window... it's difficult to work out the worst case here.james.
On Fri, April 30, 2010 23:10, James Morris wrote:
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.