test/planarity_test.cc
changeset 990 dca9eed2c375
parent 861 30cb42e3e43a
child 1399 1e5da3fc4fbc
equal deleted inserted replaced
0:e436255c215f 1:d3e7eeba0e60
   237     graphReader(graph, lgfs).run();
   237     graphReader(graph, lgfs).run();
   238 
   238 
   239     check(simpleGraph(graph), "Test graphs must be simple");
   239     check(simpleGraph(graph), "Test graphs must be simple");
   240 
   240 
   241     PE pe(graph);
   241     PE pe(graph);
   242     if (pe.run()) {
   242     bool planar = pe.run();
       
   243     check(checkPlanarity(graph) == planar, "Planarity checking failed");
       
   244 
       
   245     if (planar) {
   243       checkEmbedding(graph, pe);
   246       checkEmbedding(graph, pe);
   244 
   247 
   245       PlanarDrawing<Graph> pd(graph);
   248       PlanarDrawing<Graph> pd(graph);
   246       pd.run(pe.embedding());
   249       pd.run(pe.embeddingMap());
   247       checkDrawing(graph, pd);
   250       checkDrawing(graph, pd);
   248 
   251 
   249       PlanarColoring<Graph> pc(graph);
   252       PlanarColoring<Graph> pc(graph);
   250       pc.runFiveColoring(pe.embedding());
   253       pc.runFiveColoring(pe.embeddingMap());
   251       checkColoring(graph, pc, 5);
   254       checkColoring(graph, pc, 5);
   252 
   255 
   253     } else {
   256     } else {
   254       checkKuratowski(graph, pe);
   257       checkKuratowski(graph, pe);
   255     }
   258     }