doc/graph_io.dox
changeset 1839 b2dfd32b4895
parent 1788 614ce2dd3cba
child 1842 8abf74160dc4
equal deleted inserted replaced
10:6afb17a1701f 11:111dcc335506
   440 undirected graph and in a directed \c NewEdgeSetAdaptor class. The example
   440 undirected graph and in a directed \c NewEdgeSetAdaptor class. The example
   441 shows the input with the \ref lemon::LemonReader "LemonReader" class:
   441 shows the input with the \ref lemon::LemonReader "LemonReader" class:
   442 
   442 
   443 \code
   443 \code
   444 UndirListGraph network;
   444 UndirListGraph network;
   445 UndirListGraph::UndirEdgeSet<double> capacity;
   445 UndirListGraph::UndirEdgeMap<double> capacity;
   446 NewEdgeSetAdaptor<UndirListGraph> traffic(network);
   446 NewEdgeSetAdaptor<UndirListGraph> traffic(network);
   447 NewEdgeSetAdaptor<UndirListGraph>::EdgeSet<double> request(network);
   447 NewEdgeSetAdaptor<UndirListGraph>::EdgeSet<double> request(network);
   448 
   448 
   449 LemonReader reader(std::cin);
   449 LemonReader reader(std::cin);
   450 NodeSetReader nodesetReader(reader, network);
   450 NodeSetReader<UndirListGraph> nodesetReader(reader, network);
   451 UndirEdgeSetReader undirEdgesetReader(reader, network, nodesetReader);
   451 UndirEdgeSetReader<UndirListGraph> 
       
   452   undirEdgesetReader(reader, network, nodesetReader);
   452 undirEdgesetReader.readEdgeMap("capacity", capacity);
   453 undirEdgesetReader.readEdgeMap("capacity", capacity);
   453 EdgeSetReader edgesetReader(reader, traffic, nodesetReader);
   454 EdgeSetReader<NewEdgeSetAdaptor<UndirListGraph> > 
       
   455   edgesetReader(reader, traffic, nodesetReader);
   454 edgesetReader.readEdgeMap("request", request);
   456 edgesetReader.readEdgeMap("request", request);
   455 
   457 
   456 reader.run();
   458 reader.run();
   457 \endcode
   459 \endcode
   458 
   460