Package elki.data.synthetic.bymodel
Class GeneratorStatic
- java.lang.Object
-
- elki.data.synthetic.bymodel.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
-
-
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.doublegetDensity(double[] p)Get the density of the given vectorintgetDim()Get dimensionality of generated datajava.lang.StringgetName()Get cluster nameintgetSize()Get number of points to be generated by this generator.ModelmakeModel()Make a cluster model for this cluster.
-
-
-
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:
generatein interfaceGeneratorInterface- Parameters:
count- parameter is ignored.- Returns:
- List of generated points
-
getDensity
public double getDensity(double[] p)
Description copied from interface:GeneratorInterfaceGet the density of the given vector- Specified by:
getDensityin interfaceGeneratorInterface- Parameters:
p- vector- Returns:
- density
-
getDim
public int getDim()
Description copied from interface:GeneratorInterfaceGet dimensionality of generated data- Specified by:
getDimin interfaceGeneratorInterface- Returns:
- dimensionality
-
getName
public java.lang.String getName()
Description copied from interface:GeneratorInterfaceGet cluster name- Specified by:
getNamein interfaceGeneratorInterface- Returns:
- cluster name
-
getSize
public int getSize()
Description copied from interface:GeneratorInterfaceGet number of points to be generated by this generator.- Specified by:
getSizein interfaceGeneratorInterface- Returns:
- cluster size
-
makeModel
public Model makeModel()
Description copied from interface:GeneratorInterfaceMake a cluster model for this cluster.- Specified by:
makeModelin interfaceGeneratorInterface- Returns:
- Cluster model
-
computeMean
public double[] computeMean()
Description copied from interface:GeneratorInterfaceGet the cluster mean vector.- Specified by:
computeMeanin interfaceGeneratorInterface- Returns:
- Cluster mean, or
null.
-
-