renatav / GraphDrawing

Graph Analysis and Drawing Library - Grad
MIT License
41 stars 7 forks source link

BoyerMyrvoldPlanarity fails with NullPointerException #12

Closed nlskrg closed 8 years ago

nlskrg commented 8 years ago

For some graphs the implementation of the algorithm by Boyer and Myrvold fails with the following exception:

Exception in thread "main" java.lang.NullPointerException at graph.algorithms.planarity.BoyerMyrvoldPlanarity.walkdown(BoyerMyrvoldPlanarity.java:452) at graph.algorithms.planarity.BoyerMyrvoldPlanarity.processVertex(BoyerMyrvoldPlanarity.java:221) at graph.algorithms.planarity.BoyerMyrvoldPlanarity.isPlannar(BoyerMyrvoldPlanarity.java:153)

A test case to reproduce the error is attached:

BoyerMyrvoldPlanarityTest.java.zip

renatav commented 8 years ago

Fixed, the test now has successful outcome.