13 if (!lmmc_std_real_array_is_finite(values, count)) {
29 status = lmmc_std_wrap_const_vec(values, count, &view);
33 return lmmc_std_store_finite_real(value, out);
43 status = lmmc_std_wrap_const_vec(values, count, &view);
47 return lmmc_std_store_finite_real(value, out);
57 status = lmmc_std_wrap_const_vec(values, count, &view);
61 return lmmc_std_store_finite_real(value, out);
71 status = lmmc_std_wrap_const_vec(values, count, &view);
75 return lmmc_std_store_finite_real(value, out);
89 status = lmmc_std_wrap_const_vec(values, count, &view);
93 return lmmc_std_store_finite_real(value, out);
106 status = lmmc_std_wrap_const_vec(x, count, &x_view);
108 status = lmmc_std_wrap_const_vec(y, count, &y_view);
112 return lmmc_std_store_finite_real(value, out);
125 status = lmmc_std_wrap_const_vec(x, count, &x_view);
127 status = lmmc_std_wrap_const_vec(y, count, &y_view);
131 return lmmc_std_store_finite_real(value, out);
146 if (!lmmc_std_real_is_finite(a) || !lmmc_std_real_is_finite(b)) {
149 status = fn(a, b, &value);
151 return lmmc_std_store_finite_real(value, out);
163 if (!lmmc_std_real_is_finite(a) || !lmmc_std_real_is_finite(b) ||
164 !lmmc_std_real_is_finite(c)) {
167 status = fn(a, b, c, &value);
169 return lmmc_std_store_finite_real(value, out);
313 return lmmc_std_store_finite_real(value, out);
326 return lmmc_std_store_finite_real(value, out);
335 if (!lmmc_std_real_is_finite(lambda)) {
340 return lmmc_std_store_finite_real(value, out);
349 if (!lmmc_std_real_is_finite(lambda)) {
354 return lmmc_std_store_finite_real(value, out);
double lmmc_real_t
Public and internal LMMC real type.
lmmc_status_t lmmc_dist_poisson_cdf(size_t k, lmmc_real_t lambda, lmmc_real_t *out)
泊松分布累积分布函数;直接计算正则化上不完全伽马尾。
lmmc_status_t lmmc_vec_quantile(const lmmc_vec_t *x, lmmc_real_t p, lmmc_real_t *out)
计算向量的 p 分位数(线性插值法)。
lmmc_status_t lmmc_dist_chi2_quantile(lmmc_real_t p, lmmc_real_t df, lmmc_real_t *out)
χ² 分布分位数函数。
lmmc_status_t lmmc_dist_normal_quantile(lmmc_real_t p, lmmc_real_t mu, lmmc_real_t sigma, lmmc_real_t *out)
正态分布分位数函数(逆 CDF)。
lmmc_status_t lmmc_vec_variance_sample(const lmmc_vec_t *x, lmmc_real_t *out_variance)
计算样本方差 。
lmmc_status_t lmmc_dist_beta_pdf(lmmc_real_t x, lmmc_real_t alpha, lmmc_real_t beta, lmmc_real_t *out)
贝塔分布概率密度函数。
lmmc_status_t lmmc_vec_mean(const lmmc_vec_t *x, lmmc_real_t *out_mean)
计算向量样本均值 。
lmmc_status_t lmmc_dist_binomial_cdf(size_t k, size_t n, lmmc_real_t p_param, lmmc_real_t *out)
二项分布累积分布函数。
lmmc_status_t lmmc_dist_chi2_cdf(lmmc_real_t x, lmmc_real_t df, lmmc_real_t *out)
χ² 分布累积分布函数。
lmmc_status_t lmmc_dist_t_cdf(lmmc_real_t x, lmmc_real_t df, lmmc_real_t *out)
t 分布累积分布函数。
lmmc_status_t lmmc_dist_gamma_quantile(lmmc_real_t p, lmmc_real_t shape, lmmc_real_t scale, lmmc_real_t *out)
伽马分布分位数函数。
lmmc_status_t lmmc_dist_normal_cdf(lmmc_real_t x, lmmc_real_t mu, lmmc_real_t sigma, lmmc_real_t *out)
正态分布累积分布函数。
lmmc_status_t lmmc_dist_f_quantile(lmmc_real_t p, lmmc_real_t df1, lmmc_real_t df2, lmmc_real_t *out)
F 分布分位数函数。
lmmc_status_t lmmc_dist_gamma_pdf(lmmc_real_t x, lmmc_real_t shape, lmmc_real_t scale, lmmc_real_t *out)
伽马分布概率密度函数。
lmmc_status_t lmmc_dist_normal_pdf(lmmc_real_t x, lmmc_real_t mu, lmmc_real_t sigma, lmmc_real_t *out)
连续分布函数的公共参数约束。
lmmc_status_t lmmc_vec_stddev_sample(const lmmc_vec_t *x, lmmc_real_t *out_stddev)
样本标准差,要求 n>=2 。 缩放计算支持方差超出 binary64 范围的情况。 输入非有限或标准差结果溢出时返回 LMMC_STATUS_NUMERICAL_FAILURE。
lmmc_status_t lmmc_dist_t_quantile(lmmc_real_t p, lmmc_real_t df, lmmc_real_t *out)
t 分布分位数函数。
lmmc_status_t lmmc_dist_beta_cdf(lmmc_real_t x, lmmc_real_t alpha, lmmc_real_t beta, lmmc_real_t *out)
贝塔分布累积分布函数。
lmmc_status_t lmmc_dist_gamma_cdf(lmmc_real_t x, lmmc_real_t shape, lmmc_real_t scale, lmmc_real_t *out)
伽马分布累积分布函数。
lmmc_status_t lmmc_dist_f_cdf(lmmc_real_t x, lmmc_real_t df1, lmmc_real_t df2, lmmc_real_t *out)
F 分布累积分布函数。
lmmc_status_t lmmc_dist_chi2_pdf(lmmc_real_t x, lmmc_real_t df, lmmc_real_t *out)
χ² 分布概率密度函数。
lmmc_status_t lmmc_dist_poisson_pmf(size_t k, lmmc_real_t lambda, lmmc_real_t *out)
泊松分布概率质量函数。
lmmc_status_t lmmc_vec_covariance_sample(const lmmc_vec_t *x, const lmmc_vec_t *y, lmmc_real_t *out_covariance)
样本协方差,要求 n>=2 。
lmmc_status_t lmmc_vec_median(const lmmc_vec_t *x, lmmc_real_t *out)
计算向量中位数。
lmmc_status_t lmmc_dist_beta_quantile(lmmc_real_t p, lmmc_real_t alpha, lmmc_real_t beta, lmmc_real_t *out)
贝塔分布分位数函数。
lmmc_status_t lmmc_dist_t_pdf(lmmc_real_t x, lmmc_real_t df, lmmc_real_t *out)
t 分布概率密度函数。
lmmc_status_t lmmc_vec_correlation_sample(const lmmc_vec_t *x, const lmmc_vec_t *y, lmmc_real_t *out_correlation)
样本 Pearson 相关系数;使用同一缩放累计路径,要求 n>=2。
lmmc_status_t lmmc_dist_binomial_pmf(size_t k, size_t n, lmmc_real_t p, lmmc_real_t *out)
离散分布函数的公共参数约束。
lmmc_status_t lmmc_dist_f_pdf(lmmc_real_t x, lmmc_real_t df1, lmmc_real_t df2, lmmc_real_t *out)
F 分布概率密度函数。
lmmc_status_t
LMMC 库统一返回的状态码.
@ LMMC_STATUS_NUMERICAL_FAILURE
@ LMMC_STATUS_INVALID_ARGUMENT
@ LMMC_STATUS_OUT_OF_RANGE
@ LMMC_STATUS_EMPTY_INPUT
lmmc_status_t(*) lmmc_std_dist3_fn(lmmc_real_t, lmmc_real_t, lmmc_real_t, lmmc_real_t *)
lmmc_status_t(*) lmmc_std_dist2_fn(lmmc_real_t, lmmc_real_t, lmmc_real_t *)
lmmc_status_t lmmc_std_stats_chi2_cdf(lmmc_real_t x, lmmc_real_t df, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_gamma_quantile(lmmc_real_t p, lmmc_real_t shape, lmmc_real_t scale, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_t_pdf(lmmc_real_t x, lmmc_real_t df, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_cov(const lmmc_real_t *x, const lmmc_real_t *y, size_t count, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_f_cdf(lmmc_real_t x, lmmc_real_t df1, lmmc_real_t df2, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_quantile(const lmmc_real_t *values, size_t count, lmmc_real_t q, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_gamma_pdf(lmmc_real_t x, lmmc_real_t shape, lmmc_real_t scale, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_normal_quantile(lmmc_real_t p, lmmc_real_t mean, lmmc_real_t stddev, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_f_quantile(lmmc_real_t p, lmmc_real_t df1, lmmc_real_t df2, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_chi2_pdf(lmmc_real_t x, lmmc_real_t df, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_beta_pdf(lmmc_real_t x, lmmc_real_t alpha, lmmc_real_t beta, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_binomial_pmf(size_t k, size_t n, lmmc_real_t p, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_normal_pdf(lmmc_real_t x, lmmc_real_t mean, lmmc_real_t stddev, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_f_pdf(lmmc_real_t x, lmmc_real_t df1, lmmc_real_t df2, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_var(const lmmc_real_t *values, size_t count, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_poisson_pmf(size_t k, lmmc_real_t lambda, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_corr(const lmmc_real_t *x, const lmmc_real_t *y, size_t count, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_t_quantile(lmmc_real_t p, lmmc_real_t df, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_mean(const lmmc_real_t *values, size_t count, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_beta_cdf(lmmc_real_t x, lmmc_real_t alpha, lmmc_real_t beta, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_binomial_cdf(size_t k, size_t n, lmmc_real_t p, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_beta_quantile(lmmc_real_t p, lmmc_real_t alpha, lmmc_real_t beta, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_poisson_cdf(size_t k, lmmc_real_t lambda, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_median(const lmmc_real_t *values, size_t count, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_normal_cdf(lmmc_real_t x, lmmc_real_t mean, lmmc_real_t stddev, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_gamma_cdf(lmmc_real_t x, lmmc_real_t shape, lmmc_real_t scale, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_t_cdf(lmmc_real_t x, lmmc_real_t df, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_chi2_quantile(lmmc_real_t p, lmmc_real_t df, lmmc_real_t *out)
lmmc_status_t lmmc_std_stats_std(const lmmc_real_t *values, size_t count, lmmc_real_t *out)