Make your own free website on Tripod.com
next up previous contents
Next: Spring Algorithm - JAVA Up: 3 Algorithms Previous: Centered 2-Circle Algorithm -

Cross Algorithm - JAVA

The 'Cross' algorithm is a much better algorithm than the 'Standard' algorithm. This algorithm takes care of how much crossings there are in the whole graph and changes the configuration of the graph only if the graph has less crossings. Two random vertices are chosen and then the number of crossings calculated. Then the two vertices are exchanged and the number of crossings newly calculated. If there are more crossings after swapping the two vertices, then the vertices are swapped back to their former position. Otherwise, the swapping continous until there are no crossings or until you stop the algorithm doing so.


next up previous contents
Next: Spring Algorithm - JAVA Up: 3 Algorithms Previous: Centered 2-Circle Algorithm -

(k)1998 Graph->O'Mat Team