Minimum Crossover Algorithm

I would like to know if there is any example of a minimal intersection (non-force based) layout algorithm for graphs, so I could adapt it to d3.js.

+5
source share
1 answer

Calculation of the layout of the graph that minimizes the intersection of edges, NP-hard, so there is no single algorithm; There are different algorithms with different trade-offs. A force - based layout ( Fruchterman-Reingold ) is one of the layered approaches ( Sugiyama ). There are also layouts for certain types of graphs, such as trees ( Reingold-Tilford ) and small worlds ( van Ham-van Wijk ). A limited layout such as Dig-CoLa ( Dwyer-Koren ) is another class of algorithm.

If you need an algorithm that specifically seeks to minimize the number of edge intersections, you can use simulated annealing . Although this will eventually find the right answer, it can be quite slow.

+8
source

All Articles