bsp and kdd tree structures implemented in octave(matlab)