org.encog.mathutil.randomize
Class RangeRandomizer
java.lang.Object
org.encog.mathutil.randomize.BasicRandomizer
org.encog.mathutil.randomize.RangeRandomizer
- All Implemented Interfaces:
- Randomizer
- Direct Known Subclasses:
- NguyenWidrowRandomizer
public class RangeRandomizer
- extends BasicRandomizer
A randomizer that will create random weight and bias values that are between
a specified range.
- Author:
- jheaton
|
Constructor Summary |
RangeRandomizer(double min,
double max)
Construct a range randomizer. |
|
Method Summary |
double |
getMax()
|
double |
getMin()
|
static int |
randomInt(int min,
int max)
|
double |
randomize(double d)
Generate a random number based on the range specified in the constructor. |
static double |
randomize(double min,
double max)
Generate a random number in the specified range. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RangeRandomizer
public RangeRandomizer(double min,
double max)
- Construct a range randomizer.
- Parameters:
min - The minimum random value.max - The maximum random value.
randomInt
public static int randomInt(int min,
int max)
randomize
public static double randomize(double min,
double max)
- Generate a random number in the specified range.
- Parameters:
min - The minimum value.max - The maximum value.
- Returns:
- A random number.
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.
getMin
public double getMin()
- Returns:
- the min
getMax
public double getMax()
- Returns:
- the max
Copyright © 2011. All Rights Reserved.