64 using Point = std::vector<float>;
109 if (num_points_ != data.size())
110 std::cout <<
"Data vector not the same" << std::endl;
119 std::cout <<
"Dimensions not the same" << std::endl;
138 auto cpy = y.cbegin();
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
ClustersToPoints clusters_to_points_
unsigned int num_clusters_
The number of clusters.
void setInputData(std::vector< Point > &data)
unsigned int num_dimensions_
Centroids get_centroids()
std::vector< float > Point
void initialClusterPoints()
void addDataPoint(Point &data_point)
void setClusterSize(unsigned int k)
This method sets the k-means cluster size.
std::vector< ClusterId > PointsToClusters
std::vector< Point > Centroids
PointsToClusters points_to_clusters_
std::vector< SetPoints > ClustersToPoints
float distance(const Point &x, const Point &y)
std::set< PointId > SetPoints
std::vector< Point > data_
The cluster centroids.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
Defines all the PCL and non-PCL macros used.