Linear-time graphical tests

Addresses #706 by adding the linear-time graphicality tests.