COIN-OR::LEMON - Graph Library

Changeset 1400:6b79d93e812f in lemon for lemon/planarity.h


Ignore:
Timestamp:
10/17/18 17:52:11 (20 months ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Planar drawing algorithm now works for less than 3 nodes (#611)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/planarity.h

    r1399 r1400  
    23982398    void run(const EmbeddingMap& embedding) {
    23992399      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      }
    24002409
    24012410      if (3 * countNodes(_graph) - 6 == countEdges(_graph)) {
Note: See TracChangeset for help on using the changeset viewer.