Change the centroids type to MatType instead of Mat<double>
Signed-off-by: Omar Shrit <omar@avontech.fr>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user