SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
JohnsonSBGen.java
1/*
2 * Class: JohnsonSBGen
3 * Description: random variate generators for the Johnson $S_B$ distribution
4 * Environment: Java
5 * Software: SSJ
6 * Copyright (C) 2001 Pierre L'Ecuyer and Universite de Montreal
7 * Organization: DIRO, Universite de Montreal
8 * @author
9 * @since
10 *
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 *
24 */
25package umontreal.ssj.randvar;
26
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
29
39public class JohnsonSBGen extends JohnsonSystemG {
40
44 public JohnsonSBGen(RandomStream s, double gamma, double delta, double xi, double lambda) {
45 super(s, new JohnsonSBDist(gamma, delta, xi, lambda));
46 setParams(gamma, delta, xi, lambda);
47 }
48
54 super(s, dist);
55 if (dist != null)
56 setParams(dist.getGamma(), dist.getDelta(), dist.getXi(), dist.getLambda());
57 }
58
62 public static double nextDouble(RandomStream s, double gamma, double delta, double xi, double lambda) {
63 return JohnsonSBDist.inverseF(gamma, delta, xi, lambda, s.nextDouble());
64 }
65}
Extends the class ContinuousDistribution for the Johnson.
double inverseF(double u)
Returns the inverse distribution function .
JohnsonSBGen(RandomStream s, JohnsonSBDist dist)
Creates a new generator for the JohnsonSB distribution dist, using stream s.
JohnsonSBGen(RandomStream s, double gamma, double delta, double xi, double lambda)
Creates a JohnsonSB random variate generator.
static double nextDouble(RandomStream s, double gamma, double delta, double xi, double lambda)
Uses inversion to generate a new JohnsonSB variate, using stream s.
JohnsonSystemG(RandomStream s, double gamma, double delta, double xi, double lambda)
Constructs a JohnsonSystemG object with shape parameters.
void setParams(double gamma, double delta, double xi, double lambda)
Sets the value of the parameters , ,.
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...
double nextDouble()
Returns a (pseudo)random number from the uniform distribution over the interval , using this stream,...