com.bnd.math.business.rand.NumberPositiveNormalDistributionProvider Maven / Gradle / Ivy
The newest version!
package com.bnd.math.business.rand;
class NumberPositiveNormalDistributionProvider extends PositiveNormalDistributionProvider {
protected NumberPositiveNormalDistributionProvider(Class clazz, RandomDistributionProvider normalDistributionProvider) {
super(clazz, normalDistributionProvider);
}
@Override
public T next() {
// TODO: Potentially an infinity loop might emerge here!
T value = null;
do {
value = normalDistributionProvider.next();
} while (value.doubleValue() < 0);
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy