Pivot By Algorithm
Implementation of the Pivot By algorithm. It is described in:
Ben Shneiderman and Martin Wattenberg. Ordered treemap layouts. IEEE Symposium on Information Visualization, 0:73, 2001.
Complexity: O(n^2), where n is the number of nodes in the tree (depends on the pivot in use).
Types
The pivot is taken to be the item with the largest area since the largest item is the most difficult to place.
The pivot is taken to be the middle item of the list since this is more likely to create a balanced layout.
Selects the pivot that will split L1 and L3 into approximately equal total areas.
Properties
Functions
{@inheritDoc}
Arrange the items in the given array to fill the given shape. This is called during the first pass, while traversing the tree from the bottom up.
Do nothing by default.
Indicates whether the layout algorithm can handle the given geometry of its parent
Divide the items in the list, other than P, into three lists, L1, L2, and L3, such that L1 consist of items whose index is less than P and L2 have items having index less than those in L3, and the aspect ratio of RP is as close to 1 as possible.
Do nothing by default.
If number of items is <= 5, lay them either in a pivot, quad, or snake layout. Pick the best layout whose average aspect ratio is closest to 1.