Package org.drip.measure.crng
Class RdRandomSequence
java.lang.Object
org.drip.measure.crng.RdRandomSequence
public class RdRandomSequence
extends java.lang.Object
RdRandomSequence generates 1D and 2D random arrays.
- 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 RdRandomSequence() -
Method Summary
Modifier and Type Method Description static double[]OneD(int elementCount, double maximumElement, boolean isEntryInteger)Construct a 1D Array of Random Elements up to the Maximum Valuestatic double[][]PeriodicTridiagonal(int elementCount, double maximumElement, boolean isEntryInteger)Construct a Periodic Tridiagonal Matrix of Random Elements up to the Maximum Valuestatic java.lang.StringRandomCUSIP()Generate a Random CUSIPstatic intRandomDigit()Generate a Random Digitstatic charRandomUpperAlpha()Generate a Random Upper-case Alphabetstatic charRandomUpperAlphaNumeric()Generate a Random Upper Alpha-numeric Characterstatic doubleSingle(double maximumElement, boolean isEntryInteger)Generate a Random Number within the Maximum Valuestatic double[][]Tridiagonal(int elementCount, double maximumElement, boolean isEntryInteger)Construct a Tridiagonal Matrix of Random Elements up to the Maximum Valuestatic double[][]TwoD(int elementCount, double maximumElement, boolean isEntryInteger)Construct a 2D Matrix of Random Elements up to the Maximum ValueMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RdRandomSequence
public RdRandomSequence()
-
-
Method Details
-
RandomDigit
public static final int RandomDigit()Generate a Random Digit- Returns:
- Random Digit
-
RandomUpperAlpha
public static final char RandomUpperAlpha()Generate a Random Upper-case Alphabet- Returns:
- Random Upper-case Alphabet
-
RandomUpperAlphaNumeric
public static final char RandomUpperAlphaNumeric()Generate a Random Upper Alpha-numeric Character- Returns:
- Random Upper Alpha-numeric Character
-
RandomCUSIP
public static final java.lang.String RandomCUSIP()Generate a Random CUSIP- Returns:
- The CUSIP
-
Single
public static final double Single(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
-
OneD
public static final double[] OneD(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
-
TwoD
public static final double[][] TwoD(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
-
Tridiagonal
public static final double[][] Tridiagonal(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
-
PeriodicTridiagonal
public static final double[][] PeriodicTridiagonal(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
-