% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distribution.R
\name{define_distribution}
\alias{define_distribution}
\title{Define a Process Distribution}
\usage{
define_distribution(
  name,
  pdf = NULL,
  cdf = NULL,
  sf = NULL,
  quantile = NULL,
  params = list(),
  support = c(-Inf, Inf)
)
}
\arguments{
\item{name}{Character string naming the distribution.}

\item{pdf}{Function representing the probability density function (PDF/PMF) \code{function(x, ...)}.}

\item{cdf}{Function representing the cumulative distribution function (CDF) \code{function(x, ...)}.}

\item{sf}{Function representing the survival function (SF = 1 - CDF) \code{function(x, ...)}.}

\item{quantile}{Function representing the quantile function \code{function(p, ...)}.}

\item{params}{Named list of parameters for the distribution.}

\item{support}{Vector of length 2 defining the lower and upper bounds of support (default \code{c(-Inf, Inf)}).}
}
\value{
An object of class \code{gpci_dist}.
}
\description{
Constructor to define a probability distribution for process capability analysis.
The distribution can be defined by specifying any one (or more) of its PDF/PMF, CDF,
Survival Function (SF), or quantile function. Missing functions are numerically derived.
}
\examples{
dist_norm <- define_distribution(
  name = "Normal",
  pdf = function(x, mean = 0, sd = 1) dnorm(x, mean, sd),
  cdf = function(x, mean = 0, sd = 1) pnorm(x, mean, sd),
  params = list(mean = 0, sd = 1),
  support = c(-Inf, Inf)
)
}
