[mlpack-git] [mlpack/mlpack] Vantage point tree (#708)

lozhnikov notifications at github.com
Fri Jul 22 03:51:20 EDT 2016


> +template<typename BoundType, typename MatType>
> +void VantagePointSplit<BoundType, MatType>::
> +SelectVantagePoint(const BoundType& bound, const MatType& data,
> +    const size_t begin, const size_t count, size_t& vantagePoint, ElemType& mu)
> +{
> +  arma::uvec vantagePointCandidates;
> +
> +  // Get no more than max(maxNumSamples, count) vantage point candidates
> +  GetDistinctSamples(vantagePointCandidates, maxNumSamples, begin, count);
> +
> +  ElemType bestSpread = 0;
> +
> +  //  Evaluate eache candidate
> +  for (size_t i = 0; i < vantagePointCandidates.n_rows; i++)
> +  {
> +    arma::uvec samples;

I guess it is better to define all vectors as private members of the class. It is possible since we use an instantiated object. But we have to make all methods non-static. How do you think?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/708/files/300882ac96e7a663e3e303ca0c45c14c6fafe1a6#r71839506
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160722/9c8d8cfc/attachment-0001.html>


More information about the mlpack-git mailing list