Class Binary


public class Binary
extends Bounded
Binary implements the Standard {0, 1}-valued Binary Random Number Generator.



Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    Binary​(double dblPositiveProbability)
    Binary Distribution Constructor
  • Method Summary

    Modifier and Type Method Description
    double positiveProbability()
    Retrieve the Positive Instance Probability
    double random()
    Generate a Random Number according to the specified rule

    Methods inherited from class org.drip.sequence.random.Bounded

    lowerBound, sequence, upperBound

    Methods inherited from class org.drip.sequence.random.UnivariateSequenceGenerator

    sequence

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Binary

      public Binary​(double dblPositiveProbability) throws java.lang.Exception
      Binary Distribution Constructor
      Parameters:
      dblPositiveProbability - Probability of Generating ONE
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
  • Method Details

    • positiveProbability

      public double positiveProbability()
      Retrieve the Positive Instance Probability
      Returns:
      The Positive Instance Probability
    • random

      public double random()
      Description copied from class: UnivariateSequenceGenerator
      Generate a Random Number according to the specified rule
      Specified by:
      random in class UnivariateSequenceGenerator
      Returns:
      The Random Number