\chapter{Introduction} \label{Introduction}
\pagenumbering{arabic}

One of the major differences between combinatorial computing
and other areas of computing such as statistics, numerical
analysis and linear programming is the use of complex data types. 
Whilst the built-in types, such as integers, reals, vectors, and matrices,
usually suffice in the other areas, combinatorial computing relies heavily 
on types like stacks, queues, dictionaries, sequences, sorted sequences, 
priority queues, graphs, points, segments, $\ldots$
In the fall of 1988, we started a project (called {\bf LEDA} for Library of
Efficient Data types and Algorithms) to build a small, but growing library 
of data types and algorithms in a form which allows them to be used by 
non-experts. We hope that the system will narrow the gap between algorithms
research, teaching, and implementation. The main features of LEDA are:

\begin{enumerate}
\item 
    LEDA provides a sizable collection of data types and algorithms in a form 
    which allows them to be used by non-experts. In the current version, this
    collection includes most of the data types and algorithms described in the 
    text books of the area. 

\item 
    LEDA gives a precise and readable specification for each of the data types 
    and algorithms mentioned above.  The specifications are short (typically, 
    not more than a page), general (so as to allow several implementations), 
    and abstract (so as to hide all details of the implementation). 

\item
    For many efficient data structures access by position is important. In 
    LEDA, we use an item concept to cast positions into an abstract form. We 
    mention that most of the specifications given in the LEDA manual use this 
    concept, i.e., the concept is adequate for the description of many data 
    types. 

\item
    LEDA contains efficient implementations for each of the data types, e.g., 
    Fibonacci heaps for priority queues, skip lists and dynamic perfect 
    hashing for dictionaries, ...


\item
    LEDA contains a comfortable data type graph. It offers the standard 
    iterations such as ``for all nodes v of a graph G do'' or ``for all 
    neighbors w of v do'', it allows to add and delete vertices and edges 
    and it offers arrays and matrices indexed by nodes and edges,...  
    The data type graph allows to write programs for graph problems in a 
    form close to the typical text book presentation.


\item 
    LEDA is implemented by a \CC class library. It can be used with almost
    any \CC compiler that supports templates. 


\item
    {LEDA is available by anonymous ftp from {\bf ftp.mpi-sb.mpg.de} in
    directory /pub/LEDA. The distribution contains all sources, installation 
    instructions, a technical report, and the user manual.}


\item
    LEDA is not in the public domain, but can be used freely for research 
    and teaching. Information on a commercial license is available from the 
    author or leda@mpi-sb.mpg.de.

\end{enumerate}

This manual contains the specifications of all data types and algorithms 
currently available in LEDA. Users should be familiar with the \CC 
programming language (see \cite{S91} or \cite{Li89}).  The manual 
is structured as follows: In chapter one, which is a prerequisite for all
other chapters, we discuss the basic concepts and notations used in LEDA.
The other chapters define the data types and algorithms available in
LEDA and give examples of their use. These chapters can be consulted
independently from one another.

\newpage
{\large\bf Version 3.3}

\vspace{1cm}

In the following LEDA denotes the LEDA main directory.
The most important changes and new features in the new version are
(see LEDA/CHANGES):

{\bf Const-Reference Parameters}\\
All parameterized data types now use const-reference parameters
for argument passing. This avoids unnecessary copy operations
which is particularly important when using non-simple type parameters.
 

{\bf A New Implementation for graphs}\\
The implementation of graphs has been rewritten. Now undirected graphs
again have ordered adjacency lists (as in previous versions of LEDA)
and you can specify where a new edge is to be inserted into the adjacency
lists of both the source and target node of the edge.
See the graph manual pages for further information.
 


{\bf A New Window Data Type}\\
The window and panel types have been extended and improved.
Now panels and windows are essentially the same and you can include
panel items into your windows. A short description of the new features
can be found in {\em CHANGES.win} in the LEDA main directory.
One of the changes that probably will cause problems with old code is the
different behaviour of the $read\_mouse$ operation.
$W$.read\_mouse() now returns the predefined constants MOUSE\_BUTTON($i$) 
($i=1,2,3$) instead of $1,2,3$ for the left/middle/right button
Please read the manual pages for windows!


{\bf Installation }

\begin{itemize}
\item
  new installation and configuration procedures for Unix, MS-DOS, and Windows
  (configuration script {\em lconfig}).
 
\item
  new mechanism for avoiding name conflicts with other packages (STL)
  (\<LEDA/REDEFINE\_NAMES.h\> and \<LEDA/UNDEFINE\_NAMES.h\>).
 
\item
  shared libraries under Solaris with SunPro \CC and \g++
\end{itemize}
Please read the INSTALL file in the LEDA main directory.

 

\paragraph{General Improvements}
Many data types and algorithms (especially in the geometry and graph section) 
have been improved. Furthermore, all reported bugs we were able to find and 
understand have been fixed (see LEDA/FIXES for a list). 


\newpage
{\large\bf Version 3.4}

\vspace{1cm}
The most important changes are
\begin {itemize}

\item 
The name of the window library has been changed to  {\em libW  (-lW)}
The old name was libWx. It now has to  appear in front of all other 
libraries {\em\dots -lW -lP -lG -lL -lX11 \dots }.

\item 
Print and Read\\
Functions {\em Print} and {\em Read}  are no longer used to implement
user defined I/O routines. Now, the usual output and input stream 
operators (operator\<\< and operator\>\>) are used. For backward
compatibility Print and Read functions will still work but 
should be avoided. Missing I/O operators will be reported at
compile time.



\item 
Linear Orders (compare)\\
There is no default implementation of ``int compare(const T\&, const T\&)''
giving an error message at run time. Now \<LEDA/param\_types.h\>
only contains a template {\bf declaration} for compare. The effect is
that missing compare functions will be reported by the linker. Now 
the use of a compare functions (e.g. in a parameterized data type as
in dictionary\<key,inf\>) and its definition can be located in different 
source files (which was not possible in the previous version
with many compilers).

\item 
New Compilers and Platforms (lconfig)\\
Win32 (NT and Win95) with\\  
-- Borland C++\\
-- Microsoft Visual C++ \\
-- Watcom C++\\
LINUX\\
-- shared Libraries
   

\item 
Documentation and manual tools\\
Please see section 1.12 of this manual.

\item Memory Management\\
encapsulated into class memory\_manager,
multiple managers, table size parameter.



\item 
Graphs, Planar Maps, and Graph Algorithms\\
Several changes and improvements , see the corresponding sections
of this manual for details.



\item 
Geometry\\
All objects and algorihtms now both with floating point and exact rational 
arithmetic. $delaunay\_tree$ removed and replaced by an efficient and more
robust data structure base on LEDA graphs and exact arithmetic.

\end{itemize}


\paragraph{Further Reading}
Additional material on LEDA, for example information of projects based on LEDA,  can be found on the LEDA web pages
(http://www.mpi-sb.mpg.de/LEDA/leda.html). 

\paragraph{Manual Production and Documentation}
We have improved our tools for manual production and documentation. Type\\
\verb+Lman Lman+\\
to learn more or check the corresponding section in this manual.

