SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
RandomStream.java
1/*
2 * Class: RandomStream
3 * Description: basic structures to handle multiple streams of uniform
4 (pseudo)-random numbers and tools to move around within
5 and across these streams
6 * Environment: Java
7 * Software: SSJ
8 * Copyright (C) 2001 Pierre L'Ecuyer and Universite de Montreal
9 * Organization: DIRO, Universite de Montreal
10 * @author Pierre L'Ecuyer
11 * @since 2000
12 *
13 *
14 * Licensed under the Apache License, Version 2.0 (the "License");
15 * you may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at
17 *
18 * http://www.apache.org/licenses/LICENSE-2.0
19 *
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
25 *
26 */
27package umontreal.ssj.rng;
28
141public interface RandomStream {
142
147 public void resetStartStream();
148
154 public void resetStartSubstream();
155
161 public void resetNextSubstream();
162
168 public String toString();
169
177 public double nextDouble();
178
187 public void nextArrayOfDouble(double[] u, int start, int n);
188
198 public int nextInt(int i, int j);
199
212 public void nextArrayOfInt(int i, int j, int[] u, int start, int n);
213
214}
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,...
int nextInt(int i, int j)
Returns a (pseudo)random number from the discrete uniform distribution over the integers ,...
void resetNextSubstream()
Reinitializes the stream to the beginning of its next substream:
void nextArrayOfInt(int i, int j, int[] u, int start, int n)
Generates n (pseudo)random numbers from the discrete uniform distribution over the integers ,...
void resetStartSubstream()
Reinitializes the stream to the beginning of its current substream:
void resetStartStream()
Reinitializes the stream to its initial state : and are set to .
void nextArrayOfDouble(double[] u, int start, int n)
Generates n (pseudo)random numbers from the uniform distribution and stores them into the array u sta...
String toString()
Returns a string containing the current state of this stream.