Package org.drip.measure.crng
Class RdRandomSequenceGenerator
java.lang.Object
org.drip.measure.crng.RdRandomSequenceGenerator
public class RdRandomSequenceGenerator
extends java.lang.Object
RdRandomSequenceGenerator generates 1D and 2D random arrays. It provides the following
Functionality:
- Generate a Random Digit
- Generate a Random Upper-case Alphabet
- Generate a Random Upper Alpha-numeric Character
- Generate a Random CUSIP
- Generate a Random Number within the Maximum Value
- Construct a 1D Array of Random Elements up to the Maximum Value
- Construct a 2D Matrix of Random Elements up to the Maximum Value
- Construct a Tridiagonal Matrix of Random Elements up to the Maximum Value
- Construct a Periodic Tridiagonal Matrix of Random Elements up to the Maximum Value
| Module | Computational Core Module |
| Library | Numerical Analysis Library |
| Project | Rd Continuous/Discrete Probability Measures |
| Package | Continuous Random Number Stream Generator |
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description RdRandomSequenceGenerator() -
Method Summary
Modifier and Type Method Description static java.lang.StringCUSIP()Generate a Random CUSIPstatic intDigit()Generate a Random Digitstatic doubleDouble(double maximumElement, boolean isEntryInteger)Generate a Random Number within the Maximum Valuestatic double[]DoubleArray(int elementCount, double maximumElement, boolean isEntryInteger)Construct a 1D Array of Random Elements up to the Maximum Valuestatic double[][]DoubleMatrix(int elementCount, double maximumElement, boolean isEntryInteger)Construct a 2D Matrix of Random Elements up to the Maximum Valuestatic double[][]PeriodicTridiagonalMatix(int elementCount, double maximumElement, boolean isEntryInteger)Construct a Periodic Tridiagonal Matrix of Random Elements up to the Maximum Valuestatic double[][]TridiagonalMatrix(int elementCount, double maximumElement, boolean isEntryInteger)Construct a Tridiagonal Matrix of Random Elements up to the Maximum Valuestatic charUpperCaseAlphabet()Generate a Random Upper-case Alphabetstatic charUpperCaseAlphabetOrNumber()Generate a Random Upper Alpha-numeric CharacterMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RdRandomSequenceGenerator
public RdRandomSequenceGenerator()
-
-
Method Details
-
Digit
public static final int Digit()Generate a Random Digit- Returns:
- Random Digit
-
UpperCaseAlphabet
public static final char UpperCaseAlphabet()Generate a Random Upper-case Alphabet- Returns:
- Random Upper-case Alphabet
-
UpperCaseAlphabetOrNumber
public static final char UpperCaseAlphabetOrNumber()Generate a Random Upper Alpha-numeric Character- Returns:
- Random Upper Alpha-numeric Character
-
CUSIP
public static final java.lang.String CUSIP()Generate a Random CUSIP- Returns:
- The CUSIP
-
Double
public static final double Double(double maximumElement, boolean isEntryInteger) throws java.lang.ExceptionGenerate a Random Number within the Maximum Value- Parameters:
maximumElement- Maximum ElementisEntryInteger- TRUE - Entry is an Integer- Returns:
- Random Number within the Maximum Value
- Throws:
java.lang.Exception- Thrown if the Maximum Element is Invalid
-
DoubleArray
public static final double[] DoubleArray(int elementCount, double maximumElement, boolean isEntryInteger)Construct a 1D Array of Random Elements up to the Maximum Value- Parameters:
elementCount- Number of Elements in the ArraymaximumElement- Maximum ElementisEntryInteger- TRUE - Entry is an Integer- Returns:
- 1D Array of Random Elements up to the Maximum Value
-
DoubleMatrix
public static final double[][] DoubleMatrix(int elementCount, double maximumElement, boolean isEntryInteger)Construct a 2D Matrix of Random Elements up to the Maximum Value- Parameters:
elementCount- Number of Elements in the ArraymaximumElement- Maximum ElementisEntryInteger- TRUE - Entry is an Integer- Returns:
- 2D Matrix of Random Elements up to the Maximum Value
-
TridiagonalMatrix
public static final double[][] TridiagonalMatrix(int elementCount, double maximumElement, boolean isEntryInteger)Construct a Tridiagonal Matrix of Random Elements up to the Maximum Value- Parameters:
elementCount- Number of Elements in the ArraymaximumElement- Maximum ElementisEntryInteger- TRUE - Entry is an Integer- Returns:
- Tridiagonal Matrix of Random Elements up to the Maximum Value
-
PeriodicTridiagonalMatix
public static final double[][] PeriodicTridiagonalMatix(int elementCount, double maximumElement, boolean isEntryInteger)Construct a Periodic Tridiagonal Matrix of Random Elements up to the Maximum Value- Parameters:
elementCount- Number of Elements in the ArraymaximumElement- Maximum ElementisEntryInteger- TRUE - Entry is an Integer- Returns:
- Periodic Tridiagonal Matrix of Random Elements up to the Maximum Value
-