25package umontreal.ssj.stochprocess;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
29import umontreal.ssj.randvar.*;
62 protected double delta;
63 protected double gamma;
65 protected double deltaOverGamma;
66 protected double deltaSquare;
68 protected double[] imu;
69 protected double[] ilam;
74 int numberOfRandomStreams;
77 protected InverseGaussianProcess() {
88 numberOfRandomStreams = 1;
93 for (
int i = 0; i < d; i++) {
98 observationCounter = d;
111 for (
int i = 0; i < d; i++) {
115 observationIndex = d;
116 observationCounter = d;
124 public double[]
generatePath(
double[] uniforms01,
double[] uniforms01b) {
125 throw new UnsupportedOperationException(
"Use generatePath with 1 stream.");
129 double s = path[observationIndex];
132 observationCounter = observationIndex;
133 path[observationIndex] = s;
143 deltaOverGamma = delta / gamma;
144 deltaSquare = delta * delta;
168 return delta * time / gamma;
177 return delta * delta * time * time;
180 protected void init() {
182 if (observationTimesSet) {
186 ilam =
new double[d];
187 for (
int j = 0; j < d; j++) {
188 double temp = delta * (t[j + 1] - t[j]);
189 imu[j] = temp / gamma;
190 ilam[j] = temp * temp;
202 this.stream = stream;
212 return numberOfRandomStreams;
Extends the class ContinuousDistribution for the inverse Gaussian distribution with location paramete...
double inverseF(double u)
Returns the inverse distribution function .
This class implements random variate generators for the inverse Gaussian distribution with location p...
static double nextDouble(RandomStream s, double mu, double lambda)
Generates a variate from the inverse gaussian distribution with location parameter and scale paramet...
double getAnalyticVariance(double time)
Returns the analytic variance which is , with.
double getAnalyticAverage(double time)
Returns the analytic average which is , with.
InverseGaussianProcess(double s0, double delta, double gamma, RandomStream stream)
Constructs a new InverseGaussianProcess.
void setStream(RandomStream stream)
Resets the random stream of the underlying generator to stream.
int getNumberOfRandomStreams()
Returns the number of random streams of this process.
double[] generatePath(double[] uniforms01, double[] uniforms01b)
This method does not work for this class, but will be useful for the subclasses that require two stre...
double getGamma()
Returns .
double[] generatePath()
Generates, returns, and saves the sample path .
double[] generatePath(double[] uniforms01)
Instead of using the internal stream to generate the path, uses an array of uniforms .
double nextObservation()
Generates and returns the next observation of the stochastic process.
void setParams(double delta, double gamma)
Sets the parameters.
RandomStream getStream()
Returns the random stream of the underlying generator.
double getDelta()
Returns .
Abstract base class for a stochastic process sampled (or observed) at a finite number of time points...
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...