Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Clustering > API/Runtime/GeometryCore/Clustering/FClusterKMeans
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Clustering/KMeans.h |
| Include | #include "Clustering/KMeans.h" |
template<typename TVectorType>
int32 ComputeClusters
(
TArrayView < const TVectorType > PointsToCluster,
int32 NumClusters,
TArrayView < const TVectorType > InitialCenters,
TArray < TVectorType > * OutClusterCenters
)
Remarks
Compute the K-Means clustering of FVector points number of clusters found
Parameters
| Name | Description |
|---|---|
| PointsToCluster | Points to partition into clusters |
| NumClusters | Target number of clusters to create, if InitialCenters is not provided |
| InitialCenters | If non-empty, these positions will be used to initialize the cluster locations |
| OutClusterCenters | If non-null, will be filled with the cluster centers |