Module ojalgo

Class PointDistanceCache


  • final class PointDistanceCache
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) Point centroid​(java.util.Collection<Point> cluster)
      Pick the centroid for this cluster (one of its current members)
      private double distance​(int i, int j)  
      (package private) double distance​(Point point1, Point point2)
      Get the distance between these two points.
      (package private) double getThreshold()
      The distance threshold used in initialiser(Collection) to determine when the greedy clustering algorithm should not place a point in any of the existing clusters, but rather create a new cluster.
      (package private) java.util.List<Point> initialiser​(java.util.Collection<Point> input)
      Generate an initial set of centroids
      (package private) void setup​(java.util.Collection<Point> input, DistanceMeasure measure)
      Set up the cache (configure this instance)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • myDistances

        private double[][] myDistances
      • mySampleSet

        private final SampleSet mySampleSet
      • myValues

        private final NumberList<java.lang.Double> myValues
    • Constructor Detail

      • PointDistanceCache

        PointDistanceCache()
    • Method Detail

      • distance

        private double distance​(int i,
                                int j)
      • centroid

        Point centroid​(java.util.Collection<Point> cluster)
        Pick the centroid for this cluster (one of its current members)
      • distance

        double distance​(Point point1,
                        Point point2)
        Get the distance between these two points.
      • getThreshold

        double getThreshold()
        The distance threshold used in initialiser(Collection) to determine when the greedy clustering algorithm should not place a point in any of the existing clusters, but rather create a new cluster.
      • initialiser

        java.util.List<Point> initialiser​(java.util.Collection<Point> input)
        Generate an initial set of centroids
      • setup

        void setup​(java.util.Collection<Point> input,
                   DistanceMeasure measure)
        Set up the cache (configure this instance)