org.encog.mathutil.randomize
Class RangeRandomizer
- java.lang.Object
-
- org.encog.mathutil.randomize.BasicRandomizer
-
- org.encog.mathutil.randomize.RangeRandomizer
-
- All Implemented Interfaces:
- Randomizer
public class RangeRandomizer extends BasicRandomizer
A randomizer that will create random weight and bias values that are between a specified range.
-
-
Constructor Summary
Constructors Constructor and Description RangeRandomizer(double min, double max)Construct a range randomizer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetMax()doublegetMin()static intrandomInt(int min, int max)Returns a random number in the range between min and max.doublerandomize(double d)Generate a random number based on the range specified in the constructor.static doublerandomize(double min, double max)Generate a random number in the specified range.static doublerandomize(java.util.Random r, double min, double max)-
Methods inherited from class org.encog.mathutil.randomize.BasicRandomizer
getRandom, nextDouble, nextDouble, randomize, randomize, randomize, randomize, randomize, randomize, setRandom
-
-
-
-
Constructor Detail
-
RangeRandomizer
public RangeRandomizer(double min, double max)Construct a range randomizer.- Parameters:
min- The minimum random value.max- The maximum random value.
-
-
Method Detail
-
randomInt
public static int randomInt(int min, int max)Returns a random number in the range between min and max.- Parameters:
min- The minimum desired random number.max- The maximum desired random number.- Returns:
- The random number.
-
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 static double randomize(java.util.Random r, double min, double max)
-
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
-
-
DMelt 3.0 © DataMelt by jWork.ORG