umontreal.iro.lecuyer.randvar
Class HyperbolicSecantGen
- java.lang.Object
-
- umontreal.iro.lecuyer.randvar.RandomVariateGen
-
- umontreal.iro.lecuyer.randvar.HyperbolicSecantGen
-
public class HyperbolicSecantGen extends RandomVariateGen
This class implements random variate generators for the hyperbolic secant distribution with location parameter μ and scale parameter σ. The density function of this distribution isf (x) = 1/(2σ) sech(π/2(x - μ)/σ), - ∞ < x < ∞.
-
-
Constructor Summary
Constructors Constructor and Description HyperbolicSecantGen(RandomStream s)Creates a hyperbolic secant random variate generator with parameters μ = 0 and σ = 1, using stream s.HyperbolicSecantGen(RandomStream s, double mu, double sigma)Creates a hyperbolic secant random variate generator with parameters μ = mu and σ = sigma, using stream s.HyperbolicSecantGen(RandomStream s, HyperbolicSecantDist dist)Creates a new generator for the distribution dist, using stream s.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetMu()Returns the parameter μ of this object.doublegetSigma()Returns the parameter σ of this object.static doublenextDouble(RandomStream s, double mu, double sigma)Generates a variate from the hyperbolic secant distribution with location parameter μ and scale parameter σ.-
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStream, toString
-
-
-
-
Constructor Detail
-
HyperbolicSecantGen
public HyperbolicSecantGen(RandomStream s, double mu, double sigma)
Creates a hyperbolic secant random variate generator with parameters μ = mu and σ = sigma, using stream s.
-
HyperbolicSecantGen
public HyperbolicSecantGen(RandomStream s)
Creates a hyperbolic secant random variate generator with parameters μ = 0 and σ = 1, using stream s.
-
HyperbolicSecantGen
public HyperbolicSecantGen(RandomStream s, HyperbolicSecantDist dist)
Creates a new generator for the distribution dist, using stream s.
-
-
Method Detail
-
nextDouble
public static double nextDouble(RandomStream s, double mu, double sigma)
Generates a variate from the hyperbolic secant distribution with location parameter μ and scale parameter σ.
-
getMu
public double getMu()
Returns the parameter μ of this object.
-
getSigma
public double getSigma()
Returns the parameter σ of this object.
-
-
DMelt 3.0 © DataMelt by jWork.ORG