Package com.treemap
Class AlgorithmFactory
java.lang.Object
com.treemap.AlgorithmFactory
Factory class for accessing predefined layout algorithms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Algorithm
Bar Chart layout.static final Algorithm
Implementation of the Binary Tree algorithm.static final Algorithm
Circle packing treemap layout.static final Algorithm
Circular treemap layout.static final Algorithm
static final Algorithm
Matrix layout.static final Algorithm
Pie Chart layout.static final Algorithm
Implementation of the Pivot By algorithm.static final Algorithm
Implementation of the Slice-and-dice algorithm described in the original treemap paper.static final Algorithm
Implementation of the Split algorithm.static final Algorithm
Implementation of the Squarified algorithm.static final Algorithm
Implementation of the Squarified+ algorithm.static final Algorithm
Implementation of the Strip algorithm.static final Algorithm
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BINARY_TREE
Implementation of the Binary Tree algorithm. It is described in: Martin Wattenberg and Ben Bederson: Dynamic treemap layout comparison. University of Maryland: http://www.cs.umd.edu/hcil/treemap-history/java_algorithms/LayoutApplet.html. Complexity: O(n log n), where n is the number of nodes in the tree. -
SLICE
Implementation of the Slice-and-dice algorithm described in the original treemap paper. It is described in: Ben Shneiderman. 'Tree Visualization with Tree-Maps: 2-d Space-filling Approach." ACM Transactions on Graphics, 11(1), pp. 92-99, 1992. It uses parallel lines to divide a rectangle representing an item into smaller rectangles representing its children. At each level of hierarchy the orientation of the lines - vertical or horizontal - is switched (alternate), computed according to the aspect ratio (Best), or fixed (Vertical, Horizontal). Complexity: O(n), where n is the number of nodes in the tree. -
SQUARIFIED
Implementation of the Squarified algorithm. It is described in: Bruls, D.M., C. Huizing, J.J. van Wijk. "Squarified Treemaps". In: W. de Leeuw, R. van Liere (eds.), Data Visualization 2000, Proceedings of the joint Eurographics and IEEE TCVG Symposium on Visualization, 2000, pp. 33-42. Sub-divids a parent rectangular area into child rectangles. It implements the squaring treemap algorithm where all child nodes are allocated areas proportional to their values, but the aspect ratio of each rectangle is kept as close as possible to a square. Complexity: O(n), where n is the number of nodes in the tree. -
SQUARIFIEDPLUS
Implementation of the Squarified+ algorithm. It is described in: Cesarano A, Ferrucci F, Torre M. A heuristic extending the Squarified treemapping algorithm. arXiv preprint arXiv:1609.00754. 2016 Sep 2. A heuristic extending the squarified algorithm with better aspect ratios and higher homogeneity among items. Complexity: O(n), where n is the number of nodes in the tree. -
STRIP
Implementation of the Strip algorithm. It is described in: Ben Shneiderman and Martin Wattenberg. Ordered and quantum treemaps. Information Visualization, 2001. Infovis 2001. IEEE Symposium on pages 73-78, 2001. ISSN 1522-404X. Complexity: O(sqrt(n)) average, O(n) worse case, where n is the number of nodes in the tree. -
PIVOT_BY_SPLIT_SIZE
Implementation of the Pivot By algorithm. It is described 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). -
SPLIT
Implementation of the Split algorithm. It is described in: Engdahl, B. "Ordered and Unordered Treemap Algorithms and Their Applications on Handheld Devices". 2005. Produces a layout where the natural ordering of the data set is roughly preserved, while in most cases producing better aspect ratios than the Pivot and the Strip treemaps. Complexity: O(n log n) (worst case), O(n) average, where n is the number of nodes in the tree. -
CIRCULAR
Circular treemap layout. -
CIRCLEPACKING
Circle packing treemap layout. -
PIE
Pie Chart layout. -
BAR
Bar Chart layout. -
MATRIX
Matrix layout. -
SUNBURST
-
ICICLE
-
-
Constructor Details
-
AlgorithmFactory
-
-
Method Details
-
getInstance
-
add
-
getDefault
-
getAlgorithms
-
get
-