SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
LMScrambleShift.java
1/*
2 * Class: LMScrambleShift
3 * Description: performs a left matrix scramble and adds a random digital shift
4 * Environment: Java
5 * Software: SSJ
6 * Copyright (C) 2001--2018 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.hups;
26
27import umontreal.ssj.rng.RandomStream;
28import java.lang.IllegalArgumentException;
29
38public class LMScrambleShift extends RandomShift {
39
43 public LMScrambleShift() {
44 }
45
52 super(stream);
53 }
54
63 public void randomize(PointSet p) {
64 if (p instanceof DigitalNet) {
65 ((DigitalNet) p).leftMatrixScramble(stream);
66 ((DigitalNet) p).addRandomShift(stream);
67 } else {
68 throw new IllegalArgumentException("LMScrambleShift" + " can only randomize a DigitalNet");
69 }
70 }
71
75 public String toString() {
76 return "Left matrix scramble + random digital shift";
77 }
78
79}
This class provides the basic structures for storing and manipulating linear digital nets in base ,...
String toString()
Returns a descriptor of this object.
void randomize(PointSet p)
This method calls umontreal.ssj.hups.DigitalNet.leftMatrixScramble(RandomStream), then umontreal....
LMScrambleShift(RandomStream stream)
Sets internal variable stream to the given stream.
This abstract class represents a general point set.
Definition PointSet.java:99
RandomShift()
Empty constructor: No stream is passed here for the randomization; one must be passed later by setStr...
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...