|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.mathutil.randomize.BasicRandomizer
public abstract class BasicRandomizer
Provides basic functionality that most randomizers will need.
Constructor Summary | |
---|---|
BasicRandomizer()
Construct a random number generator with a random(current time) seed. |
Method Summary | |
---|---|
Random |
getRandom()
|
double |
nextDouble()
|
double |
nextDouble(double min,
double max)
Generate a random number in the specified range. |
void |
randomize(BasicNetwork network,
int fromLayer)
Randomize one level of a neural network. |
void |
randomize(double[] d)
Randomize the array based on an array, modify the array. |
void |
randomize(double[][] d)
Randomize the 2d array based on an array, modify the array. |
void |
randomize(double[] d,
int begin,
int size)
Randomize the array based on an array, modify the array. |
void |
randomize(Matrix m)
Randomize the matrix based on an array, modify the array. |
void |
randomize(MLMethod method)
Randomize the synapses and biases in the basic network based on an array, modify the array. |
void |
setRandom(Random theRandom)
Explicitly set the Random source |
void |
setSeed(long seed)
Explicitly set the seed used for randomization |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.encog.mathutil.randomize.Randomizer |
---|
randomize |
Constructor Detail |
---|
public BasicRandomizer()
Method Detail |
---|
public final Random getRandom()
getRandom
in interface Randomizer
public final double nextDouble()
public final double nextDouble(double min, double max)
min
- The minimum value.max
- The maximum value.
public void randomize(BasicNetwork network, int fromLayer)
network
- The network to randomizefromLayer
- The from level to randomize.public void randomize(double[] d)
randomize
in interface Randomizer
d
- An array to randomize.public void randomize(double[] d, int begin, int size)
randomize
in interface Randomizer
d
- An array to randomize.begin
- The beginning element of the array.size
- The size of the array to copy.public void randomize(double[][] d)
randomize
in interface Randomizer
d
- An array to randomize.public void randomize(Matrix m)
randomize
in interface Randomizer
m
- A matrix to randomize.public void randomize(MLMethod method)
randomize
in interface Randomizer
method
- A network to randomize.public final void setRandom(Random theRandom)
Randomizer
setRandom
in interface Randomizer
theRandom
- the random to setpublic final void setSeed(long seed)
Randomizer
setSeed
in interface Randomizer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |