author | athos |
Fri, 25 Mar 2005 15:32:05 +0000 | |
changeset 1262 | 61f989e3e525 |
parent 762 | 511200bdb71f |
permissions | -rw-r--r-- |
marci@330 | 1 |
// -*- c++ -*- |
marci@330 | 2 |
#include <iostream> |
marci@330 | 3 |
#include <fstream> |
marci@330 | 4 |
|
marci@642 | 5 |
#include <sage_graph.h> |
marci@762 | 6 |
#include <for_each_macros.h> |
marci@330 | 7 |
|
alpar@921 | 8 |
using namespace lemon; |
marci@330 | 9 |
|
marci@330 | 10 |
int main() |
marci@330 | 11 |
{ |
marci@642 | 12 |
typedef SageGraph Graph; |
marci@330 | 13 |
Graph g; |
marci@330 | 14 |
Graph::Node n1=g.addNode(); |
marci@330 | 15 |
Graph::Node n2=g.addNode(); |
marci@330 | 16 |
Graph::NodeIt n; |
marci@409 | 17 |
FOR_EACH_GLOB(n, g) { |
marci@330 | 18 |
std::cout << g.id(n) << " "; |
marci@330 | 19 |
} |
marci@330 | 20 |
std::cout << std::endl; |
marci@330 | 21 |
FOR_EACH_LOC(Graph::NodeIt, m, g) { |
marci@330 | 22 |
std::cout << g.id(m) << " "; |
marci@330 | 23 |
} |
marci@330 | 24 |
std::cout << std::endl; |
marci@330 | 25 |
|
marci@330 | 26 |
|
marci@330 | 27 |
return 0; |
marci@330 | 28 |
} |