Change the centroids type to MatType instead of Mat<double>

Signed-off-by: Omar Shrit <omar@avontech.fr>
This commit is contained in:
Omar Shrit
2023-12-03 16:16:13 +01:00
parent 65abfb5c60
commit 7ec132ca5e
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ class DBSCAN
*/
template<typename MatType>
size_t Cluster(const MatType& data,
arma::mat& centroids);
MatType& centroids);
/**
* Performs DBSCAN clustering on the data, returning number of clusters
@@ -108,7 +108,7 @@ class DBSCAN
template<typename MatType>
size_t Cluster(const MatType& data,
arma::Row<size_t>& assignments,
arma::mat& centroids);
MatType& centroids);
private:
//! Maximum distance between two points to be part of same cluster.
+2 -2
View File
@@ -43,7 +43,7 @@ template<typename RangeSearchType, typename PointSelectionPolicy>
template<typename MatType>
size_t DBSCAN<RangeSearchType, PointSelectionPolicy>::Cluster(
const MatType& data,
arma::mat& centroids)
MatType& centroids)
{
// These assignments will be thrown away, but there is no way to avoid
// calculating them.
@@ -62,7 +62,7 @@ template<typename MatType>
size_t DBSCAN<RangeSearchType, PointSelectionPolicy>::Cluster(
const MatType& data,
arma::Row<size_t>& assignments,
arma::mat& centroids)
MatType& centroids)
{
const size_t numClusters = Cluster(data, assignments);