SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
JohnsonSystem.java
1/*
2 * Class: JohnsonSystem
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.probdist;
26
65abstract class JohnsonSystem extends ContinuousDistribution {
66 protected double gamma;
67 protected double delta;
68 protected double xi;
69 protected double lambda;
70
78 protected JohnsonSystem(double gamma, double delta, double xi, double lambda) {
79 setParams0(gamma, delta, xi, lambda);
80 }
81
85 public double getGamma() {
86 return gamma;
87 }
88
92 public double getDelta() {
93 return delta;
94 }
95
99 public double getXi() {
100 return xi;
101 }
102
106 public double getLambda() {
107 return lambda;
108 }
109
115 protected void setParams0(double gamma, double delta, double xi, double lambda) {
116 if (lambda <= 0)
117 throw new IllegalArgumentException("lambda <= 0");
118 if (delta <= 0)
119 throw new IllegalArgumentException("delta <= 0");
120 this.gamma = gamma;
121 this.delta = delta;
122 this.xi = xi;
123 this.lambda = lambda;
124 }
125
131 public double[] getParams() {
132 double[] retour = { gamma, delta, xi, lambda };
133 return retour;
134 }
135
139 public String toString() {
140 return getClass().getSimpleName() + " : gamma = " + gamma + ", delta = " + delta + ", xi = " + xi + ", lambda = "
141 + lambda;
142 }
143
144}
Classes implementing continuous distributions should inherit from this base class.
String toString()
Returns a String containing information about the current distribution.
double[] getParams()
Return an array containing the parameters of the current distribution.
double getXi()
Returns the value of .
double getLambda()
Returns the value of .
void setParams0(double gamma, double delta, double xi, double lambda)
Sets the value of the parameters , ,.
double getDelta()
Returns the value of .
double getGamma()
Returns the value of .
JohnsonSystem(double gamma, double delta, double xi, double lambda)
Constructs a JohnsonSystem object with shape parameters.