COIN-OR::LEMON - Graph Library

Changeset 36:199a65b64d90 in lemon-tutorial for demo


Ignore:
Timestamp:
02/20/10 19:02:04 (15 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Simplify hello_lemon.cc with 'using namespace' commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/hello_lemon.cc

    r20 r36  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    2626#include <lemon/list_graph.h>
    2727
     28using namespace lemon;
     29using namespace std;
     30
    2831int main()
    2932{
    30   typedef lemon::ListDigraph Graph;
    31   Graph g;
     33  ListDigraph g;
    3234
    33   Graph::Node u = g.addNode();
    34   Graph::Node v = g.addNode();
    35   Graph::Arc  e = g.addArc(u, v);
     35  ListDigraph::Node u = g.addNode();
     36  ListDigraph::Node v = g.addNode();
     37  ListDigraph::Arc  a = g.addArc(u, v);
    3638
    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;
     39  cout << "Hello World! This is LEMON library here." << endl;
     40  cout << "We have a directed graph with " << countNodes(g) << " nodes "
     41       << "and " << countArcs(g) << " arc." << endl;
    4142
    4243  return 0;
Note: See TracChangeset for help on using the changeset viewer.