Class R1PiecewiseLinear

java.lang.Object

public class R1PiecewiseLinear
extends R1Uniform
R1PiecewiseLinear implements the Piecewise Linear R1 Distributions. It exports the Methods corresponding to the R1 Lebesgue Base Class.

Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • R1PiecewiseLinear

      public R1PiecewiseLinear​(double dblLeftPredictorOrdinateEdge, double dblRightPredictorOrdinateEdge, double[] adblPredictorOrdinate, double[] adblPiecewiseDensity) throws java.lang.Exception
      R1PiecewiseLinear Constructor
      Parameters:
      dblLeftPredictorOrdinateEdge - Left Predictor Ordinate Edge
      dblRightPredictorOrdinateEdge - Right Predictor Ordinate Edge
      adblPredictorOrdinate - Array of Intermediate Predictor Ordinates
      adblPiecewiseDensity - Array of corresponding Piece-wise Densities
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
  • Method Details

    • Standard

      public static final R1PiecewiseLinear Standard​(double dblLeftPredictorOrdinateEdge, double dblRightPredictorOrdinateEdge, double[] adblPredictorOrdinate, double[] adblCumulativeProbability)
      Calibrate an R1PiecewiseLinear Lebesgue Instance
      Parameters:
      dblLeftPredictorOrdinateEdge - Left Predictor Ordinate Edge
      dblRightPredictorOrdinateEdge - Right Predictor Ordinate Edge
      adblPredictorOrdinate - Array of Intermediate Predictor Ordinates
      adblCumulativeProbability - Array of corresponding Cumulative Probabilities
      Returns:
      The R1PiecewiseLinearLebesgue Instance
    • predictorOrdinates

      public double[] predictorOrdinates()
      Retrieve the Array of Predictor Ordinates
      Returns:
      The Array of Predictor Ordinates
    • piecewiseDensities

      public double[] piecewiseDensities()
      Retrieve the Array of Piecewise Densities
      Returns:
      The Array of Piecewise Densities
    • cumulative

      public double cumulative​(double dblX) throws java.lang.Exception
      Description copied from class: R1Univariate
      Compute the cumulative under the distribution to the given value
      Overrides:
      cumulative in class R1Uniform
      Parameters:
      dblX - Variate to which the cumulative is to be computed
      Returns:
      The cumulative
      Throws:
      java.lang.Exception - Thrown if the inputs are invalid
    • invCumulative

      public double invCumulative​(double dblY) throws java.lang.Exception
      Description copied from class: R1Univariate
      Compute the inverse cumulative under the distribution corresponding to the given value
      Overrides:
      invCumulative in class R1Uniform
      Parameters:
      dblY - 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 dblX) throws java.lang.Exception
      Description copied from class: R1Univariate
      Compute the Density under the Distribution at the given Variate
      Overrides:
      density in class R1Uniform
      Parameters:
      dblX - Variate at which the Density needs to be computed
      Returns:
      The Density
      Throws:
      java.lang.Exception - Thrown if the input is invalid
    • histogram

      public Array2D histogram()
      Description copied from class: R1Univariate
      Retrieve the Univariate Weighted Histogram
      Overrides:
      histogram in class R1Uniform
      Returns:
      The Univariate Weighted Histogram