distribution Derived Type

type, public, abstract :: distribution

Defines a probability distribution.


Contents


Type-Bound Procedures

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

  • 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 :: defined_range => dist_defined_range

  • private pure function dist_defined_range(this) result(rst)

    Gets the defined range for the distribution.

    Arguments

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

    The distribution object.

    Return Value real(kind=real64), dimension(2)

    The defined range of the probability distributions [min, max]. In the event that either min or max are infinite, a value of huge(0.0d0) is returned as opposed to infinite to avoid possible issues with using these values directly.

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

  • 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

  • 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

  • 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

  • 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_recenter), public, deferred, pass :: recenter

  • subroutine distribution_recenter(this, x) Prototype

    Recenters the distribution about the supplied value.

    Arguments

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

    The distribution object.

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

    The value about which to recenter.

procedure, public :: standardized_variable => dist_std_var

  • 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

  • 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.