Class RdRandomSequence

java.lang.Object
org.drip.measure.crng.RdRandomSequence

public class RdRandomSequence
extends java.lang.Object
RdRandomSequence generates 1D and 2D random arrays.

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 Value
    static double[][] PeriodicTridiagonal​(int elementCount, double maximumElement, boolean isEntryInteger)
    Construct a Periodic Tridiagonal Matrix of Random Elements up to the Maximum Value
    static java.lang.String RandomCUSIP()
    Generate a Random CUSIP
    static int RandomDigit()
    Generate a Random Digit
    static char RandomUpperAlpha()
    Generate a Random Upper-case Alphabet
    static char RandomUpperAlphaNumeric()
    Generate a Random Upper Alpha-numeric Character
    static double[][] Tridiagonal​(int elementCount, double maximumElement, boolean isEntryInteger)
    Construct a Tridiagonal Matrix of Random Elements up to the Maximum Value
    static double[][] TwoD​(int elementCount, double maximumElement, boolean isEntryInteger)
    Construct a 2D Matrix of Random Elements up to the Maximum Value

    Methods 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
    • 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 Array
      maximumElement - Maximum Element
      isEntryInteger - 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 Array
      maximumElement - Maximum Element
      isEntryInteger - 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 Array
      maximumElement - Maximum Element
      isEntryInteger - 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 Array
      maximumElement - Maximum Element
      isEntryInteger - TRUE - Entry is an Integer
      Returns:
      Periodic Tridiagonal Matrix of Random Elements up to the Maximum Value