#include #include #include #include #include using namespace lemon; int main() { SmartGraph graph; try { std::string filename="sample.lgf"; GraphReader reader(filename,graph); SmartGraph::EdgeMap cap(graph); reader.readEdgeMap("capacity",cap); reader.run(); std::cout << "Hello! We have read a graph from file " << filename<< " and some maps on it: now we write this to the standard output!" << std::endl; GraphWriter writer(std::cout, graph); writer.writeEdgeMap("multiplicity", cap); // writer.writeNode("source", s); // writer.writeNode("target", t); writer.run(); } catch (DataFormatError& error) { std::cerr << error.what() << std::endl; } return 0; }