2. GraphWin combines the two types graph and window and forms a bridge
between the graph data types and algorithms and the graphics interface
of LEDA.
GraphWin can easily be used in LEDA programs for
constructing, displaying and manipulating graphs and for animating and
debugging graph algorithms.
Type the next small program to see how powerful
it is. (call it gw.cc )
#include <iostream>
#include <LEDA/graphwin.h>
int main()
{
GraphWin gw;
gw.display();
gw.edit();
}
Click here to download the file
If you have problems compiling it you can follow the next steps:
Your job is to draw the same graph as in the figure above and play around with the environment to get used to it.
You might want to download the file ledac
to compile just typing ledac file
( your program should have extension .cc ).
For ledac
to work you need to change his attributes typing the next command : chmod
a+x ledac