COIN-OR::LEMON - Graph Library

Ticket #610: fix_610.patch

File fix_610.patch, 1.6 KB (added by Balazs Dezso, 7 years ago)
  • lemon/planarity.h

    # HG changeset patch
    # User Balazs Dezso <deba@google.com>
    # Date 1526386595 -7200
    #      Tue May 15 14:16:35 2018 +0200
    # Node ID 6164498f5f633390c3bf5486b81bf4a52f72283a
    # Parent  57167d92e96c6c52005817dbd523ae36805a60eb
    Fix PlanarDrawing::run() function
    
    BUG: https://lemon.cs.elte.hu/trac/lemon/ticket/610#ticket
    
    diff --git a/lemon/planarity.h b/lemon/planarity.h
    a b namespace lemon { 
    23832383      PlanarEmbedding<Graph> pe(_graph);
    23842384      if (!pe.run()) return false;
    23852385
    2386       run(pe);
     2386      run(pe.embeddingMap());
    23872387      return true;
    23882388    }
    23892389
  • test/planarity_test.cc

    diff --git a/test/planarity_test.cc b/test/planarity_test.cc
    a b int main() { 
    245245    if (planar) {
    246246      checkEmbedding(graph, pe);
    247247
    248       PlanarDrawing<Graph> pd(graph);
    249       pd.run(pe.embeddingMap());
    250       checkDrawing(graph, pd);
     248      {
     249        PlanarDrawing<Graph> pd(graph);
     250        pd.run(pe.embeddingMap());
     251        checkDrawing(graph, pd);
     252      }
     253
     254      {
     255        PlanarDrawing<Graph> pd(graph);
     256        pd.run();
     257        checkDrawing(graph, pd);
     258      }
    251259
    252       PlanarColoring<Graph> pc(graph);
    253       pc.runFiveColoring(pe.embeddingMap());
    254       checkColoring(graph, pc, 5);
     260      {
     261        PlanarColoring<Graph> pc(graph);
     262        pc.runFiveColoring(pe.embeddingMap());
     263        checkColoring(graph, pc, 5);
     264      }
     265
     266      {
     267        PlanarColoring<Graph> pc(graph);
     268        pc.runFiveColoring();
     269        checkColoring(graph, pc, 5);
     270      }
    255271
    256272    } else {
    257273      checkKuratowski(graph, pe);