Package jline.io.tikz

Class TikZEdgeRouter

  • All Implemented Interfaces:

    
    public class TikZEdgeRouter
    
                        

    Routes edges around nodes to achieve a planar graph layout. This is a general-purpose edge routing algorithm for queueing network diagrams. It handles: - Forward edges: routes around any intermediate nodes - Backward edges (feedback loops): routes around the entire network - Self-loops: routes above/below the node - Vertical edges: routes with horizontal offset - Multiple edges to same target: staggers entry points The algorithm ensures a planar layout where edges don't cross nodes and parallel edges are visually separated.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<Array<double>> computeWaypoints(Node from, Node to, List<Node> allNodes) Computes waypoints for an edge to avoid overlapping nodes.
      boolean isSelfLoop(Node from, Node to) Checks if this edge is a self-loop.
      static String renderRoutedEdge(String fromId, String toId, String fromAnchor, String toAnchor, List<Array<double>> waypoints, double prob, TikZOptions options) Generates TikZ code for a routed edge with waypoints.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • computeWaypoints

         List<Array<double>> computeWaypoints(Node from, Node to, List<Node> allNodes)

        Computes waypoints for an edge to avoid overlapping nodes. Handles forward edges, backward edges, self-loops, and vertical edges.

        Parameters:
        from - Source node
        to - Target node
        allNodes - All nodes in the network
        Returns:

        List of waypoints (x, y pairs). Empty if straight line is OK.