[mlpack-git] master: Fixing vector classes to comply with method calls. (2cc9525)
gitdub at mlpack.org
gitdub at mlpack.org
Wed Jul 20 09:06:23 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/f21439c2b65c273a541d3052cdd790464045b737...59bc0b32630a3ad786706993f4d5e8b087f1c702
>---------------------------------------------------------------
commit 2cc95254a18928e6a41e8f42613a79e8e25ddd63
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.
>---------------------------------------------------------------
2cc95254a18928e6a41e8f42613a79e8e25ddd63
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
More information about the mlpack-git
mailing list