hldepth function

Calculates the halfspace location depth