[mlpack] 250/324: Explicit cast to arma::vec for old versions of Armadillo.
Barak A. Pearlmutter
barak+git at cs.nuim.ie
Sun Aug 17 08:22:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch svn-trunk
in repository mlpack.
commit 21af7cc038c70eecf82e845a87cdbd699577ce42
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date: Wed Jul 30 18:50:20 2014 +0000
Explicit cast to arma::vec for old versions of Armadillo.
git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16929 9d5b8971-822b-0410-80eb-d18c1038ef23
---
src/mlpack/methods/kmeans/max_variance_new_cluster_impl.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
@@ -38,7 +38,7 @@ size_t MaxVarianceNewCluster::EmptyCluster(const MatType& data,
size_t closestCluster = centroids.n_cols; // Invalid value.
for (size_t j = 0; j < centroids.n_cols; j++)
- {
+ {
const double distance = metric.Evaluate(data.col(i), centroids.col(j));
if (distance < minDistance)
@@ -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));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list