demo/hello_lemon.cc
author Alpar Juttner <alpar@cs.elte.hu>
Wed, 05 Nov 2008 17:10:54 +0000
changeset 17 0b3b26cd1cea
parent 5 29baa4a189bf
child 20 3ffc47b666b1
permissions -rw-r--r--
Better build system

- configure script added
- demo/*.cc are now compiled (the executables are in demo/build)
- version number appears in the doc and automatically updates
- the cross reference to the lemon doc can be relocated (e.g. to a local
copy of the doc)
- some repo reorganization has taken place
- better .hgignore
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     5  * Copyright (C) 2003-2008
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    11  * precise terms see the accompanying LICENSE file.
    12  *
    13  * This software is provided "AS IS" with no warranty of any kind,
    14  * express or implied, and with no claim as to its suitability for any
    15  * purpose.
    16  *
    17  */
    18 
    19 ///\file
    20 ///\brief Simple "Hello World!" program for LEMON.
    21 ///
    22 /// Simple "Hello World!" program for LEMON.
    23 /// \include hello_lemon.cc
    24 
    25 #include <iostream>
    26 #include <lemon/list_graph.h>
    27 
    28 int main()
    29 {
    30   typedef lemon::ListDigraph Graph;
    31   Graph g;
    32 
    33   Graph::Node u = g.addNode();
    34   Graph::Node v = g.addNode();
    35   Graph::Arc  e = g.addArc(u, v);
    36 
    37   std::cout << "Hello World! This is LEMON library here." << std::endl;
    38   std::cout << "We have a directed graph with "
    39             << countNodes(g) << " nodes and "
    40             << countArcs(g) << " arc." << std::endl;
    41 
    42   return 0;
    43 }