demo/helloworld.cc
changeset 1526 8c14aa8f27a2
parent 1525 6d94de269ab1
child 1527 7ceab500e1f6
     1.1 --- a/demo/helloworld.cc	Wed Jun 29 19:44:30 2005 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,39 +0,0 @@
     1.4 -#include <iostream>
     1.5 -#include <lemon/list_graph.h>
     1.6 -
     1.7 -using namespace lemon;
     1.8 -
     1.9 -int main()
    1.10 -{
    1.11 -  typedef ListGraph Graph;
    1.12 -  typedef Graph::Edge Edge;
    1.13 -  typedef Graph::InEdgeIt InEdgeIt;
    1.14 -  typedef Graph::OutEdgeIt OutEdgeIt;
    1.15 -  typedef Graph::EdgeIt EdgeIt;
    1.16 -  typedef Graph::Node Node;
    1.17 -  typedef Graph::NodeIt NodeIt;
    1.18 -
    1.19 -  Graph g;
    1.20 -  
    1.21 -  for (int i = 0; i < 3; i++)
    1.22 -    g.addNode();
    1.23 -  
    1.24 -  for (NodeIt i(g); i!=INVALID; ++i)
    1.25 -    for (NodeIt j(g); j!=INVALID; ++j)
    1.26 -      if (i != j) g.addEdge(i, j);
    1.27 -
    1.28 -  std::cout << "Hello World!" << std::endl;
    1.29 -  std::cout <<  std::endl;
    1.30 -  std::cout << "This is library LEMON here! We have a graph!" << std::endl;
    1.31 -  std::cout <<  std::endl;
    1.32 -
    1.33 -  std::cout << "Nodes:";
    1.34 -  for (NodeIt i(g); i!=INVALID; ++i)
    1.35 -    std::cout << " " << g.id(i);
    1.36 -  std::cout << std::endl;
    1.37 -
    1.38 -  std::cout << "Edges:";
    1.39 -  for (EdgeIt i(g); i!=INVALID; ++i)
    1.40 -    std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
    1.41 -  std::cout << std::endl;
    1.42 -}