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

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

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

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

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

\item{shapes}{Positive numeric vector of length \code{m}.}

\item{scales}{Positive numeric vector of length \code{m}.}

\item{x}{A \code{wei_kofn} object.}

\item{...}{Ignored.}
}
\value{
\code{wei_kofn()} returns an object of class
\code{c("wei_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 (possibly heterogeneous) Weibulls. Closed-form \code{surv},
\code{cdf}, \code{sampler}, \code{density}, and \code{hazard} via subset enumeration,
the critical-state density formula, and component order statistics.
}
\examples{
sys <- wei_kofn(k = 2, shapes = c(1, 2, 3), scales = c(1, 2, 3))
algebraic.dist::surv(sys)(1)
}
