24 #ifndef MLPACK_METHODS_APPROX_KFN_QDAFN_HPP 25 #define MLPACK_METHODS_APPROX_KFN_QDAFN_HPP 33 template<
typename MatType = arma::mat>
44 QDAFN(
const size_t l,
const size_t m);
54 QDAFN(
const MatType& referenceSet,
67 void Train(
const MatType& referenceSet,
77 void Search(
const MatType& querySet,
79 arma::Mat<size_t>& neighbors,
80 arma::mat& distances);
83 template<
typename Archive>
84 void serialize(Archive& ar,
const uint32_t );
90 const MatType&
CandidateSet(
const size_t t)
const {
return candidateSet[t]; }
102 arma::mat projections;
105 arma::Mat<size_t> sIndices;
110 std::vector<MatType> candidateSet;
117 #include "qdafn_impl.hpp" size_t NumProjections() const
Get the number of projections.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Search(const MatType &querySet, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances)
Search for the k furthest neighbors of the given query set.
void serialize(Archive &ar, const uint32_t)
Serialize the model.
void Train(const MatType &referenceSet, const size_t l=0, const size_t m=0)
Train the QDAFN model on the given reference set, optionally setting new parameters for the number of...
const MatType & CandidateSet(const size_t t) const
Get the candidate set for the given projection table.
QDAFN(const size_t l, const size_t m)
Construct the QDAFN object but do not train it.
MatType & CandidateSet(const size_t t)
Modify the candidate set for the given projection table. Careful!