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.double
getDensity(double[] p)
Get the density of the given vectorint
getDim()
Get dimensionality of generated datajava.lang.String
getName()
Get cluster nameint
getSize()
Get number of points to be generated by this generator.Model
makeModel()
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:
generate
in interfaceGeneratorInterface
- 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 interfaceGeneratorInterface
- Parameters:
p
- vector- Returns:
- density
-
getDim
public int getDim()
Description copied from interface:GeneratorInterface
Get dimensionality of generated data- Specified by:
getDim
in interfaceGeneratorInterface
- Returns:
- dimensionality
-
getName
public java.lang.String getName()
Description copied from interface:GeneratorInterface
Get cluster name- Specified by:
getName
in interfaceGeneratorInterface
- Returns:
- cluster name
-
getSize
public int getSize()
Description copied from interface:GeneratorInterface
Get number of points to be generated by this generator.- Specified by:
getSize
in interfaceGeneratorInterface
- Returns:
- cluster size
-
makeModel
public Model makeModel()
Description copied from interface:GeneratorInterface
Make a cluster model for this cluster.- Specified by:
makeModel
in interfaceGeneratorInterface
- Returns:
- Cluster model
-
computeMean
public double[] computeMean()
Description copied from interface:GeneratorInterface
Get the cluster mean vector.- Specified by:
computeMean
in interfaceGeneratorInterface
- Returns:
- Cluster mean, or
null
.
-
-