pysal/pysal — pull request #296 by jlaura (2013-07-24 03:25:18+00:00)
Title: wed fix

Really simple fix. Check at least 2 nodes. The current failure occurs because the node checked has incidence 2 and is a member of the set of nodes that bounds a region. By checking at least one other node in the filament we know that it is either internal to the region or external to the region. The minimum size of a filament will be 2, so we know that the check will never fail due to an insufficient number of nodes in the filament.

I *think* that this should be less expensive than either of our original solutions. Mine requires an additional if check before we set the pointers. Serge's requires a call to enumerate the links around the node.