gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Option for lgf-gen to draw the edges only
0 1 0
default
1 file changed with 2 insertions and 1 deletions:
↑ Collapse diff ↑
Show white space 24 line context
... ...
@@ -690,24 +690,25 @@
690 690
    .refOption("area", "Full relative area of the cities (default is 1)", area)
691 691
    .refOption("disc", "Nodes are evenly distributed on a unit disc (default)",disc_d)
692 692
    .optionGroup("dist", "disc")
693 693
    .refOption("square", "Nodes are evenly distributed on a unit square", square_d)
694 694
    .optionGroup("dist", "square")
695 695
    .refOption("gauss",
696 696
            "Nodes are located according to a two-dim gauss distribution",
697 697
            gauss_d)
698 698
    .optionGroup("dist", "gauss")
699 699
//     .mandatoryGroup("dist")
700 700
    .onlyOneGroup("dist")
701 701
    .boolOption("eps", "Also generate .eps output (prefix.eps)")
702
    .boolOption("nonodes", "Draw the edges only in the generated .eps")
702 703
    .boolOption("dir", "Directed digraph is generated (each arcs are replaced by two directed ones)")
703 704
    .boolOption("2con", "Create a two connected planar digraph")
704 705
    .optionGroup("alg","2con")
705 706
    .boolOption("tree", "Create a min. cost spanning tree")
706 707
    .optionGroup("alg","tree")
707 708
    .boolOption("tsp", "Create a TSP tour")
708 709
    .optionGroup("alg","tsp")
709 710
    .boolOption("tsp2", "Create a TSP tour (tree based)")
710 711
    .optionGroup("alg","tsp2")
711 712
    .boolOption("dela", "Delaunay triangulation digraph")
712 713
    .optionGroup("alg","dela")
713 714
    .onlyOneGroup("alg")
... ...
@@ -810,25 +811,25 @@
810 811

	
811 812

	
812 813
  std::cout << "Number of nodes    : " << countNodes(g) << std::endl;
813 814
  std::cout << "Number of arcs    : " << countEdges(g) << std::endl;
814 815
  double tlen=0;
815 816
  for(EdgeIt e(g);e!=INVALID;++e)
816 817
    tlen+=sqrt((coords[g.v(e)]-coords[g.u(e)]).normSquare());
817 818
  std::cout << "Total arc length  : " << tlen << std::endl;
818 819

	
819 820
  if(ap["eps"])
820 821
    graphToEps(g,prefix+".eps").scaleToA4().
821 822
      scale(600).nodeScale(.005).arcWidthScale(.001).preScale(false).
822
      coords(coords).run();
823
      coords(coords).hideNodes(ap.given("nonodes")).run();
823 824

	
824 825
  if(ap["dir"])
825 826
    DigraphWriter<ListGraph>(g,prefix+".lgf").
826 827
      nodeMap("coordinates_x",scaleMap(xMap(coords),600)).
827 828
      nodeMap("coordinates_y",scaleMap(yMap(coords),600)).
828 829
      run();
829 830
  else GraphWriter<ListGraph>(g,prefix+".lgf").
830 831
         nodeMap("coordinates_x",scaleMap(xMap(coords),600)).
831 832
         nodeMap("coordinates_y",scaleMap(yMap(coords),600)).
832 833
         run();
833 834
}
834 835

	
0 comments (0 inline)