fixed a bug of the Ptr typdef in search::KdTree

Hi, please take a look.