File indexing completed on 2024-05-12 03:47:53

0001 /*
0002     File                 : nsl_sf_stats.h
0003     Project              : LabPlot
0004     Description          : NSL special statistics functions
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2016 Stefan Gerlach <stefan.gerlach@uni.kn>
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #ifndef NSL_SF_STATS_H
0011 #define NSL_SF_STATS_H
0012 
0013 #undef __BEGIN_DECLS
0014 #undef __END_DECLS
0015 #ifdef __cplusplus
0016 #define __BEGIN_DECLS extern "C" {
0017 #define __END_DECLS }
0018 #else
0019 #define __BEGIN_DECLS /* empty */
0020 #define __END_DECLS /* empty */
0021 #endif
0022 __BEGIN_DECLS
0023 
0024 #include <stdbool.h>
0025 
0026 #define NSL_SF_STATS_DISTRIBUTION_COUNT 35
0027 #define NSL_SF_STATS_DISTRIBUTION_RNG_COUNT 31 /* GSL RNG distributions */
0028 /* ordered as defined in GSL random number distributions */
0029 /* order is fixed, so append new distros at the end */
0030 typedef enum {
0031     nsl_sf_stats_gaussian,
0032     nsl_sf_stats_gaussian_tail,
0033     nsl_sf_stats_exponential,
0034     nsl_sf_stats_laplace,
0035     nsl_sf_stats_exponential_power,
0036     nsl_sf_stats_cauchy_lorentz,
0037     nsl_sf_stats_rayleigh,
0038     nsl_sf_stats_rayleigh_tail,
0039     nsl_sf_stats_landau,
0040     nsl_sf_stats_levy_alpha_stable,
0041     nsl_sf_stats_levy_skew_alpha_stable,
0042     nsl_sf_stats_gamma,
0043     nsl_sf_stats_flat,
0044     nsl_sf_stats_lognormal,
0045     nsl_sf_stats_chi_squared,
0046     nsl_sf_stats_fdist,
0047     nsl_sf_stats_tdist,
0048     nsl_sf_stats_beta,
0049     nsl_sf_stats_logistic,
0050     nsl_sf_stats_pareto,
0051     nsl_sf_stats_weibull,
0052     nsl_sf_stats_gumbel1,
0053     nsl_sf_stats_gumbel2,
0054     nsl_sf_stats_poisson,
0055     nsl_sf_stats_bernoulli,
0056     nsl_sf_stats_binomial,
0057     nsl_sf_stats_negative_binomial,
0058     nsl_sf_stats_pascal,
0059     nsl_sf_stats_geometric,
0060     nsl_sf_stats_hypergeometric,
0061     nsl_sf_stats_logarithmic,
0062     nsl_sf_stats_maxwell_boltzmann,
0063     nsl_sf_stats_sech,
0064     nsl_sf_stats_levy,
0065     nsl_sf_stats_frechet
0066 } nsl_sf_stats_distribution;
0067 /*TODO: CDF, SF, ... */
0068 
0069 extern const char* nsl_sf_stats_distribution_name[];
0070 extern const char* nsl_sf_stats_distribution_pic_name[];
0071 extern const char* nsl_sf_stats_distribution_equation[];
0072 
0073 bool nsl_sf_stats_distribution_supports_ML(nsl_sf_stats_distribution);
0074 
0075 __END_DECLS
0076 
0077 #endif /* NSL_SF_STATS_H */