lemon/lemon_reader.h
changeset 1634 910b1bcb7d05
parent 1494 ae55ba000ebb
child 1705 3f63d9db307b
equal deleted inserted replaced
4:588cf105e78a 5:116adb6cea5e
  1320     void readId(std::istream& is, Edge& edge) const {
  1320     void readId(std::istream& is, Edge& edge) const {
  1321       char c;
  1321       char c;
  1322       is >> c;
  1322       is >> c;
  1323       UndirEdge undirEdge = inverter->read(is);
  1323       UndirEdge undirEdge = inverter->read(is);
  1324       if (c == '+') {
  1324       if (c == '+') {
  1325 	edge = graph.edgeWithSource(undirEdge, graph.source(undirEdge));
  1325 	edge = graph.direct(undirEdge, true);
  1326       } else if (c == '-') {
  1326       } else if (c == '-') {
  1327         edge = graph.edgeWithSource(undirEdge, graph.target(undirEdge));
  1327         edge = graph.direct(undirEdge, false);
  1328       } else {
  1328       } else {
  1329 	throw DataFormatError("Wrong id format for edge "
  1329 	throw DataFormatError("Wrong id format for edge "
  1330 			      "in undirected edgeset");
  1330 			      "in undirected edgeset");
  1331       }
  1331       }
  1332     } 
  1332     }