de.lmu.ifi.dbs.elki.data.synthetic.bymodel
Class GeneratorStatic

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.data.synthetic.bymodel.GeneratorStatic
All Implemented Interfaces:
GeneratorInterface

public class GeneratorStatic
extends Object
implements GeneratorInterface

Class for static clusters, that is an implementation of GeneratorInterface that will return only a given set of points.


Field Summary
 String name
          Cluster name
 LinkedList<Vector> points
          Cluster points
 
Constructor Summary
GeneratorStatic(String name, LinkedList<Vector> points)
          Construct generator using given name and points
 
Method Summary
 List<Vector> generate(int count)
          "Generate" new cluster points.
 double getDensity(Vector p)
          Get density at a given coordinate.
 int getDim()
          Get cluster dimensionality
 int getDiscarded()
          Get number of discarded points
 String getName()
          Get cluster name
 List<Vector> getPoints()
          Get cluster points
 int getSize()
          Get cluster size
 void setDiscarded(int discarded)
          Notify cluster of discarded points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name
Cluster name


points

public LinkedList<Vector> points
Cluster points

Constructor Detail

GeneratorStatic

public GeneratorStatic(String name,
                       LinkedList<Vector> points)
Construct generator using given name and points

Parameters:
name - Cluster name
points - Cluster points
Method Detail

generate

public List<Vector> 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(Vector p)
Get density at a given coordinate.

Specified by:
getDensity in interface GeneratorInterface
Parameters:
p - vector
Returns:
density

getDim

public int getDim()
Get cluster dimensionality

Specified by:
getDim in interface GeneratorInterface
Returns:
dimensionality

getDiscarded

public int getDiscarded()
Get number of discarded points

Returns:
number of discarded points

getName

public String getName()
Get cluster name

Specified by:
getName in interface GeneratorInterface
Returns:
cluster name

getPoints

public List<Vector> getPoints()
Get cluster points

Specified by:
getPoints in interface GeneratorInterface
Returns:
points

getSize

public int getSize()
Get cluster size

Specified by:
getSize in interface GeneratorInterface
Returns:
cluster size

setDiscarded

public void setDiscarded(int discarded)
                  throws UnableToComplyException
Notify cluster of discarded points. Not supported for static generators.

Parameters:
discarded - parameter not supported.
Throws:
UnableToComplyException - always thrown, since the static generator doesn't supprot discards.

Release 0.4.0 (2011-09-20_1324)