algorithm - Packing rectangles for compact representation -


i looking pointers solution of following problem: have set of rectangles, height known , x-positions , want pack them in more compact form. little drawing (where rectangles of same width, width may vary in real life), like, instead of.

-r1-   -r2--      -r3--        -r4-         -r5-- 

something like.

-r1-  -r3--    -r2-- -r4-          -r5-- 

all hints appreciated. not looking "the" best solution.

your problem simpler variant, might tips reading heuristics developed "binpacking" problem. there has been lot written this, this page start.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -