[mlpack-git] mlpack-2.0.x: Fixing vector classes to comply with method calls. (fc4195d)
gitdub at mlpack.org
gitdub at mlpack.org
Wed Jul 20 15:46:25 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : mlpack-2.0.x
Link : https://github.com/mlpack/mlpack/compare/e434bc4ac042534529a2a440a44d86935b4d7164...fc4195d27bb9e642356a384d1fa6fe10cbdf89a6
>---------------------------------------------------------------
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.
>---------------------------------------------------------------
fc4195d27bb9e642356a384d1fa6fe10cbdf89a6
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