SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
JohnsonSystemG.java
1/*
2 * Class: JohnsonSystemG
3 * Description: Johnson system of distributions
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 Richard Simard
9 * @since july 2012
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
43abstract class JohnsonSystemG extends RandomVariateGen {
44 protected double gamma;
45 protected double delta;
46 protected double xi;
47 protected double lambda;
48
56 protected JohnsonSystemG(RandomStream s, double gamma, double delta, double xi, double lambda) {
57 super(s, null);
58 setParams(gamma, delta, xi, lambda);
59 }
60
66 super(s, dist);
67 }
68
72 public double getGamma() {
73 return gamma;
74 }
75
79 public double getDelta() {
80 return delta;
81 }
82
86 public double getXi() {
87 return xi;
88 }
89
93 public double getLambda() {
94 return lambda;
95 }
96
102 protected void setParams(double gamma, double delta, double xi, double lambda) {
103 if (lambda <= 0)
104 throw new IllegalArgumentException("lambda <= 0");
105 if (delta <= 0)
106 throw new IllegalArgumentException("delta <= 0");
107 this.gamma = gamma;
108 this.delta = delta;
109 this.xi = xi;
110 this.lambda = lambda;
111 }
112
113}
Classes implementing continuous distributions should inherit from this base class.
JohnsonSystemG(RandomStream s, double gamma, double delta, double xi, double lambda)
Constructs a JohnsonSystemG object with shape parameters.
JohnsonSystemG(RandomStream s, ContinuousDistribution dist)
Constructs a JohnsonSystemG object with parameters obtained from distribution dist.
void setParams(double gamma, double delta, double xi, double lambda)
Sets the value of the parameters , ,.
double getLambda()
Returns the value of .
double getXi()
Returns the value of .
double getGamma()
Returns the value of .
double getDelta()
Returns the value of .
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...