# 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 { |
2383 | 2383 | PlanarEmbedding<Graph> pe(_graph); |
2384 | 2384 | if (!pe.run()) return false; |
2385 | 2385 | |
2386 | | run(pe); |
| 2386 | run(pe.embeddingMap()); |
2387 | 2387 | return true; |
2388 | 2388 | } |
2389 | 2389 | |
diff --git a/test/planarity_test.cc b/test/planarity_test.cc
a
|
b
|
int main() { |
245 | 245 | if (planar) { |
246 | 246 | checkEmbedding(graph, pe); |
247 | 247 | |
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 | } |
251 | 259 | |
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 | } |
255 | 271 | |
256 | 272 | } else { |
257 | 273 | checkKuratowski(graph, pe); |