% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/residual_entropy.R
\name{info_gen_function}
\alias{info_gen_function}
\title{Golomb Information Generating Function}
\usage{
info_gen_function(dens_fn, alpha = 1, upper = 100)
}
\arguments{
\item{dens_fn}{A function of one argument returning the density.}

\item{alpha}{Positive parameter (default 1).}

\item{upper}{Upper integration limit.}
}
\value{
Scalar numeric.
}
\description{
Computes the information generating function (IGF) introduced by Golomb
(1966):
\deqn{\mathcal{I}_\alpha(f) = \int_0^\infty f^\alpha(x)\,dx, \quad \alpha > 0.}

When \eqn{\alpha \to 1},
\eqn{-d\mathcal{I}_\alpha / d\alpha|_{\alpha=1} = H(f)}.
}
\examples{
# Exponential(1) with alpha=1 gives 1
info_gen_function(function(x) dexp(x, rate = 1), alpha = 1)

# alpha = 2
info_gen_function(function(x) dexp(x, rate = 1), alpha = 2)

}
\references{
Golomb S.W. (1966). The information generating function of a probability
distribution. *IEEE Transactions on Information Theory*, 12(1), 75--77.
}
\seealso{
\code{\link{residual_info_gen}}
}
