Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Clustering
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Clustering/KMeans.h |
| Include | #include "Clustering/KMeans.h" |
Syntax
struct FClusterKMeans
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< int32 > | ClusterIDs | Outputs. | |
| TArray< int32 > | ClusterSizes | Number of points in each cluster. | |
| int32 | MaxIterations | Parameters. | |
| int32 | RandomSeed | Random Seed used to initialize clustering (if InitialCenters are not provided) |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | ComputeClusters
(
TArrayView< const TVectorType > PointsToCluster, |
Compute the K-Means clustering of FVector points | |
| void | GetClusters
(
TArray< TArray< int32 > >& OutClusters |
||
| void | GetUniformSpacedInitialCenters
(
TArrayView< const TVectorType > PointsToCluster, |
Helper function to generate (approximately) uniform-spaced initial clusters centers, which can be passed to ComputeClusters. |