demo/hello_lemon.cc
changeset 1662 8b4d25be4f7a
parent 1636 260ac104190f
child 1875 98698b69a902
equal deleted inserted replaced
4:a26125a5eda8 5:76cff5ba5f25
    19 ///\brief LEMON style "Hello World!" program
    19 ///\brief LEMON style "Hello World!" program
    20 ///
    20 ///
    21 /// This program is intended to be a "Hello World!" program that shows
    21 /// This program is intended to be a "Hello World!" program that shows
    22 /// the very basic notions of the LEMON library: \ref graphs "graphs" and
    22 /// the very basic notions of the LEMON library: \ref graphs "graphs" and
    23 /// \ref maps-page "maps". Click on the links to read more about these.
    23 /// \ref maps-page "maps". Click on the links to read more about these.
       
    24 ///
       
    25 /// \include hello_lemon.cc
    24 
    26 
    25 #include <iostream>
    27 #include <iostream>
    26 #include <lemon/list_graph.h>
    28 #include <lemon/list_graph.h>
    27 
    29 
    28 int main()
    30 int main()
    79   std::cout <<  std::endl;
    81   std::cout <<  std::endl;
    80 
    82 
    81   std::cout << "There is a map on the edges (length)!" << std::endl;
    83   std::cout << "There is a map on the edges (length)!" << std::endl;
    82   std::cout <<  std::endl;
    84   std::cout <<  std::endl;
    83   for (EdgeIt i(g); i!=INVALID; ++i)
    85   for (EdgeIt i(g); i!=INVALID; ++i)
    84     std::cout << "length(" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")="<<length[i]<<std::endl;
    86     std::cout << "length(" << g.id(g.source(i)) << ","
       
    87 	      << g.id(g.target(i)) << ")="<<length[i]<<std::endl;
    85 
    88 
    86   std::cout << std::endl;
    89   std::cout << std::endl;
    87 
    90 
    88 }
    91 }