simkit.random.TruncatedNormalVariate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simkit Show documentation
Show all versions of simkit Show documentation
Descrete Event Simulation for the JVM)
The newest version!
package simkit.random;
import simkit.random.NormalVariate;
/**
* Generates Normal variates truncated at 0.0.
* @version $Id$
* @author ahbuss
*/
public class TruncatedNormalVariate extends NormalVariate {
/**
*
* @return max(super.generate(), 0.0)
*/
@Override
public double generate() {
return Math.max(super.generate(), 0.0);
}
@Override
public String toString() {
return super.toString().replaceAll("Normal", "TruncatedNormal");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy