Main.java 950 B

1234567891011121314151617181920212223242526272829303132
  1. package main;
  2. import graph.InitializeNodePositions;
  3. import graph.LayeredGraphNode;
  4. import graph.RandomGraphGenerator;
  5. import graph.io.Reader;
  6. import lib.SweepCrossingMinimizer;
  7. import view.MainView;
  8. /**
  9. * The main executable class. Starts the application.
  10. * @author kolja
  11. *
  12. */
  13. public class Main {
  14. /**
  15. * Will be run when the application is started.
  16. * @param args the command line arguments, currently not in use
  17. */
  18. public static void main(String[] args) {
  19. Reader r = new Reader( "papergraph.json" );
  20. LayeredGraphNode graph = r.readInputGraph();
  21. //RandomGraphGenerator r = new RandomGraphGenerator( 0.1, 0.2, 5,5, 5, 5, 1 );
  22. //LayeredGraphNode graph = r.createRandomNode( null, 0 );
  23. //SweepCrossingMinimizer cminzer = new SweepCrossingMinimizer();
  24. //for( int i = 0; i < 10; i++ )
  25. // cminzer.minimizeCrossings( graph );
  26. InitializeNodePositions.placeNodes( graph );
  27. new MainView( graph );
  28. }
  29. }