Class StandardKMeans_MT<P>

java.lang.Object
org.ddogleg.clustering.kmeans.StandardKMeans<P>
org.ddogleg.clustering.kmeans.StandardKMeans_MT<P>
All Implemented Interfaces:
ComputeClusters<P>

public class StandardKMeans_MT<P>
extends StandardKMeans<P>

Concurrent implementation of StandardKMeans

  • Constructor Details

  • Method Details

    • matchPointsToClusters

      protected void matchPointsToClusters​(LArrayAccessor<P> points, DogArray<P> clusters)
      Finds the cluster which is the closest to each point. The point is the added to the sum for the cluster and its member count incremented
      Overrides:
      matchPointsToClusters in class StandardKMeans<P>
    • findBestMatch

      protected int findBestMatch​(P p, DogArray<P> clusters, org.ddogleg.clustering.kmeans.StandardKMeans_MT.MatchData match)
      Searches for this cluster which is the closest to p
    • newInstanceThread

      public ComputeClusters<P> newInstanceThread()
      Description copied from interface: ComputeClusters
      Creates a new instance which has the same configuration and can be run in parallel. Some components can be shared as long as they are read only and thread safe.
      Specified by:
      newInstanceThread in interface ComputeClusters<P>
      Overrides:
      newInstanceThread in class StandardKMeans<P>