Fix PlanarDrawing::run() function (#610)
authorBalazs Dezso <deba@google.com>
Tue, 15 May 2018 14:16:35 +0200
changeset 11741e5da3fc4fbc
parent 1173 389416f8a995
child 1175 6b79d93e812f
Fix PlanarDrawing::run() function (#610)
lemon/planarity.h
test/planarity_test.cc
     1.1 --- a/lemon/planarity.h	Wed Oct 17 17:24:14 2018 +0200
     1.2 +++ b/lemon/planarity.h	Tue May 15 14:16:35 2018 +0200
     1.3 @@ -2383,7 +2383,7 @@
     1.4        PlanarEmbedding<Graph> pe(_graph);
     1.5        if (!pe.run()) return false;
     1.6  
     1.7 -      run(pe);
     1.8 +      run(pe.embeddingMap());
     1.9        return true;
    1.10      }
    1.11  
     2.1 --- a/test/planarity_test.cc	Wed Oct 17 17:24:14 2018 +0200
     2.2 +++ b/test/planarity_test.cc	Tue May 15 14:16:35 2018 +0200
     2.3 @@ -245,13 +245,29 @@
     2.4      if (planar) {
     2.5        checkEmbedding(graph, pe);
     2.6  
     2.7 -      PlanarDrawing<Graph> pd(graph);
     2.8 -      pd.run(pe.embeddingMap());
     2.9 -      checkDrawing(graph, pd);
    2.10 +      {
    2.11 +        PlanarDrawing<Graph> pd(graph);
    2.12 +        pd.run(pe.embeddingMap());
    2.13 +        checkDrawing(graph, pd);
    2.14 +      }
    2.15  
    2.16 -      PlanarColoring<Graph> pc(graph);
    2.17 -      pc.runFiveColoring(pe.embeddingMap());
    2.18 -      checkColoring(graph, pc, 5);
    2.19 +      {
    2.20 +        PlanarDrawing<Graph> pd(graph);
    2.21 +        pd.run();
    2.22 +        checkDrawing(graph, pd);
    2.23 +      }
    2.24 +
    2.25 +      {
    2.26 +        PlanarColoring<Graph> pc(graph);
    2.27 +        pc.runFiveColoring(pe.embeddingMap());
    2.28 +        checkColoring(graph, pc, 5);
    2.29 +      }
    2.30 +
    2.31 +      {
    2.32 +        PlanarColoring<Graph> pc(graph);
    2.33 +        pc.runFiveColoring();
    2.34 +        checkColoring(graph, pc, 5);
    2.35 +      }
    2.36  
    2.37      } else {
    2.38        checkKuratowski(graph, pe);