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 } |