[mlpack] [mlpack/mlpack] using rvalue references to set a given reference tree in FastMKS and DualTreeBoruvka (#799)
Ryan Curtin
notifications at github.com
Tue Dec 27 11:52:04 EST 2016
rcurtin commented on this pull request.
> @@ -103,6 +103,56 @@ template<
template<typename TreeMetricType,
typename TreeStatType,
typename TreeMatType> class TreeType>
+DualTreeBoruvka<MetricType, MatType, TreeType>::DualTreeBoruvka(
+ Tree& tree,
+ const MetricType metric) :
+ tree(new Tree(tree)),
+ data(&this->tree->Dataset()),
+ ownTree(true),
+ naive(false),
+ connections(data.n_cols),
+ totalDist(0.0),
+ metric(metric)
The problem, I believe, is the line `data(&this->tree->Dataset())`. `this->tree->Dataset()` is already a reference, so there's no need to take the address of it.
--
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/799
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://knife.lugatgt.org/pipermail/mlpack/attachments/20161227/a254f5ff/attachment-0001.html>
More information about the mlpack
mailing list