de.cau.cs.kieler.klay.layered.p5edges
Interface IBoxCalculator

All Known Implementing Classes:
ObjectBoxCalculator

public interface IBoxCalculator

Rating red

Method Summary
 boolean addEdge(BezierSpline spline)
          add an edge that takes space.
 boolean addEdge(LEdge edge)
          add an egde that takes linear space with maybe bending points.
 void addNode(LNode node)
          Add a node to the box calculator.
 LinkedList<Rectangle2D.Double> getBoxes(LEdge edge)
          compute a box array for a given edge.
 LinkedList<Line2D.Double> getLines(LinkedList<Rectangle2D.Double> boxes)
          calculate intersection between boxes.
 void initialize(LayeredGraph graph)
          initialize the box calculator for a given graph.
 

Method Detail

initialize

void initialize(LayeredGraph graph)
initialize the box calculator for a given graph.

Parameters:
graph - the graph to operate on

getBoxes

LinkedList<Rectangle2D.Double> getBoxes(LEdge edge)
compute a box array for a given edge. compute_bboxes computes the space actually taken up by the curve. It computes the array BB0 , . . . , BBm, where BBi is the narrowest sub-box of Bi containing the curve.

Parameters:
edge - the edge to find a array for
Returns:
the box array between q and s

getLines

LinkedList<Line2D.Double> getLines(LinkedList<Rectangle2D.Double> boxes)
calculate intersection between boxes. compute_L_array computes the array L0 , . . . , Lm + 1 where Li is the line segment that is the intersection of box Bi - 1 with box Bi. lArray.size = boxArray.size - 1 ALWAYS

Parameters:
boxes - the boxes to intersect
Returns:
the intersecting lines

addEdge

boolean addEdge(BezierSpline spline)
add an edge that takes space.

Parameters:
spline - the spline to add
Returns:
true if success, false otherwise

addEdge

boolean addEdge(LEdge edge)
add an egde that takes linear space with maybe bending points.

Parameters:
edge - the edge to add
Returns:
true if success, false otherwise

addNode

void addNode(LNode node)
Add a node to the box calculator.

Parameters:
node - the LNode to add