thechiselgroup/biomixer — comment on commit d7ea0024188cf7eec12aaaad911593eb2f5499bf
File: src/org/thechiselgroup/biomixer/client/visualization_component/graph/layouts/TreeFactory.java line 19
By lgrammel:

Maintain a NodeItem --> TreeNode map instead (and only have it in the getTrees method, not as a field).

A somewhat simpler algorithm for getTrees:

GetTrees: Foreach NodeItem, create a TreeNode. Add all TreeNodes to potentialRoots. Then: Foreach arc, lookup TreeNode for the source & target and add target as child to source. Remove target from potentialRoots. Return trees for all potential roots.