Package jdistlib

Class DiscreteLaplace

All Implemented Interfaces:
SupportedDistribution

public final class DiscreteLaplace extends GenericDistribution implements SupportedDistribution
Discrete Laplace distribution on the lattice location + Z.

The probability of location + k is (1 - p) / (1 + p) * p^abs(k) for integer k and 0 < p < 1.

  • Constructor Details

    • DiscreteLaplace

      public DiscreteLaplace(double location, double p)
  • Method Details

    • density

      public static double density(double x, double location, double p, boolean log)
    • cumulative

      public static double cumulative(double x, double location, double p, boolean lowerTail, boolean logP)
    • quantile

      public static double quantile(double probability, double location, double p, boolean lowerTail, boolean logP)
    • random

      public static double random(double location, double p, RandomEngine random)
    • random

      public static double[] random(int n, double location, double p, RandomEngine random)
    • density

      public double density(double x, boolean log)
      Specified by:
      density in class GenericDistribution
    • cumulative

      public double cumulative(double x, boolean lowerTail, boolean logP)
      Specified by:
      cumulative in class GenericDistribution
    • quantile

      public double quantile(double probability, boolean lowerTail, boolean logP)
      Specified by:
      quantile in class GenericDistribution
    • random

      public double random()
      Specified by:
      random in class GenericDistribution
    • getLowerBound

      public double getLowerBound()
      Specified by:
      getLowerBound in interface SupportedDistribution
    • getUpperBound

      public double getUpperBound()
      Specified by:
      getUpperBound in interface SupportedDistribution