Class LogNormalSampler

  • All Implemented Interfaces:
    ContinuousSampler

    public class LogNormalSampler
    extends java.lang.Object
    implements ContinuousSampler
    Sampling from a log-normal distribution.
    Since:
    1.1
    • Method Summary

      Modifier and Type Method Description
      double sample()
      Creates a sample.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LogNormalSampler

        public LogNormalSampler​(NormalizedGaussianSampler gaussian,
                                double scale,
                                double shape)
        Parameters:
        gaussian - N(0,1) generator.
        scale - Scale of the log-normal distribution.
        shape - Shape of the log-normal distribution.
        Throws:
        java.lang.IllegalArgumentException - if scale < 0 or shape <= 0.
    • Method Detail

      • sample

        public double sample()
        Creates a sample.
        Specified by:
        sample in interface ContinuousSampler
        Returns:
        a sample.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object