[mlpack-git] master: Explicit cast to arma::vec for old versions of Armadillo. (b217294)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:55:32 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit b217294fd8166a978b71b64ba1f0c5e0de3a6815
Author: Ryan Curtin <ryan at ratml.org>
Date: Wed Jul 30 18:50:20 2014 +0000
Explicit cast to arma::vec for old versions of Armadillo.
>---------------------------------------------------------------
b217294fd8166a978b71b64ba1f0c5e0de3a6815
src/mlpack/methods/kmeans/max_variance_new_cluster_impl.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mlpack/methods/kmeans/max_variance_new_cluster_impl.hpp b/src/mlpack/methods/kmeans/max_variance_new_cluster_impl.hpp
index 6ba376b..339574e 100644
--- a/src/mlpack/methods/kmeans/max_variance_new_cluster_impl.hpp
+++ b/src/mlpack/methods/kmeans/max_variance_new_cluster_impl.hpp
@@ -87,7 +87,7 @@ size_t MaxVarianceNewCluster::EmptyCluster(const MatType& data,
centroids.col(maxVarCluster) *= (double(clusterCounts[maxVarCluster]) /
double(clusterCounts[maxVarCluster] - 1));
centroids.col(maxVarCluster) -= (1.0 / (clusterCounts[maxVarCluster] - 1.0)) *
- data.col(furthestPoint);
+ arma::vec(data.col(furthestPoint));
clusterCounts[maxVarCluster]--;
clusterCounts[emptyCluster]++;
centroids.col(emptyCluster) = arma::vec(data.col(furthestPoint));
More information about the mlpack-git
mailing list