Here's my most recent commit message: ""Derive edges at end of layout process instead of maintaining them through the changes that happen to the nodes during the process. lexOrder gaps have been removed as a result, which is why all of the test fixtures have been updated."
To explain: My next step was going to be to do node position swapping to minimize edge crossings, but I realized that only works if the layers are what this book calls "proper" — meaning that no edge goes crosses a layer. That is, edges can go from layer 2 to layer 3, but not from layer 2 to layer 4.
I do not have that.
To have that, I need to work out how to insert dummy nodes. So, if I need to represent a connection between a node in layer 2 and a node in layer 4, I put a dummy node in layer 3, then make an edge from layer 2 to layer 3 and another one from layer 3 to layer 4.
The way I wrote things, nodes and edges are created early in the process and update in the various parts of the layout algorithm. The dummy node process is particularly destructive to edges. It's a lot of code.
So, I refactored to not have any formal edge objects until the very end of the layout process so that I don't have to maintain them. (Edges already exist implicitly via node members that say which other nodes point at them.) I was able to delete a bunch of code this way.