Created
February 26, 2019 11:13
-
-
Save clementbat/8a2e0de6c02ad21fa5db3854fb583077 to your computer and use it in GitHub Desktop.
treemap algorithm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure squarify(list of real children, list of real row,real w) | |
begin | |
real c = head(children); | |
if worst(row, w) ≤ worst(row++[c], w) then | |
squarify(tail(children), row++[c], w) | |
else | |
layoutrow(row); | |
squarify(children, [], width()); | |
fi | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment