Search this API

y.layout.planar
Class BendAndCrossingCostHelper

java.lang.Object
  extended by y.layout.planar.BendAndCrossingCostHelper
All Implemented Interfaces:
SubdivisionHandler

public class BendAndCrossingCostHelper
extends java.lang.Object
implements SubdivisionHandler

Helper class for bend and crossing cost including subdivision handling.

 

Constructor Summary
BendAndCrossingCostHelper(LayoutGraph graph, PlanarInformation planarInformation)
           
 
Method Summary
 double getBendCost(Edge e)
           
 double getCrossingCost(Edge e)
           
 void splitFace(Edge edge, Face[] oldFaces, Face[] newFaces)
          A face is split by adding an edge.
 void subdivide(Edge e, Edge[] result)
          This method is handled every time the method subdivide (PlanarInformation) is invoked.
 void subdivide(Edge e, EdgeList path)
           
 void unsplitFace(Edge edge, Face[] oldFaces, Face[] newFaces)
          Faces are unsplit by removing an edge.
 void unsubdivide(Edge[] splitEdges, Edge e)
          This method transfers edge information from split edges to the resulting edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BendAndCrossingCostHelper

public BendAndCrossingCostHelper(LayoutGraph graph,
                                 PlanarInformation planarInformation)
Method Detail

getCrossingCost

public double getCrossingCost(Edge e)

getBendCost

public double getBendCost(Edge e)

subdivide

public void subdivide(Edge e,
                      EdgeList path)

subdivide

public void subdivide(Edge e,
                      Edge[] result)
Description copied from interface: SubdivisionHandler
This method is handled every time the method subdivide (PlanarInformation) is invoked. You can transfer edge information from the old edge to the new edges e.g. information from EdgeMaps.

Specified by:
subdivide in interface SubdivisionHandler

unsubdivide

public void unsubdivide(Edge[] splitEdges,
                        Edge e)
Description copied from interface: SubdivisionHandler
This method transfers edge information from split edges to the resulting edge.

Specified by:
unsubdivide in interface SubdivisionHandler

splitFace

public void splitFace(Edge edge,
                      Face[] oldFaces,
                      Face[] newFaces)
Description copied from interface: SubdivisionHandler
A face is split by adding an edge.

Specified by:
splitFace in interface SubdivisionHandler
Parameters:
edge - the edge which splits the face.
oldFaces - the faces in the old embedding which change.
newFaces - the faces in the new embedding which change.

unsplitFace

public void unsplitFace(Edge edge,
                        Face[] oldFaces,
                        Face[] newFaces)
Description copied from interface: SubdivisionHandler
Faces are unsplit by removing an edge.

Specified by:
unsplitFace in interface SubdivisionHandler
Parameters:
edge - the edge which unsplits the faces.
oldFaces - the faces in the old embedding which change.
newFaces - the faces in the new embedding which change.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.