org.encog.mathutil.randomize
Class ConsistentRandomizer

java.lang.Object
  extended by org.encog.mathutil.randomize.BasicRandomizer
      extended by org.encog.mathutil.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(double min, double max, int seed)
          Construct a range randomizer.
 
Method Summary
 void randomize(BasicNetwork network)
          Randomize the network.
 double randomize(double d)
          Generate a random number based on the range specified in the constructor.
 
Methods inherited from class org.encog.mathutil.randomize.BasicRandomizer
getRandom, nextDouble, nextDouble, randomize, randomize, randomize, randomize, randomize, randomize, setRandom, setSeed
 
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(double min,
                            double max,
                            int seed)
Construct a range randomizer.

Parameters:
min - The minimum random value.
max - The maximum random value.
seed - The seed 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.

randomize

public void randomize(BasicNetwork network)
Randomize the network.

Parameters:
network - The network to randomize.


Copyright © 2014. All Rights Reserved.