% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/exp_kofn.R
\name{exp_kofn}
\alias{exp_kofn}
\alias{surv.exp_kofn}
\alias{sampler.exp_kofn}
\alias{hazard.exp_kofn}
\alias{density.exp_kofn}
\title{k-out-of-n system of independent exponential components (closed form)}
\usage{
exp_kofn(k, rates)

\method{surv}{exp_kofn}(x, ...)

\method{sampler}{exp_kofn}(x, ...)

\method{hazard}{exp_kofn}(x, ...)

\method{density}{exp_kofn}(x, ...)
}
\arguments{
\item{k}{Minimum number of functioning components for system operation.}

\item{rates}{Positive numeric vector of length \code{m} with \code{m >= k}.}

\item{x}{An \code{exp_kofn} object.}

\item{...}{Ignored.}
}
\value{
\code{exp_kofn()} returns an object of class
\code{c("exp_kofn", "kofn_dist", "coherent_dist", "dist_structure", "univariate_dist", "continuous_dist", "dist")}.

The associated S3 methods return:
\itemize{
\item \code{surv()}, \code{density()}, \code{hazard()}: a closure \verb{function(t, ...)}.
\item \code{cdf()} is derived via the \code{dist_structure} default and returns
a closure \verb{function(t, ...)} equal to \code{1 - surv(x)(t)}.
\item \code{sampler()}: a closure \verb{function(n, ...)} returning \code{n} random
variates from the system lifetime distribution.
}
}
\description{
Constructs a \code{dist_structure} for a k-out-of-m system whose components
are independent exponentials. Closed-form methods are provided for
\code{surv}, \code{cdf}, \code{sampler}, \code{density}, and \code{hazard}. \code{mean} falls back
to numerical integration via the \code{dist_structure} default.
}
\examples{
sys <- exp_kofn(k = 2, rates = c(1, 2, 3))
algebraic.dist::surv(sys)(1)
}
