12 #ifndef MLPACK_METHODS_CF_LMETRIC_SEARCH_HPP 13 #define MLPACK_METHODS_CF_LMETRIC_SEARCH_HPP 52 LMetricSearch(
const arma::mat& referenceSet) : neighborSearch(referenceSet)
64 void Search(
const arma::mat& query,
const size_t k,
65 arma::Mat<size_t>& neighbors, arma::mat& similarities)
67 neighborSearch.
Search(query, k, neighbors, similarities);
71 similarities = 1.0 / (1.0 + similarities);
Nearest neighbor search with L_p distance.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Search(const arma::mat &query, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &similarities)
Given a set of query points, find the nearest k neighbors, and return similarites.
NearestNS NearestNeighborSort
LMetricSearch(const arma::mat &referenceSet)
void Search(const MatType &querySet, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances)
For each point in the query set, compute the nearest neighbors and store the output in the given matr...