To run graph-displayer with sample input, type make run, but do not move the nodes, YET
authorhegyi
Fri, 01 Apr 2005 13:42:31 +0000
changeset 1290082fc511c2b9
parent 1289 142633fc5014
child 1291 16cde3e1aa9f
To run graph-displayer with sample input, type make run, but do not move the nodes, YET
src/work/peter/Makefile
src/work/peter/graph-displayer.cc
src/work/peter/graphocska.lgf
     1.1 --- a/src/work/peter/Makefile	Fri Apr 01 09:44:29 2005 +0000
     1.2 +++ b/src/work/peter/Makefile	Fri Apr 01 13:42:31 2005 +0000
     1.3 @@ -5,6 +5,6 @@
     1.4  	g++ xy-reader.cc -W -Wall -ansi -pedantic -o xyr -I../..
     1.5  
     1.6  run: gd
     1.7 -	./gd
     1.8 +	./gd graphocska.lgf
     1.9  
    1.10  .PHONY: run
     2.1 --- a/src/work/peter/graph-displayer.cc	Fri Apr 01 09:44:29 2005 +0000
     2.2 +++ b/src/work/peter/graph-displayer.cc	Fri Apr 01 13:42:31 2005 +0000
     2.3 @@ -279,6 +279,11 @@
     2.4  
     2.5  int main(int argc, char *argv[])
     2.6  {
     2.7 +  if(argc<2)
     2.8 +  {
     2.9 +      std::cerr << "USAGE: gd <input filename.lgf>" << endl;
    2.10 +      return 0;
    2.11 +  }
    2.12  
    2.13    Coordinates coosvector;
    2.14  
    2.15 @@ -291,7 +296,7 @@
    2.16    CoordReaderMap xreader('x',cm);
    2.17    CoordReaderMap yreader('y',cm);
    2.18  
    2.19 -  std::ifstream is("graphocska.lemon");
    2.20 +  std::ifstream is(argv[1]);
    2.21  
    2.22    GraphReader<Graph> reader(is, g);
    2.23    reader.addNodeMap("coordinates_x", xreader);
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/src/work/peter/graphocska.lgf	Fri Apr 01 13:42:31 2005 +0000
     3.3 @@ -0,0 +1,11 @@
     3.4 +@nodeset
     3.5 +id   coordinates_x    coordinates_y
     3.6 +1    300	      300
     3.7 +2    -300	      -300
     3.8 +3    300	      -300
     3.9 +4    -300	      300
    3.10 +5    100	      100
    3.11 +6    -100	      -100
    3.12 +7    -100	      100
    3.13 +8    100	      -100
    3.14 +@end