0

I've recently saw how Windows 8 presents the on the dashboard the icons in "Metro" style.

enter image description here

In the image above, seems that some widgets receive a 2xwidth in comparison to the others so that the whole list of widgets is to a certain degree balanced.

My question is whether algorithm described here (partion problem solution) is used for achieving the result.

Can anybody give me some hints on how to build up a similar display when the widgets can span on multiple lines (e.g. : "Popular Session" widget would take 2 columns and 2 lines to be displayed)

Community
  • 1
  • 1
marius_neo
  • 1,535
  • 1
  • 13
  • 28

1 Answers1

0

The algorithm called Linear Partitioning is dividing a given range of positive numbers to optimum k sub-ranges which can be re-stated as a linear programming problems to which dynamic programming is a solution. Your problem here does not look like an optimization problem which means there not much of a target function there. If tiles had weights and you needed to partition them among few pages evenly , then it would've been a optimization problem. So the answer to first question is NO to me.

Metro's tile arrangement seem to be much simpler as it actually let's the user edit the list and automatic re-arranging tiles would be annoying. so all Metro is doing is not letting you create a new row when the tile can be placed on upper row.

Maybe same simple technique should works you.

n00b
  • 1,832
  • 14
  • 25