Initial CRAN submission.
validate_dist_structure(x): helper for subclass
implementors. Checks the class chain, presence of
ncomponents() / component(), and (via
getS3method lookup) whether at least one of
phi.X or min_paths.X is registered. Fails fast
at construction time instead of at first method dispatch.min_paths.dist_structure: default derived by
enumeration from phi. Closes a protocol gap: the contract
said “provide phi or min_paths” but only the phi-from-paths direction
had a default; users providing only phi previously hit “no
applicable method” on min_paths() and any default that
depended on it (min_cuts, system_signature,
reliability, …).surv.series_dist: product of component survival
functions. Avoids the 2^m reliability-polynomial
enumeration in the dist_structure default for series
systems whose components are not in a closed-form family.surv.parallel_dist:
1 - prod(component CDFs). Same rationale as
surv.series_dist.hazard.wei_series: closed-form additive Weibull hazard
sum_j (k_j/s_j) * (t/s_j)^(k_j - 1).hazard.wei_kofn, hazard.exp_kofn:
composition of the existing closed-form density() and
surv().component.dual_of_system: delegates to the underlying
original. User-defined dist_structure subclasses that route
dual() through the lazy-wrapper path now compose with
surv(), sampler(), and other defaults.README.md with quick-tour and ecosystem
context._pkgdown.yml).@return blocks across
dist_structure and the closed-form family topics.kofn_dist: explicit :G vs :F
convention note with @seealso to
order_statistic.bridge_dist: Barlow-Proschan reference and
component-role description.hazard.exp_series is now properly registered as an S3
method rather than being exported as a regular function.system_signature guards against always-zero
phi (signature is undefined for non-functioning systems;
previously silently returned (1, 0, ..., 0)).mean.cold_standby_dist falls back to Monte Carlo when
component means silently propagate NA instead of returning
NA.coherent_dist (and inherited by all topology shortcuts)
rejects NULL or non-dist components with a
clear message instead of letting the error surface deep in
default-method dispatch.R/defaults.R: shared numeric helpers move to
R/internal-utils.R; defaults.R now contains
only the S3 default methods (165 lines down from 318).cdf overrides;
cdf.dist_structure default produces an identical closure
via dispatch.exp_parallel: flipped so surv is primary,
matching the family convention.min_paths.kofn_dist (the parent
coherent_dist already caches combn output as
$min_paths).withr::local_seed()
(auto-restore on test_that exit); withr added
to Suggests.density.exp_kofn and
density.wei_kofn methods via the critical-state subset
enumeration formula
f_sys(t) = sum_j f_j(t) * P(j critical at t). Required for
downstream packages (kofn) that want to compute exact loglik
contributions without duplicating the math.density.exp_series and
hazard.exp_series methods so downstream packages can
delegate via algebraic.dist::density() /
hazard() rather than reimplementing.gamma_series(shapes, rates): closed-form series of
Gamma components.lognormal_series(meanlogs, sdlogs): closed-form series
of Lognormal components.cold_standby_dist(components): non-coherent system;
deliberately does NOT inherit dist_structure. Provides
exact mean (sum of component means) and sampler; Monte Carlo surv/cdf
with per-closure sample caching for determinism.as_dist_structure(x): coercion. dist ->
1-component series_dist; dist_structure
returned unchanged.make_component_samplers and
series_surv_product helpers (now shared across the exp/wei
series and k-of-n specializations).birnbaum_importance,
criticality_importance,
vesely_fussell_importance.substitute_component,
compose_systems.minimize_sets: equal-length duplicate
sets were not being removed, causing min_cuts to return
duplicated cut sets for k-of-n and bridge topologies. Fixed by
deduplicating input before subset-minimality checks.criticality_importance now validates j
bounds (matches other importance measures).system_signature.dist_structure default via
m! permutation enumeration (warns for
m > 9).exp_parallel, exp_kofn,
wei_kofn specializations.