[mlpack] 26/35: Fixing vector classes to comply with method calls.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Thu Sep 15 23:29:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit fc4195d27bb9e642356a384d1fa6fe10cbdf89a6
Author: Seb Bro <sbrodehl at students.uni-mainz.de>
Date: Wed Jul 20 15:06:23 2016 +0200
Fixing vector classes to comply with method calls.
Changed vector classes of 'assignments' to comply with the corresponding method calls.
Fixes compile errors for those samples.
---
doc/tutorials/kmeans/kmeans.txt | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/tutorials/kmeans/kmeans.txt b/doc/tutorials/kmeans/kmeans.txt
index c9f7e80..8d5efc5 100644
--- a/doc/tutorials/kmeans/kmeans.txt
+++ b/doc/tutorials/kmeans/kmeans.txt
@@ -245,7 +245,7 @@ extern arma::mat data;
extern size_t clusters;
// The assignments will be stored in this vector.
-arma::Col<size_t> assignments;
+arma::Row<size_t> assignments;
// Initialize with the default arguments.
KMeans<> k;
@@ -271,7 +271,7 @@ extern arma::mat data;
extern size_t clusters;
// The assignments will be stored in this vector.
-arma::Col<size_t> assignments;
+arma::Row<size_t> assignments;
// The centroids will be stored in this matrix.
arma::mat centroids;
@@ -320,7 +320,7 @@ extern arma::mat dataset;
extern size_t clusters;
// A vector pre-filled with initial assignment guesses.
-extern arma::Col<size_t> assignments;
+extern arma::Row<size_t> assignments;
KMeans<> k;
@@ -340,7 +340,7 @@ extern arma::mat dataset;
extern size_t clusters;
// A vector pre-filled with initial assignment guesses.
-extern arma::Col<size_t> assignments;
+extern arma::Row<size_t> assignments;
// This will hold the centroids of the finished clusters.
arma::mat centroids;
@@ -394,7 +394,7 @@ extern size_t clusters;
extern arma::mat centroids;
// This will be filled with the final cluster assignments for each point.
-arma::Col<size_t> assignments;
+arma::Row<size_t> assignments;
KMeans<> k;
@@ -433,7 +433,7 @@ extern arma::sp_mat sparseDataset;
extern size_t clusters;
// The assignments will be stored in this vector.
-arma::Col<size_t> assignments;
+arma::Row<size_t> assignments;
// The centroids of each cluster will be stored in this sparse matrix.
arma::sp_mat sparseCentroids;
@@ -550,7 +550,7 @@ void Cluster(MatType& data,
template<typename MatType>
void Cluster(MatType& data,
const size_t clusters,
- arma::Col<size_t> assignments);
+ arma::Row<size_t> assignments);
@endcode
The templatization of the \c Cluster() function allows both dense and sparse
@@ -563,7 +563,7 @@ and the wrong type of matrix, you will get many ugly compilation errors!
// The Cluster() function specialized for dense matrices.
void Cluster(arma::mat& data,
const size_t clusters,
- arma::Col<size_t> assignments);
+ arma::Row<size_t> assignments);
@endcode
Note that only one of the two possible \c Cluster() functions are required.
@@ -613,7 +613,7 @@ size_t EmptyCluster(const MatType& data,
const size_t emptyCluster,
const MatType& centroids,
arma::Col<size_t>& clusterCounts,
- arma::Col<size_t>& assignments);
+ arma::Row<size_t>& assignments);
@endcode
The \c EmptyCluster() function is called for each cluster that is empty at each
--
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