tools/lgf-gen.cc
changeset 530 1c5d6e47921f
parent 523 d9e43511d11c
child 570 ab6da8cf5ab2
equal deleted inserted replaced
0:a40644d6a4f3 1:3df5f3e30566
   697             gauss_d)
   697             gauss_d)
   698     .optionGroup("dist", "gauss")
   698     .optionGroup("dist", "gauss")
   699 //     .mandatoryGroup("dist")
   699 //     .mandatoryGroup("dist")
   700     .onlyOneGroup("dist")
   700     .onlyOneGroup("dist")
   701     .boolOption("eps", "Also generate .eps output (prefix.eps)")
   701     .boolOption("eps", "Also generate .eps output (prefix.eps)")
       
   702     .boolOption("nonodes", "Draw the edges only in the generated .eps")
   702     .boolOption("dir", "Directed digraph is generated (each arcs are replaced by two directed ones)")
   703     .boolOption("dir", "Directed digraph is generated (each arcs are replaced by two directed ones)")
   703     .boolOption("2con", "Create a two connected planar digraph")
   704     .boolOption("2con", "Create a two connected planar digraph")
   704     .optionGroup("alg","2con")
   705     .optionGroup("alg","2con")
   705     .boolOption("tree", "Create a min. cost spanning tree")
   706     .boolOption("tree", "Create a min. cost spanning tree")
   706     .optionGroup("alg","tree")
   707     .optionGroup("alg","tree")
   817   std::cout << "Total arc length  : " << tlen << std::endl;
   818   std::cout << "Total arc length  : " << tlen << std::endl;
   818 
   819 
   819   if(ap["eps"])
   820   if(ap["eps"])
   820     graphToEps(g,prefix+".eps").scaleToA4().
   821     graphToEps(g,prefix+".eps").scaleToA4().
   821       scale(600).nodeScale(.005).arcWidthScale(.001).preScale(false).
   822       scale(600).nodeScale(.005).arcWidthScale(.001).preScale(false).
   822       coords(coords).run();
   823       coords(coords).hideNodes(ap.given("nonodes")).run();
   823 
   824 
   824   if(ap["dir"])
   825   if(ap["dir"])
   825     DigraphWriter<ListGraph>(g,prefix+".lgf").
   826     DigraphWriter<ListGraph>(g,prefix+".lgf").
   826       nodeMap("coordinates_x",scaleMap(xMap(coords),600)).
   827       nodeMap("coordinates_x",scaleMap(xMap(coords),600)).
   827       nodeMap("coordinates_y",scaleMap(yMap(coords),600)).
   828       nodeMap("coordinates_y",scaleMap(yMap(coords),600)).