Class GeneratorStatic

  • All Implemented Interfaces:
    GeneratorInterface

    public class GeneratorStatic
    extends java.lang.Object
    implements GeneratorInterface
    Class for static clusters, that is an implementation of GeneratorInterface that will return only a given set of points.
    Since:
    0.2
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String name
      Cluster name
      java.util.List<double[]> points
      Cluster points
    • Constructor Summary

      Constructors 
      Constructor Description
      GeneratorStatic​(java.lang.String name, java.util.List<double[]> points)
      Construct generator using given name and points
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double[] computeMean()
      Get the cluster mean vector.
      java.util.List<double[]> generate​(int count)
      "Generate" new cluster points.
      double getDensity​(double[] p)
      Get the density of the given vector
      int getDim()
      Get dimensionality of generated data
      java.lang.String getName()
      Get cluster name
      int getSize()
      Get number of points to be generated by this generator.
      Model makeModel()
      Make a cluster model for this cluster.
      • Methods inherited from class java.lang.Object

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

      • name

        public java.lang.String name
        Cluster name
      • points

        public java.util.List<double[]> points
        Cluster points
    • Constructor Detail

      • GeneratorStatic

        public GeneratorStatic​(java.lang.String name,
                               java.util.List<double[]> points)
        Construct generator using given name and points
        Parameters:
        name - Cluster name
        points - Cluster points
    • Method Detail

      • generate

        public java.util.List<double[]> generate​(int count)
        "Generate" new cluster points. Static generators always return their predefined set of points.
        Specified by:
        generate in interface GeneratorInterface
        Parameters:
        count - parameter is ignored.
        Returns:
        List of generated points
      • getDensity

        public double getDensity​(double[] p)
        Description copied from interface: GeneratorInterface
        Get the density of the given vector
        Specified by:
        getDensity in interface GeneratorInterface
        Parameters:
        p - vector
        Returns:
        density
      • getSize

        public int getSize()
        Description copied from interface: GeneratorInterface
        Get number of points to be generated by this generator.
        Specified by:
        getSize in interface GeneratorInterface
        Returns:
        cluster size