org.hermit.geometry.generator
Class RandomGenerator

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

public class RandomGenerator
extends java.lang.Object
implements Generator

A data generator which generates evenly-distributed random points.


Constructor Summary
RandomGenerator()
           
 
Method Summary
 Point[] createPoints(Region region, int num)
          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

RandomGenerator

public RandomGenerator()
Method Detail

createPoints

public Point[] createPoints(Region region,
                            int num)
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.
num - 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.