Class R1ContinuousUniform

java.lang.Object
org.drip.measure.distribution.R1Continuous
org.drip.measure.distribution.R1ContinuousUniform
Direct Known Subclasses:
R1ContinuousUniformPiecewiseDisplaced, R1ContinuousUniformPiecewiseLinear

public class R1ContinuousUniform
extends R1Continuous
R1ContinuousUniform implements the Univariate R1 Uniform, i. e., Lebesgue Distribution. It implements the Incremental, the Cumulative, and the Inverse Cumulative Distribution Densities. It provides the following Functionality:
  • Construct a Standard (0, 1) R1 Univariate Uniform Distribution
  • R1ContinuousUniform Constructor
  • Retrieve the Left Support
  • Retrieve the Right Support
  • Indicate if the specified x Value stays inside the Support
  • Lay out the Support of the PDF Range
  • Compute the cumulative under the distribution to the given value
  • Compute the Incremental under the Distribution between the 2 variates
  • Compute the inverse cumulative under the distribution corresponding to the given value
  • Compute the Density under the Distribution at the given Variate
  • Retrieve the Mean of the Distribution
  • Retrieve the Variance of the Distribution
  • Generate a Random Variable corresponding to the Distribution
  • Retrieve the Univariate Weighted Histogram

Module Computational Core Module
Library Numerical Analysis Library
Project Rd Continuous/Discrete Probability Measures
Package R1 and Rd Continuous Random Measure

Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • R1ContinuousUniform

      public R1ContinuousUniform​(double leftSupport, double rightSupport) throws java.lang.Exception
      R1ContinuousUniform Constructor
      Parameters:
      leftSupport - The Left Support
      rightSupport - The Right Support
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • Standard

      public static final R1ContinuousUniform Standard()
      Construct a Standard (0, 1) R1 Uniform Distribution
      Returns:
      Standard (0, 1) R1 Uniform Distribution
    • leftSupport

      public double leftSupport()
      Retrieve the Left Support
      Returns:
      The Left Support
    • rightSupport

      public double rightSupport()
      Retrieve the Right Support
      Returns:
      The Right Support
    • supported

      public boolean supported​(double x)
      Indicate if the specified x Value stays inside the Support
      Overrides:
      supported in class R1Continuous
      Parameters:
      x - X
      Returns:
      The Value stays in Support
    • support

      public double[] support()
      Lay out the Support of the PDF Range
      Specified by:
      support in class R1Continuous
      Returns:
      Support of the PDF Range
    • cumulative

      public double cumulative​(double x) throws java.lang.Exception
      Compute the cumulative under the distribution to the given value
      Overrides:
      cumulative in class R1Continuous
      Parameters:
      x - Variate to which the cumulative is to be computed
      Returns:
      The cumulative
      Throws:
      java.lang.Exception - Thrown if the inputs are invalid
    • incremental

      public double incremental​(double xLeft, double xRight) throws java.lang.Exception
      Compute the Incremental under the Distribution between the 2 variates
      Overrides:
      incremental in class R1Continuous
      Parameters:
      xLeft - Left Variate to which the cumulative is to be computed
      xRight - Right Variate to which the cumulative is to be computed
      Returns:
      The Incremental under the Distribution between the 2 variates
      Throws:
      java.lang.Exception - Thrown if the inputs are invalid
    • invCumulative

      public double invCumulative​(double p) throws java.lang.Exception
      Compute the inverse cumulative under the distribution corresponding to the given value
      Overrides:
      invCumulative in class R1Continuous
      Parameters:
      p - Value corresponding to which the inverse cumulative is to be computed
      Returns:
      The inverse cumulative
      Throws:
      java.lang.Exception - Thrown if the Input is invalid
    • density

      public double density​(double x) throws java.lang.Exception
      Compute the Density under the Distribution at the given Variate
      Specified by:
      density in class R1Continuous
      Parameters:
      x - Variate at which the Density needs to be computed
      Returns:
      The Density
      Throws:
      java.lang.Exception - Thrown if the input is invalid
    • mean

      public double mean()
      Retrieve the Mean of the Distribution
      Overrides:
      mean in class R1Continuous
      Returns:
      The Mean of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Mean cannot be estimated
    • variance

      public double variance()
      Retrieve the Variance of the Distribution
      Overrides:
      variance in class R1Continuous
      Returns:
      The Variance of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Variance cannot be estimated
    • random

      public double random()
      Generate a Random Variable corresponding to the Distribution
      Overrides:
      random in class R1Continuous
      Returns:
      Random Variable corresponding to the Distribution
      Throws:
      java.lang.Exception - Thrown if the Random Instance cannot be estimated
    • histogram

      public Array2D histogram()
      Retrieve the Univariate Weighted Histogram
      Overrides:
      histogram in class R1Continuous
      Returns:
      The Univariate Weighted Histogram