org.neuroph.util.random
Class RangeRandomizer
java.lang.Object
org.neuroph.util.random.WeightsRandomizer
org.neuroph.util.random.RangeRandomizer
- Direct Known Subclasses:
- NguyenWidrowRandomizer
public class RangeRandomizer
- extends WeightsRandomizer
This class provides ranged weights randomizer, which randomize weights in specified [min, max] range.
- Author:
- Zoran Sevarac
Field Summary |
protected double |
max
Upper range limit |
protected double |
min
Lower range limit |
Constructor Summary |
RangeRandomizer(double min,
double max)
Creates a new instance of RangeRandomizer within specified . |
Method Summary |
protected double |
nextRandomWeight()
Generates next random value within [min, max] range determined by the settings in this randomizer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
min
protected double min
- Lower range limit
max
protected double max
- Upper range limit
RangeRandomizer
public RangeRandomizer(double min,
double max)
- Creates a new instance of RangeRandomizer within specified .
The random values are generated according to formula:
newValue = min + random * (max - min)
- Parameters:
min
- min weight valuemax
- max weight value
nextRandomWeight
protected double nextRandomWeight()
- Generates next random value within [min, max] range determined by the settings in this randomizer
- Overrides:
nextRandomWeight
in class WeightsRandomizer
- Returns:
- next weight random value
Copyright © 2012. All Rights Reserved.