The Encog Project

org.encog.util.randomize
Class ConsistentRandomizer

java.lang.Object
  extended by org.encog.util.randomize.BasicRandomizer
      extended by org.encog.util.randomize.ConsistentRandomizer
All Implemented Interfaces:
Randomizer

public class ConsistentRandomizer
extends BasicRandomizer

A randomizer that takes a seed and will always produce consistent results.


Constructor Summary
ConsistentRandomizer(double min, double max)
          Construct a range randomizer.
ConsistentRandomizer(int seed, double min, double max)
          Construct a range randomizer.
 
Method Summary
 double randomize(double d)
          Generate a random number based on the range specified in the constructor.
 
Methods inherited from class org.encog.util.randomize.BasicRandomizer
randomize, randomize, randomize, randomize, randomize, randomize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsistentRandomizer

public ConsistentRandomizer(double min,
                            double max)
Construct a range randomizer.

Parameters:
min - The minimum random value.
max - The maximum random value.

ConsistentRandomizer

public ConsistentRandomizer(int seed,
                            double min,
                            double max)
Construct a range randomizer.

Parameters:
seed - The seed for the random number generator.
min - The minimum random value.
max - The maximum random value.
Method Detail

randomize

public double randomize(double d)
Generate a random number based on the range specified in the constructor.

Parameters:
d - The range randomizer ignores this value.
Returns:
The random number.

The Encog Project