method_mlpack function

An internal function to use the LSH and KD-tree algorithm via the mlpack package.