LMMC
Lamina Mathematic core
载入中...
搜索中...
未找到
stdlib_stats.h
浏览该文件的文档.
1
2#ifndef LMMC_STDLIB_STATS_H
3#define LMMC_STDLIB_STATS_H
4
5#include "lmmc/random.h"
6#include "lmmc/status.h"
7#include <stdint.h>
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14lmmc_status_t lmmc_std_stats_mean(const lmmc_real_t* values, size_t count,
15 lmmc_real_t* out);
16lmmc_status_t lmmc_std_stats_median(const lmmc_real_t* values, size_t count,
17 lmmc_real_t* out);
18lmmc_status_t lmmc_std_stats_var(const lmmc_real_t* values, size_t count,
19 lmmc_real_t* out);
20lmmc_status_t lmmc_std_stats_std(const lmmc_real_t* values, size_t count,
21 lmmc_real_t* out);
22lmmc_status_t lmmc_std_stats_quantile(const lmmc_real_t* values, size_t count,
23 lmmc_real_t q, lmmc_real_t* out);
25 const lmmc_real_t* y,
26 size_t count,
27 lmmc_real_t* out);
29 const lmmc_real_t* y,
30 size_t count,
31 lmmc_real_t* out);
33 lmmc_real_t stddev,
34 lmmc_real_t* out);
36 lmmc_real_t stddev,
37 lmmc_real_t* out);
39 lmmc_real_t mean,
40 lmmc_real_t stddev,
41 lmmc_real_t* out);
43 lmmc_real_t* out);
45 lmmc_real_t* out);
47 lmmc_real_t* out);
49 lmmc_real_t* out);
51 lmmc_real_t* out);
53 lmmc_real_t* out);
55 lmmc_real_t df2, lmmc_real_t* out);
57 lmmc_real_t df2, lmmc_real_t* out);
59 lmmc_real_t df2,
60 lmmc_real_t* out);
62 lmmc_real_t scale,
63 lmmc_real_t* out);
65 lmmc_real_t scale,
66 lmmc_real_t* out);
68 lmmc_real_t shape,
69 lmmc_real_t scale,
70 lmmc_real_t* out);
72 lmmc_real_t beta,
73 lmmc_real_t* out);
75 lmmc_real_t beta,
76 lmmc_real_t* out);
78 lmmc_real_t alpha,
79 lmmc_real_t beta,
80 lmmc_real_t* out);
83 lmmc_real_t* out);
86 lmmc_real_t* out);
88 lmmc_real_t* out);
90 lmmc_real_t* out);
91
95 int64_t hi, int64_t* out);
97 lmmc_real_t stddev, lmmc_real_t* out);
99 const lmmc_real_t* values,
100 size_t count,
101 lmmc_real_t* out);
110 int64_t hi,
111 int64_t* out);
113 lmmc_real_t stddev,
114 lmmc_real_t* out);
116 size_t count,
117 lmmc_real_t* out);
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif
double lmmc_real_t
Public and internal LMMC real type.
伪随机数发生器与常用分布。
随机数发生器(不透明类型)。
LMMC 通用状态码定义.
lmmc_status_t
LMMC 库统一返回的状态码.
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_random_default_rand(lmmc_real_t *out)
lmmc_status_t lmmc_std_random_seed(lmmc_rng_t *rng, uint64_t seed)
void lmmc_std_random_default_deinit(void)
各线程独立持有默认随机流,采用零分配实现。 反初始化仅重置调用线程的流。
lmmc_status_t lmmc_std_random_normal(lmmc_rng_t *rng, lmmc_real_t mean, lmmc_real_t stddev, 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_random_default_normal(lmmc_real_t mean, lmmc_real_t stddev, 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_random_rand(lmmc_rng_t *rng, 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_random_default_choice(const lmmc_real_t *values, size_t count, 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_random_randint(lmmc_rng_t *rng, int64_t lo, int64_t hi, int64_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_random_default_seed(uint64_t seed)
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_random_choice(lmmc_rng_t *rng, const lmmc_real_t *values, size_t count, 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_random_default_randint(int64_t lo, int64_t hi, int64_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)