All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.opengamma.strata.math.impl.statistics.distribution.ProbabilityDistribution Maven / Gradle / Ivy

There is a newer version: 2.12.46
Show newest version
/*
 * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.strata.math.impl.statistics.distribution;

/**
 * Interface for probability distributions.
 * @param  Type of the parameters of the distribution
 */
// CSOFF: ALL
public interface ProbabilityDistribution {

  /**
   * @return The next random number from this distribution
   */
  public abstract double nextRandom();

  /**
   * Return the probability density function for a value 
   * @param x The value, not null 
   * @return The pdf
   */
  public abstract double getPDF(T x);

  /**
   * Returns the cumulative distribution function for a value
   * @param x The value, not null
   * @return The cdf
   */
  public abstract double getCDF(T x);

  /**
   * Given a probability, return the value that returns this cdf
   * @param p The probability, not null. $0 \geq p \geq 1$
   * @return The inverse cdf
   */
  public abstract double getInverseCDF(T p);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy