#include <KMeans.h>
◆ ComputeClusters()
Compute the K-Means clustering of FVector points
- Parameters
-
| 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 |
| bRunParallel | Runs a parallel algorithm (faster) if possible. The output might be non-deterministic when running in parallel |
- Returns
- number of clusters found
◆ GetClusters()
◆ GetUniformSpacedInitialCenters()
Helper function to generate (approximately) uniform-spaced initial clusters centers, which can be passed to ComputeClusters.
◆ ClusterIDs
◆ ClusterSizes
| TArray<std::atomic<int32> > UE::Geometry::FClusterKMeans::ClusterSizes |
◆ MaxIterations
| int32 UE::Geometry::FClusterKMeans::MaxIterations = 500 |
◆ RandomSeed
| int32 UE::Geometry::FClusterKMeans::RandomSeed = 0 |
The documentation for this struct was generated from the following files:
- Engine/Source/Runtime/GeometryCore/Public/Clustering/KMeans.h
- Engine/Source/Runtime/GeometryCore/Private/Clustering/KMeans.cpp