mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
The Gamma Distribution

Utilities for working with the Gamma Distribution.

Functions

template<typename realT >
realT mx::math::func::gammaDistributionDenom (realT k, realT q)
 The denominator of the Gamma Distribution. More...
 
template<typename realT >
realT mx::math::func::gammaDistribution (realT x, realT x0, realT k, realT q, realT denom)
 The general shifted Gamma Distribution at a point using an arbitrary peak scaling parameter. More...
 
template<typename realT >
realT mx::math::func::gammaDistribution (realT x, realT x0, realT k, realT q)
 The general shifted Gamma Distribution at a point. More...
 
template<typename realT >
realT mx::math::func::gammaDistributionMean (realT x0, realT k, realT theta)
 The mean of the Gamma Distribution. More...
 
template<typename realT >
realT mx::math::func::gammaDistributionMode (realT x0, realT k, realT theta)
 The mode of the Gamma Distribution. More...
 
template<typename realT >
realT mx::math::func::gammaDistributionVariance (realT k, realT theta)
 The variance of the Gamma Distribution. More...
 

Function Documentation

◆ gammaDistribution() [1/2]

template<typename realT >
realT mx::math::func::gammaDistribution ( realT  x,
realT  x0,
realT  k,
realT  q 
)

The general shifted Gamma Distribution at a point.

Calculates the value of the Gamma Distribution at a location specified by x.

Template Parameters
realTa real floating point type
Returns
the value of the Gamma distribution at x.
Parameters
[in]xthe location at which to calculate the distribution
[in]x0the location parameter
[in]kshape parameter
[in]qthe scale parameter

Definition at line 106 of file gammaDistribution.hpp.

References mx::astro::constants::k().

◆ gammaDistribution() [2/2]

template<typename realT >
realT mx::math::func::gammaDistribution ( realT  x,
realT  x0,
realT  k,
realT  q,
realT  denom 
)

The general shifted Gamma Distribution at a point using an arbitrary peak scaling parameter.

Calculates the value of the Gamma Distribution at a location specified by x.

Template Parameters
realTa real floating point type
Returns
the value of the Gamma distribution at x.
Parameters
[in]xthe location at which to calculate the distribution
[in]x0the location parameter
[in]kshape parameter
[in]qthe scale parameter
[in]denomthe denominator, or 1/peak-scale.

Definition at line 79 of file gammaDistribution.hpp.

References mx::astro::constants::k().

◆ gammaDistributionDenom()

template<typename realT >
realT mx::math::func::gammaDistributionDenom ( realT  k,
realT  q 
)

The denominator of the Gamma Distribution.

Can be used to avoid repeated calculations when the parameters are constant

Template Parameters
realTa real floating point type
Returns
the denominator of the Gamma Distribution.
Parameters
[in]kshape parameter
[in]qthe scale parameter

Definition at line 51 of file gammaDistribution.hpp.

References mx::astro::constants::k().

◆ gammaDistributionMean()

template<typename realT >
realT mx::math::func::gammaDistributionMean ( realT  x0,
realT  k,
realT  theta 
)

The mean of the Gamma Distribution.

Calculates the mean of the Gamma Distribution for the given parameters.

Template Parameters
realTa real floating point type
Returns
the mean of the Gamma Distribution.
Parameters
[in]x0the location parameter
[in]kshape parameter
[in]thetathe scale parameter

Definition at line 126 of file gammaDistribution.hpp.

References mx::astro::constants::k().

◆ gammaDistributionMode()

template<typename realT >
realT mx::math::func::gammaDistributionMode ( realT  x0,
realT  k,
realT  theta 
)

The mode of the Gamma Distribution.

Calculates the mode of the Gamma Distribution for the given parameters.

Template Parameters
realTa real floating point type
Returns
the mode of the Gamma Distribution.
Parameters
[in]x0the location parameter
[in]kshape parameter
[in]thetathe scale parameter

Definition at line 144 of file gammaDistribution.hpp.

References mx::astro::constants::k().

◆ gammaDistributionVariance()

template<typename realT >
realT mx::math::func::gammaDistributionVariance ( realT  k,
realT  theta 
)

The variance of the Gamma Distribution.

Calculates the variance of the Gamma Distribution for the given parameters.

Template Parameters
realTa real floating point type
Returns
the variance of the Gamma Distribution.
Parameters
[in]kshape parameter
[in]thetathe scale parameter

Definition at line 164 of file gammaDistribution.hpp.

References mx::astro::constants::k().