2 #include <lemon/smart_graph.h>
3 #include <lemon/invalid.h>
4 #include <lemon/graph_reader.h>
5 #include <lemon/graph_writer.h>
14 std::string filename="sample.lgf";
15 GraphReader<SmartGraph> reader(filename,graph);
16 SmartGraph::EdgeMap<int> cap(graph);
17 reader.readEdgeMap("capacity",cap);
20 std::cout << "Hello! We have read a graph from file " << filename<<
21 " and some maps on it: now we write this to the standard output!" <<
25 GraphWriter<SmartGraph> writer(std::cout, graph);
26 writer.writeEdgeMap("multiplicity", cap);
29 } catch (DataFormatError& error) {
30 std::cerr << error.what() << std::endl;