An element of a visual depiction of a graph.
Start and finish points of the edge should not intersect the vertex boxes.
A horizontal or vertical segment of an edge.
Information about a horizontal edge segment (segment2) and the previous and next vertical segments (segment2 and segment3 respectively).
Keep track of vertex regions, and horizontal and vertical edge segments as we move them around, so we can detect collisions.
Array of characters used to render the final diagram
Mutable 2D representation of whether or not positions are occupied.
Raise edges if there are no conflicting diagram elements.
Remove kinks in edges where this can be achieved by removing an edge segment.
Delete redundant rows that consist of nothing but vertical edges: