/** \page getting_started Getting Started At the beginning we hardly suggest that you open your favorite text editor and enter the code simultaneously as you read it. Compiling the demos is also a good exercise. As the first example we show you a lemon style "Hello World" program. Now we explain almost every line, but later we will skip the basics and focus on new things. \section hello_world Hello World in LEMON In this little program we give you a taste of the LEMON programming. Let's see the code fragment to fragment! \dontinclude hello_world.cc \skip include \until iostream We want to use a \c lemon::ListGraph so the include goes like this: \skip include \until list_graph The next few lines are not necessary but useful shortcuts, if you don't want to type \c lemon::ListGraph::Node every time. \skip using \until Edge For this demo we need to declare a ListGraph and a special NodeMap to store the characters associated to the graph's nodes. \skip main \until char_map Adding nodes to the graph is very easy. \skip new_node \until addNode When a new node or edge to the graph the assigned maps are automatically resized. So graphs can be build dynamically. The usage of a map is very natural. \skip char_map \until char_map Notice that no reference or additional assignment needed to work with nodes. They won't become illegal or won't lead to throwing any exceptions. You can declare and handle node like every other basic type such as \c int. \skip Store \until char_map As one expects adding an Edge is similar. You need to define the \b source node and the \b destination node. The nodes must belong to the graph of course. The Edge has the direction from the source to the destination. In some case you don't want the edges to be directed - then you use an undirected graph. For example lemon::ListUGraph. \skip addEdge \until addEdge In the next few lines we add some more nodes and edges and to the graph we need. Those lines are not very interesting so we skip them, but you find the whole working program in file hello_lemon.cc in the demo section. The next statement must be familiar. But what is that INVALID in the \c while test statement? In LEMON we usually use the INVALID to check if an object contains valid information. \skip current_node \until { We take the current node and write out the character assigned to it. Is's easy with the \c char_map. \skip std \until std And here comes the trick. OutEdgeIt iterates on outgoing edges of a given node. We pass the current node as argument to it, so the \c edge iterator will stand on the first outgoing edge of the current node, or will be INVALID if the node has no outgoing edges. \skip edge \until edge The graph we built before is linear, so we know that it ends, when no more outgoing edges found. Otherwise the current node must be the node the edge points to. Basic information about an edge can be requested from the graph. \skip if \until } Finish the code, just to be precise. \skip return \until } \section compile_hw Compiling Hello World To compile this program all you have to do is type in \code g++ -ohw hello_world.cc \endcode and press \c Enter! This is the case if you installed LEMON on your system. (For more information see the LEMON installation instructions.) This is because LEMON is template library and most of it's code has to be available as source code during compilation. Most programs using LEMON will compile as easy as this one unless you want to use some performance measuring tools LEMON can provide. Then you need to link an additional library against your program. */