Combinatorial and Graph Algorithms
School of Computing, National University of Singapore
LEDA
(2007-Sept-04)
Library of Efficient
Data Types and Algorithms (LEDA) is a
software library that implements many data types and
algorithms frequently used in combinatorial computing.
LEDA is now a commercial product that is marketed and supported by
Algorithmic Solutions' homepage (http://www.algorithmic-solutions.com/).
Detailed API as well as other documentations are also available.
A student version for academic purposes can be purchased for EUR$49.
The version we (NUS-SoC) have is an old version that is free for academic purposes.
LEDA Resources in SOC
In SoC's servers, we use a much older version (v4.1) of LEDA
that is free for academic purposes
(current version of LEDA is 5.1.1, as of Feb 2007).
As such, we make available the manual for v4.1 on this web-site.
LEDA 4.1 Manual
Using LEDA on SoC machines
How to compile a LEDA program on a UN*X system
-
To avoid pain and suffering it is best that you use
the GNU C++ compiler, g++, which is available on all SoC
machines.
-
Make sure that the LEDA include and
runtime library files are included the related search paths (i.e.
LD_LIBRARY_PATH and INCLUDE_PATH). Here's how:
-
Find out the shell that you are using. To do that, type
echo $SHELL
at the prompt.
-
If you use bash,
add these lines to your
.bash_profile file or .profile file, either one of
which is sure to be found in your home directory:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/proj/leda/4.1/lib
export INCLUDE_PATH=$INCLUDE_PATH:/home/proj/leda/4.1/include
-
If you use csh or tcsh instead,
add the following lines to your .cshrc file in your home
directory:
setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/home/proj/leda/4.1/lib
setenv INCLUDE_PATH $INCLUDE_PATH:/home/proj/leda/4.1/include
-
If you have done these correctly, you should be able to see
the LEDA paths included in LD_LIBRARY_PATH and
INCLUDE_PATH when you type the following at the prompt:
echo $LD_LIBRARY_PATH; echo $INCLUDE_PATH
-
If all is well, you should now be able to compile a simple LEDA program
(program1.cpp, say) by typing
g++ -I/home/proj/leda/4.1/include <program1.cpp> -L/home/proj/leda/4.1/lib -lG -lP -lL
Where to get help on LEDA...
LEDA Info Page (updated: Oct 2007)
Leong Hon Wai's Home Page
School of Computing