Functions for spatial point pattern analysis