distribution Derived Type

type, public, abstract :: distribution

Defines a probability distribution.


Contents


Type-Bound Procedures

procedure(distribution_function), public, deferred, pass :: cdf

Computes the cumulative distribution function.

  • pure elemental function distribution_function(this, x) result(rst) Prototype

    Defines the interface for a probability distribution function.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    real(kind=real64), intent(in) :: x

    The value at which to evaluate the function.

    Return Value real(kind=real64)

    The value of the function.

procedure(distribution_property), public, deferred, pass :: mean

Computes the mean of the distribution.

  • pure function distribution_property(this) result(rst) Prototype

    Computes the value of a distribution property.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    Return Value real(kind=real64)

    The property value.

procedure(distribution_property), public, deferred, pass :: median

Computes the median of the distribution.

  • pure function distribution_property(this) result(rst) Prototype

    Computes the value of a distribution property.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    Return Value real(kind=real64)

    The property value.

procedure(distribution_property), public, deferred, pass :: mode

Computes the mode of the distribution.

  • pure function distribution_property(this) result(rst) Prototype

    Computes the value of a distribution property.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    Return Value real(kind=real64)

    The property value.

procedure(distribution_function), public, deferred, pass :: pdf

Computes the probability density function.

  • pure elemental function distribution_function(this, x) result(rst) Prototype

    Defines the interface for a probability distribution function.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    real(kind=real64), intent(in) :: x

    The value at which to evaluate the function.

    Return Value real(kind=real64)

    The value of the function.

procedure, public :: standardized_variable => dist_std_var

Computes the standardized variable for the distribution.

  • private pure elemental function dist_std_var(this, x) result(rst)

    Computes the standardized variable for the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    real(kind=real64), intent(in) :: x

    The value of interest.

    Return Value real(kind=real64)

    The result.

procedure(distribution_property), public, deferred, pass :: variance

Computes the variance of the distribution.

  • pure function distribution_property(this) result(rst) Prototype

    Computes the value of a distribution property.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    Return Value real(kind=real64)

    The property value.