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