This stage can be used to layout non-tree structures with a tree layout algorithm.

Namespace: yWorks.yFiles.Layout.Tree
Assembly: yWorks.yFilesNET.Algorithms (in yWorks.yFilesNET.Algorithms.dll) Version: 4.1.0.1 (4.1.0.1)

Syntax

C#
public class TreeReductionStage : AbstractLayoutStage
Visual Basic
Public Class TreeReductionStage _
	Inherits AbstractLayoutStage

Remarks

This stage can be used to layout non-tree structures with a tree layout algorithm. First this stage transforms a graph into a tree or forest by removing some edges. Then it invokes the core layout algorithm on the reduced graph. Finally, it reinserts the hidden non-tree edges to the graph again and optionally routes these edges.

Typical usage:

            TreeLayouter tl = new TreeLayouter();
            TreeReductionStage trs = new TreeReductionStage();
            trs.setNonTreeEdgeRouter(new OrganicEdgeRouter());
            trs.setNonTreeEdgeSelectionKey(OrganicEdgeRouter.ROUTE_EDGE_DPKEY);
            tl.appendStage(trs);
            new BufferedLayouter(tl).doLayout(graph);
            tl.removeStage(trs);
            

Inheritance Hierarchy

System..::..Object
  yWorks.yFiles.Layout..::..AbstractLayoutStage
    yWorks.yFiles.Layout.Tree..::..TreeReductionStage

See Also