[mlpack-git] [mlpack/mlpack] Spill trees (#747)

Ryan Curtin notifications at github.com
Fri Aug 5 12:06:24 EDT 2016


> +    left(NULL),
> +    right(NULL),
> +    parent(NULL),
> +    count(0),
> +    pointsIndex(NULL),
> +    overlappingNode(false),
> +    hyperplane(),
> +    bound(data.n_rows),
> +    parentDistance(0), // Parent distance for the root is 0: it has no parent.
> +    dataset(&data),
> +    localDataset(false)
> +{
> +  std::vector<size_t> points;
> +  points.reserve(dataset->n_cols);
> +  for (size_t i = 0; i < dataset->n_cols; i++)
> +    points.push_back(i);

I think that it is better to try and use Armadillo objects here.  In general I have found they are faster (even if you are reserving space for the vector).

---
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/747/files/a71b57caa90311f5542180bc0553449c3691395d#r73717640
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160805/b5b72f3c/attachment.html>


More information about the mlpack-git mailing list