# HG changeset patch
# User klao
# Date 1119901629 0
# Node ID 17e367a93cbb0ed4a3fed2885c08b966fb203a33
# Parent f8efed98d6a34420902a23c4b8e1fd22ab57428f
getstart improvements
diff -r f8efed98d6a3 -r 17e367a93cbb doc/getstart.dox
--- a/doc/getstart.dox Mon Jun 27 15:25:33 2005 +0000
+++ b/doc/getstart.dox Mon Jun 27 19:47:09 2005 +0000
@@ -1,35 +1,38 @@
/**
\page getstart How to start using LEMON
-In this page we detail how to start using LEMON, from downloading it to
-your computer, through the steps of installation to showing a simple
-"Hello World" type program that already uses LEMON. We assume that you have a
-basic knowledge of your operating system and \c C++ or \c C
-programming language.
+In this page we detail how to start using LEMON, from downloading it to
+your computer, through the steps of installation, to showing a simple
+"Hello World" type program that already uses LEMON. We assume that you
+have a basic knowledge of your operating system and \c C++ programming
+language. The procedure is pretty straightforward, but if you have any
+difficulties don't hesitate to
+ask.
\section requirementsLEMON Hardware and software requirements
-Hardware requirements ...
+In LEMON we use C++ templates heavily, thus compilation takes a
+considerable amount of time and memory. So some decent box would be
+advantageous. But otherwise there are no special hardware requirements.
-You will also need a C++ compiler. We mostly used the Gnu C++ Compiler (g++),
-from version 3.0 upwards. We also checked the Intel C compiler
-(icc). Unfortunately, Visual C++ compiler knows not enough to compile the
-library, so if you are using Microsoft Windows, then try to compile under
-Cygwin.
+You will need a recent C++ compiler. Our primary target is the GNU C++
+Compiler (g++), from version 3.3 upwards. We also checked the Intel C
+compiler (icc). Microsoft Visual C++ .NET version was also reported to
+work (but not the earlier versions). If you want to develop with LEMON
+under Windows you could consider using Cygwin.
-Ide kell írni:
-
--Hol fordul (Windows-os fordító nem fordítja, unix/linux alatt gcc hanyas verziója kell)
--
-In this description we will suppose a linux environment and Gnu C Compiler.
+In this description we will suppose a linux environment and GNU C Compiler.
\section downloadLEMON How to download LEMON
You can download LEMON from the LEMON web site:
-http://lemon.cs.elte.hu/dowload.html
-. There you will find the issued distributions
-in form of .tar.gz files. If you want a developer version (for example you want to contribute in developing the library LEMON) then you might want to use our Subversion repository. This case is not detailed here, so from now on we suppose that you downloaded a tar.gz file.
+http://lemon.cs.elte.hu/dowload.html.
+There you will find released versions in form of .tar.gz files.
+If you want a developer version (for example you want to contribute in
+developing the library LEMON) then you might want to use our Subversion
+repository. This case is not detailed here, so from now on we suppose that
+you downloaded a tar.gz file.
@@ -37,79 +40,85 @@
In order to install LEMON you have to do the following
-Download the tarball (named lemon-x.y.z.tar.gz where \c x,\c y and \c z are
-numbers indicating the version of the library: in our example we will have lemon-0.3.1) and issue the following commands:
+Download the tarball (named lemon-x.y.z.tar.gz where \c x,\c y
+and \c z are numbers indicating the version of the library: in our example
+we will have lemon-0.3.1.tar.gz) and issue the following
+commands:
-\code
+\verbatim
tar xvzf lemon-0.3.1.tar.gz
cd lemon-0.3.1
./configure
make
-make check (This is optional, but recomended. It runs a bunch of tests.)
+make check #(This is optional, but recomended. It runs a bunch of tests.)
make install
-\endcode
+\endverbatim
-These commands install LEMON under \c /usr/local (you will probably need \c root
-privileges to be able to install to that directory). If you want to install it
-to some other place, then pass the \c --prefix=DIR flag to \c ./configure. In
-what follows we will assume that you were able to install to directory \c
-/usr/local, otherwise some extra care is to be taken to use the library.
+These commands install LEMON under \c /usr/local (you will
+need root privileges to be able to install to that
+directory). If you want to install it to some other place, then
+pass the \c --prefix=DIR flag to \c ./configure. In what follows
+we will assume that you were able to install to directory
+\c /usr/local, otherwise some extra care is to be taken to use the
+library.
We briefly explain these commands below.
-\code
+\verbatim
tar xvzf lemon-0.3.1.tar.gz
-\endcode
-This command untars the tar.gz file into a directory named lemon-0.3.1.
+\endverbatim
+This command untars the tar.gz file into a directory named
+lemon-0.3.1.
-\code
+\verbatim
cd lemon-0.3.1
-\endcode
+\endverbatim
Enters the directory.
-\code
+\verbatim
./configure
-\endcode
+\endverbatim
Does some configuration (creates makefiles etc).
+\todo Explain the most important switches here (gui, doc, glpk, cplex).
-\code
+\verbatim
make
-\endcode
-This command compiles the .cc files of the library package (the
-implementation of non-template functions and classes and some test and demo
-programs) and creates the very important libemon.la file. When
-linking your program that uses LEMON it needs to access this file.
+\endverbatim
+This command compiles the non-template part of LEMON into
+libemon.a file. It also compiles some benchmark and demo
+programs.
-\code
-make check (This is optional, but recomended. It runs a bunch of tests.)
-\endcode
-This is an optional step: it runs the test programs that we developed for
-LEMON to check
-whether the library works properly on your platform.
+\verbatim
+make check
+\endverbatim
+This is an optional step: it runs the test programs that we
+developed for LEMON to check whether the library works properly on
+your platform.
-\code
+\verbatim
make install
-\endcode
+\endverbatim
This will copy the directory structure to its final destination (e.g. to \c
-/usr/local) so that your system can access it.
+/usr/local) so that your system can access it. This command should
+be issued as "root", unless you provided a \c --prefix switch to
+the \c cofugure to install the library in non-default location.
\section helloworld My first program using LEMON
-If you have installed LEMON on your system you
-can paste the following code
-segment into a file to have a first working program that uses library LEMON.
+If you have installed LEMON on your system you can paste the
+following code segment into a file (named e.g. \c hello_lemon.cc)
+to have a first working program that uses library LEMON.
\code
#include
#include
-using namespace lemon;
-
int main()
{
- typedef ListGraph Graph;
+ typedef lemon::ListGraph Graph;
typedef Graph::EdgeIt EdgeIt;
typedef Graph::NodeIt NodeIt;
+ using lemon::INVALID;
Graph g;
@@ -129,7 +138,7 @@
for (EdgeIt i(g); i!=INVALID; ++i)
std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
std::cout << std::endl;
-
+}
\endcode
First let us briefly explain how this program works.
@@ -150,33 +159,37 @@
\c target and
\c source member functions can be used to access the endpoints of an edge.
-If you have saved the preceding code into a file named, say, \c hemon.cc and your installation of LEMON into directory \c /usr/local was
-successful then it is very easy to compile this program with the following
-command (the argument -lemon tells the compiler that we are using the
-installed library LEMON):
-\code
-g++ hemon.cc -o hemon -lemon
-\endcode
+If you have saved the preceding code into a file named, say, \c
+hello_lemon.cc and your installation of LEMON into directory \c
+/usr/local was successful then it is very easy to compile this
+program with the following command (the argument -lemon
+tells the compiler that we are using the installed library LEMON):
-As a result you will get the exacutable \c hemon in
+\verbatim
+g++ hello_lemon.cc -o hello_lemon -lemon
+\endverbatim
+
+As a result you will get the exacutable \c hello_lemon in
this directory that you can run by the command
-\code
-./hemon
-\endcode
+\verbatim
+./hello_lemon
+\endverbatim
-If everything has gone well then the previous code fragment prints out the following:
+If everything has gone well then the previous code fragment prints
+out the following:
-\code
+\verbatim
Nodes: 2 1 0
Edges: (0,2) (1,2) (0,1) (2,1) (1,0) (2,0)
-\endcode
+\endverbatim
Congratulations!
-If you want to see more features, go to the \ref quicktour "Quick Tour to
-LEMON", if you want to see see some demo programs then go to our
+If you want to see more features, go to the
+\ref quicktour "Quick Tour to LEMON",
+if you want to see see some demo programs then go to our
\ref demoprograms "Demo Programs" page!