Accounting for boundary effects in nearest neighbor searching | Synapse