lemon/planarity.h
changeset 1175 6b79d93e812f
parent 1174 1e5da3fc4fbc
equal deleted inserted replaced
6:1ee02b0760ab 7:d96436baf209
  2395     /// embedding, i.e. a valid cyclic order of the arcs.
  2395     /// embedding, i.e. a valid cyclic order of the arcs.
  2396     /// It can be computed using PlanarEmbedding.
  2396     /// It can be computed using PlanarEmbedding.
  2397     template <typename EmbeddingMap>
  2397     template <typename EmbeddingMap>
  2398     void run(const EmbeddingMap& embedding) {
  2398     void run(const EmbeddingMap& embedding) {
  2399       typedef SmartEdgeSet<Graph> AuxGraph;
  2399       typedef SmartEdgeSet<Graph> AuxGraph;
       
  2400 
       
  2401       if (countNodes(_graph) < 3) {
       
  2402         int y = 0;
       
  2403         for (typename Graph::NodeIt n(_graph); n != INVALID; ++n) {
       
  2404           _point_map[n].x = 0;
       
  2405           _point_map[n].y = y++;
       
  2406         }
       
  2407         return;
       
  2408       }
  2400 
  2409 
  2401       if (3 * countNodes(_graph) - 6 == countEdges(_graph)) {
  2410       if (3 * countNodes(_graph) - 6 == countEdges(_graph)) {
  2402         drawing(_graph, embedding, _point_map);
  2411         drawing(_graph, embedding, _point_map);
  2403         return;
  2412         return;
  2404       }
  2413       }