org.hermit.geometry.generator
Class NuclearGenerator

java.lang.Object
  extended by org.hermit.geometry.generator.NuclearGenerator
All Implemented Interfaces:
Generator

public class NuclearGenerator
extends java.lang.Object
implements Generator

A data generator which generates clustered random points.


Constructor Summary
NuclearGenerator(int nclusters)
          Create a clustering data generator.
 
Method Summary
 Point[] createPoints(Region region, int npoints)
          Create a set of data points within the given region.
 Point[] getReferencePoints()
          Get reference points, if any, associated with the most recently generated data set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NuclearGenerator

public NuclearGenerator(int nclusters)
Create a clustering data generator.

Parameters:
nclusters - The desired number of clusters in each generated data set.
Method Detail

createPoints

public Point[] createPoints(Region region,
                            int npoints)
Create a set of data points within the given region.

Specified by:
createPoints in interface Generator
Parameters:
region - The region of the plane in which the points must lie.
npoints - The desired number of points.
Returns:
The generated data points.

getReferencePoints

public Point[] getReferencePoints()
Get reference points, if any, associated with the most recently generated data set.

Specified by:
getReferencePoints in interface Generator
Returns:
The reference points, if any, used to generate the most recent data set. null if none.