CSMDSI - Lab Induced Session V
Using LEDA

Date: 05/12/2000

1. The LEDA library provides a stack and a queue data type along with a set of operations on them (see the LEDA manual). Compare experimentally the
    actual performances of the LEDA stack and queue data types with the customised formula-based stack (stack.h) and queue (queue.h) classes,
    respectively. In order to assess their practical performance, use a random sequence of 50000 operations consisting of evenly intermixed insertions and
    deletions. Instructions on how to use LEDA can be found at the Web page of the course

    How to use LEDA

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:

    You should be able to see something like the figure below.

    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