1.1 --- a/doc/getstart.dox Mon Jun 27 15:25:33 2005 +0000
1.2 +++ b/doc/getstart.dox Mon Jun 27 19:47:09 2005 +0000
1.3 @@ -1,35 +1,38 @@
1.4 /**
1.5 \page getstart How to start using LEMON
1.6
1.7 -In this page we detail how to start using LEMON, from downloading it to
1.8 -your computer, through the steps of installation to showing a simple
1.9 -"Hello World" type program that already uses LEMON. We assume that you have a
1.10 -basic knowledge of your operating system and \c C++ or \c C
1.11 -programming language.
1.12 +In this page we detail how to start using LEMON, from downloading it to
1.13 +your computer, through the steps of installation, to showing a simple
1.14 +"Hello World" type program that already uses LEMON. We assume that you
1.15 +have a basic knowledge of your operating system and \c C++ programming
1.16 +language. The procedure is pretty straightforward, but if you have any
1.17 +difficulties don't hesitate to
1.18 +<a href="http://lemon.cs.elte.hu/mailinglists.html">ask</a>.
1.19
1.20 \section requirementsLEMON Hardware and software requirements
1.21
1.22 -Hardware requirements ...
1.23 +In LEMON we use C++ templates heavily, thus compilation takes a
1.24 +considerable amount of time and memory. So some decent box would be
1.25 +advantageous. But otherwise there are no special hardware requirements.
1.26
1.27 -You will also need a C++ compiler. We mostly used the Gnu C++ Compiler (g++),
1.28 -from version 3.0 upwards. We also checked the Intel C compiler
1.29 -(icc). Unfortunately, Visual C++ compiler knows not enough to compile the
1.30 -library, so if you are using Microsoft Windows, then try to compile under
1.31 -Cygwin.
1.32 +You will need a recent C++ compiler. Our primary target is the GNU C++
1.33 +Compiler (g++), from version 3.3 upwards. We also checked the Intel C
1.34 +compiler (icc). Microsoft Visual C++ .NET version was also reported to
1.35 +work (but not the earlier versions). If you want to develop with LEMON
1.36 +under Windows you could consider using Cygwin.
1.37
1.38 -Ide kell írni:
1.39 -
1.40 --Hol fordul (Windows-os fordító nem fordítja, unix/linux alatt gcc hanyas verziója kell)
1.41 --
1.42
1.43 -In this description we will suppose a linux environment and Gnu C Compiler.
1.44 +In this description we will suppose a linux environment and GNU C Compiler.
1.45
1.46 \section downloadLEMON How to download LEMON
1.47
1.48 You can download LEMON from the LEMON web site:
1.49 -http://lemon.cs.elte.hu/dowload.html
1.50 -. There you will find the issued distributions
1.51 -in form of <tt> .tar.gz </tt> 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.
1.52 +http://lemon.cs.elte.hu/dowload.html.
1.53 +There you will find released versions in form of <tt>.tar.gz</tt> files.
1.54 +If you want a developer version (for example you want to contribute in
1.55 +developing the library LEMON) then you might want to use our Subversion
1.56 +repository. This case is not detailed here, so from now on we suppose that
1.57 +you downloaded a tar.gz file.
1.58
1.59
1.60
1.61 @@ -37,79 +40,85 @@
1.62
1.63 In order to install LEMON you have to do the following
1.64
1.65 -Download the tarball (named <tt>lemon-x.y.z.tar.gz</tt> where \c x,\c y and \c z are
1.66 -numbers indicating the version of the library: in our example we will have lemon-0.3.1) and issue the following commands:
1.67 +Download the tarball (named <tt>lemon-x.y.z.tar.gz</tt> where \c x,\c y
1.68 +and \c z are numbers indicating the version of the library: in our example
1.69 +we will have <tt>lemon-0.3.1.tar.gz</tt>) and issue the following
1.70 +commands:
1.71
1.72 -\code
1.73 +\verbatim
1.74 tar xvzf lemon-0.3.1.tar.gz
1.75 cd lemon-0.3.1
1.76 ./configure
1.77 make
1.78 -make check (This is optional, but recomended. It runs a bunch of tests.)
1.79 +make check #(This is optional, but recomended. It runs a bunch of tests.)
1.80 make install
1.81 -\endcode
1.82 +\endverbatim
1.83
1.84 -These commands install LEMON under \c /usr/local (you will probably need \c root
1.85 -privileges to be able to install to that directory). If you want to install it
1.86 -to some other place, then pass the \c --prefix=DIR flag to \c ./configure. In
1.87 -what follows we will assume that you were able to install to directory \c
1.88 -/usr/local, otherwise some extra care is to be taken to use the library.
1.89 +These commands install LEMON under \c /usr/local (you will
1.90 +need root privileges to be able to install to that
1.91 +directory). If you want to install it to some other place, then
1.92 +pass the \c --prefix=DIR flag to \c ./configure. In what follows
1.93 +we will assume that you were able to install to directory
1.94 +\c /usr/local, otherwise some extra care is to be taken to use the
1.95 +library.
1.96
1.97 We briefly explain these commands below.
1.98
1.99 -\code
1.100 +\verbatim
1.101 tar xvzf lemon-0.3.1.tar.gz
1.102 -\endcode
1.103 -This command untars the <tt>tar.gz</tt> file into a directory named <tt> lemon-0.3.1</tt>.
1.104 +\endverbatim
1.105 +This command untars the <tt>tar.gz</tt> file into a directory named <tt>
1.106 +lemon-0.3.1</tt>.
1.107
1.108 -\code
1.109 +\verbatim
1.110 cd lemon-0.3.1
1.111 -\endcode
1.112 +\endverbatim
1.113 Enters the directory.
1.114
1.115 -\code
1.116 +\verbatim
1.117 ./configure
1.118 -\endcode
1.119 +\endverbatim
1.120 Does some configuration (creates makefiles etc).
1.121 +\todo Explain the most important switches here (gui, doc, glpk, cplex).
1.122
1.123 -\code
1.124 +\verbatim
1.125 make
1.126 -\endcode
1.127 -This command compiles the <tt> .cc</tt> files of the library package (the
1.128 -implementation of non-template functions and classes and some test and demo
1.129 -programs) and creates the very important <b> libemon.la </b> file. When
1.130 -linking your program that uses LEMON it needs to access this file.
1.131 +\endverbatim
1.132 +This command compiles the non-template part of LEMON into
1.133 +<b>libemon.a</b> file. It also compiles some benchmark and demo
1.134 +programs.
1.135
1.136 -\code
1.137 -make check (This is optional, but recomended. It runs a bunch of tests.)
1.138 -\endcode
1.139 -This is an optional step: it runs the test programs that we developed for
1.140 -LEMON to check
1.141 -whether the library works properly on your platform.
1.142 +\verbatim
1.143 +make check
1.144 +\endverbatim
1.145 +This is an optional step: it runs the test programs that we
1.146 +developed for LEMON to check whether the library works properly on
1.147 +your platform.
1.148
1.149 -\code
1.150 +\verbatim
1.151 make install
1.152 -\endcode
1.153 +\endverbatim
1.154 This will copy the directory structure to its final destination (e.g. to \c
1.155 -/usr/local) so that your system can access it.
1.156 +/usr/local) so that your system can access it. This command should
1.157 +be issued as "root", unless you provided a \c --prefix switch to
1.158 +the \c cofugure to install the library in non-default location.
1.159
1.160 \section helloworld My first program using LEMON
1.161
1.162 -If you have installed LEMON on your system you
1.163 -can paste the following code
1.164 -segment into a file to have a first working program that uses library LEMON.
1.165 +If you have installed LEMON on your system you can paste the
1.166 +following code segment into a file (named e.g. \c hello_lemon.cc)
1.167 +to have a first working program that uses library LEMON.
1.168
1.169 \code
1.170 #include <iostream>
1.171 #include <lemon/list_graph.h>
1.172
1.173 -using namespace lemon;
1.174 -
1.175 int main()
1.176 {
1.177 - typedef ListGraph Graph;
1.178 + typedef lemon::ListGraph Graph;
1.179 typedef Graph::EdgeIt EdgeIt;
1.180 typedef Graph::NodeIt NodeIt;
1.181 + using lemon::INVALID;
1.182
1.183 Graph g;
1.184
1.185 @@ -129,7 +138,7 @@
1.186 for (EdgeIt i(g); i!=INVALID; ++i)
1.187 std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
1.188 std::cout << std::endl;
1.189 -
1.190 +}
1.191 \endcode
1.192
1.193 First let us briefly explain how this program works.
1.194 @@ -150,33 +159,37 @@
1.195 \c target and
1.196 \c source member functions can be used to access the endpoints of an edge.
1.197
1.198 -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
1.199 -successful then it is very easy to compile this program with the following
1.200 -command (the argument <tt>-lemon</tt> tells the compiler that we are using the
1.201 -installed library LEMON):
1.202 -\code
1.203 -g++ hemon.cc -o hemon -lemon
1.204 -\endcode
1.205 +If you have saved the preceding code into a file named, say, \c
1.206 +hello_lemon.cc and your installation of LEMON into directory \c
1.207 +/usr/local was successful then it is very easy to compile this
1.208 +program with the following command (the argument <tt>-lemon</tt>
1.209 +tells the compiler that we are using the installed library LEMON):
1.210
1.211 -As a result you will get the exacutable \c hemon in
1.212 +\verbatim
1.213 +g++ hello_lemon.cc -o hello_lemon -lemon
1.214 +\endverbatim
1.215 +
1.216 +As a result you will get the exacutable \c hello_lemon in
1.217 this directory that you can run by the command
1.218 -\code
1.219 -./hemon
1.220 -\endcode
1.221 +\verbatim
1.222 +./hello_lemon
1.223 +\endverbatim
1.224
1.225
1.226 -If everything has gone well then the previous code fragment prints out the following:
1.227 +If everything has gone well then the previous code fragment prints
1.228 +out the following:
1.229
1.230 -\code
1.231 +\verbatim
1.232 Nodes: 2 1 0
1.233
1.234 Edges: (0,2) (1,2) (0,1) (2,1) (1,0) (2,0)
1.235 -\endcode
1.236 +\endverbatim
1.237
1.238 Congratulations!
1.239
1.240 -If you want to see more features, go to the \ref quicktour "Quick Tour to
1.241 -LEMON", if you want to see see some demo programs then go to our
1.242 +If you want to see more features, go to the
1.243 +\ref quicktour "Quick Tour to LEMON",
1.244 +if you want to see see some demo programs then go to our
1.245 \ref demoprograms "Demo Programs" page!
1.246
1.247