anomaly_detection 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/ext/anomaly_detection/anomaly_detection.cpp +6 -21
- data/ext/anomaly_detection/dist.h +180 -0
- data/lib/anomaly_detection/version.rb +1 -1
- data/licenses/LICENSE-MIT-dist-h.txt +21 -0
- data/licenses/UNLICENSE-dist-h.txt +24 -0
- metadata +6 -6
- data/ext/anomaly_detection/cdflib.cpp +0 -12126
- data/ext/anomaly_detection/cdflib.hpp +0 -123
- data/licenses/LICENSE-cdflib.txt +0 -165
@@ -1,123 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include <string>
|
4
|
-
|
5
|
-
using std::string;
|
6
|
-
|
7
|
-
double algdiv ( double *a, double *b );
|
8
|
-
double alnrel ( double *a );
|
9
|
-
double apser ( double *a, double *b, double *x, double *eps );
|
10
|
-
double bcorr ( double *a0, double *b0 );
|
11
|
-
double beta ( double a, double b );
|
12
|
-
double beta_asym ( double *a, double *b, double *lambda, double *eps );
|
13
|
-
double beta_frac ( double *a, double *b, double *x, double *y, double *lambda,
|
14
|
-
double *eps );
|
15
|
-
void beta_grat ( double *a, double *b, double *x, double *y, double *w,
|
16
|
-
double *eps,int *ierr );
|
17
|
-
void beta_inc ( double *a, double *b, double *x, double *y, double *w,
|
18
|
-
double *w1, int *ierr );
|
19
|
-
void beta_inc_values ( int *n_data, double *a, double *b, double *x, double *fx );
|
20
|
-
double beta_log ( double *a0, double *b0 );
|
21
|
-
double beta_pser ( double *a, double *b, double *x, double *eps );
|
22
|
-
double beta_rcomp ( double *a, double *b, double *x, double *y );
|
23
|
-
double beta_rcomp1 ( int *mu, double *a, double *b, double *x, double *y );
|
24
|
-
double beta_up ( double *a, double *b, double *x, double *y, int *n, double *eps );
|
25
|
-
void binomial_cdf_values ( int *n_data, int *a, double *b, int *x, double *fx );
|
26
|
-
void cdfbet ( int *which, double *p, double *q, double *x, double *y,
|
27
|
-
double *a, double *b, int *status, double *bound );
|
28
|
-
void cdfbin ( int *which, double *p, double *q, double *s, double *xn,
|
29
|
-
double *pr, double *ompr, int *status, double *bound );
|
30
|
-
void cdfchi ( int *which, double *p, double *q, double *x, double *df,
|
31
|
-
int *status, double *bound );
|
32
|
-
void cdfchn ( int *which, double *p, double *q, double *x, double *df,
|
33
|
-
double *pnonc, int *status, double *bound );
|
34
|
-
void cdff ( int *which, double *p, double *q, double *f, double *dfn,
|
35
|
-
double *dfd, int *status, double *bound );
|
36
|
-
void cdffnc ( int *which, double *p, double *q, double *f, double *dfn,
|
37
|
-
double *dfd, double *phonc, int *status, double *bound );
|
38
|
-
void cdfgam ( int *which, double *p, double *q, double *x, double *shape,
|
39
|
-
double *scale, int *status, double *bound );
|
40
|
-
void cdfnbn ( int *which, double *p, double *q, double *s, double *xn,
|
41
|
-
double *pr, double *ompr, int *status, double *bound );
|
42
|
-
void cdfnor ( int *which, double *p, double *q, double *x, double *mean,
|
43
|
-
double *sd, int *status, double *bound );
|
44
|
-
void cdfpoi ( int *which, double *p, double *q, double *s, double *xlam,
|
45
|
-
int *status, double *bound );
|
46
|
-
void cdft ( int *which, double *p, double *q, double *t, double *df,
|
47
|
-
int *status, double *bound );
|
48
|
-
void chi_noncentral_cdf_values ( int *n_data, double *x, double *lambda,
|
49
|
-
int *df, double *cdf );
|
50
|
-
void chi_square_cdf_values ( int *n_data, int *a, double *x, double *fx );
|
51
|
-
void cumbet ( double *x, double *y, double *a, double *b, double *cum,
|
52
|
-
double *ccum );
|
53
|
-
void cumbin ( double *s, double *xn, double *pr, double *ompr,
|
54
|
-
double *cum, double *ccum );
|
55
|
-
void cumchi ( double *x, double *df, double *cum, double *ccum );
|
56
|
-
void cumchn ( double *x, double *df, double *pnonc, double *cum,
|
57
|
-
double *ccum );
|
58
|
-
void cumf ( double *f, double *dfn, double *dfd, double *cum, double *ccum );
|
59
|
-
void cumfnc ( double *f, double *dfn, double *dfd, double *pnonc,
|
60
|
-
double *cum, double *ccum );
|
61
|
-
void cumgam ( double *x, double *a, double *cum, double *ccum );
|
62
|
-
void cumnbn ( double *s, double *xn, double *pr, double *ompr,
|
63
|
-
double *cum, double *ccum );
|
64
|
-
void cumnor ( double *arg, double *result, double *ccum );
|
65
|
-
void cumpoi ( double *s, double *xlam, double *cum, double *ccum );
|
66
|
-
void cumt ( double *t, double *df, double *cum, double *ccum );
|
67
|
-
double dbetrm ( double *a, double *b );
|
68
|
-
double dexpm1 ( double *x );
|
69
|
-
double dinvnr ( double *p, double *q );
|
70
|
-
void dinvr ( int *status, double *x, double *fx,
|
71
|
-
unsigned long *qleft, unsigned long *qhi );
|
72
|
-
double dlanor ( double *x );
|
73
|
-
double dpmpar ( int *i );
|
74
|
-
void dstinv ( double *zsmall, double *zbig, double *zabsst,
|
75
|
-
double *zrelst, double *zstpmu, double *zabsto, double *zrelto );
|
76
|
-
double dstrem ( double *z );
|
77
|
-
void dstzr ( double *zxlo, double *zxhi, double *zabstl, double *zreltl );
|
78
|
-
double dt1 ( double *p, double *q, double *df );
|
79
|
-
void dzror ( int *status, double *x, double *fx, double *xlo,
|
80
|
-
double *xhi, unsigned long *qleft, unsigned long *qhi );
|
81
|
-
void erf_values ( int *n_data, double *x, double *fx );
|
82
|
-
double error_f ( double *x );
|
83
|
-
double error_fc ( int *ind, double *x );
|
84
|
-
double esum ( int *mu, double *x );
|
85
|
-
double eval_pol ( double a[], int *n, double *x );
|
86
|
-
double exparg ( int *l );
|
87
|
-
void f_cdf_values ( int *n_data, int *a, int *b, double *x, double *fx );
|
88
|
-
void f_noncentral_cdf_values ( int *n_data, int *a, int *b, double *lambda,
|
89
|
-
double *x, double *fx );
|
90
|
-
double fifdint ( double a );
|
91
|
-
double fifdmax1 ( double a, double b );
|
92
|
-
double fifdmin1 ( double a, double b );
|
93
|
-
double fifdsign ( double mag, double sign );
|
94
|
-
long fifidint ( double a );
|
95
|
-
long fifmod ( long a, long b );
|
96
|
-
double fpser ( double *a, double *b, double *x, double *eps );
|
97
|
-
void ftnstop ( string msg );
|
98
|
-
double gam1 ( double *a );
|
99
|
-
void gamma_inc ( double *a, double *x, double *ans, double *qans, int *ind );
|
100
|
-
void gamma_inc_inv ( double *a, double *x, double *x0, double *p, double *q,
|
101
|
-
int *ierr );
|
102
|
-
void gamma_inc_values ( int *n_data, double *a, double *x, double *fx );
|
103
|
-
double gamma_ln1 ( double *a );
|
104
|
-
double gamma_log ( double *a );
|
105
|
-
void gamma_rat1 ( double *a, double *x, double *r, double *p, double *q,
|
106
|
-
double *eps );
|
107
|
-
void gamma_values ( int *n_data, double *x, double *fx );
|
108
|
-
double gamma_x ( double *a );
|
109
|
-
double gsumln ( double *a, double *b );
|
110
|
-
int ipmpar ( int *i );
|
111
|
-
void negative_binomial_cdf_values ( int *n_data, int *f, int *s, double *p,
|
112
|
-
double *cdf );
|
113
|
-
void normal_cdf_values ( int *n_data, double *x, double *fx );
|
114
|
-
void poisson_cdf_values ( int *n_data, double *a, int *x, double *fx );
|
115
|
-
double psi ( double *xx );
|
116
|
-
void psi_values ( int *n_data, double *x, double *fx );
|
117
|
-
double rcomp ( double *a, double *x );
|
118
|
-
double rexp ( double *x );
|
119
|
-
double rlog ( double *x );
|
120
|
-
double rlog1 ( double *x );
|
121
|
-
void student_cdf_values ( int *n_data, int *a, double *x, double *fx );
|
122
|
-
double stvaln ( double *p );
|
123
|
-
void timestamp ( void );
|
data/licenses/LICENSE-cdflib.txt
DELETED
@@ -1,165 +0,0 @@
|
|
1
|
-
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
-
Version 3, 29 June 2007
|
3
|
-
|
4
|
-
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
5
|
-
Everyone is permitted to copy and distribute verbatim copies
|
6
|
-
of this license document, but changing it is not allowed.
|
7
|
-
|
8
|
-
|
9
|
-
This version of the GNU Lesser General Public License incorporates
|
10
|
-
the terms and conditions of version 3 of the GNU General Public
|
11
|
-
License, supplemented by the additional permissions listed below.
|
12
|
-
|
13
|
-
0. Additional Definitions.
|
14
|
-
|
15
|
-
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
-
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
-
General Public License.
|
18
|
-
|
19
|
-
"The Library" refers to a covered work governed by this License,
|
20
|
-
other than an Application or a Combined Work as defined below.
|
21
|
-
|
22
|
-
An "Application" is any work that makes use of an interface provided
|
23
|
-
by the Library, but which is not otherwise based on the Library.
|
24
|
-
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
-
of using an interface provided by the Library.
|
26
|
-
|
27
|
-
A "Combined Work" is a work produced by combining or linking an
|
28
|
-
Application with the Library. The particular version of the Library
|
29
|
-
with which the Combined Work was made is also called the "Linked
|
30
|
-
Version".
|
31
|
-
|
32
|
-
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
-
Corresponding Source for the Combined Work, excluding any source code
|
34
|
-
for portions of the Combined Work that, considered in isolation, are
|
35
|
-
based on the Application, and not on the Linked Version.
|
36
|
-
|
37
|
-
The "Corresponding Application Code" for a Combined Work means the
|
38
|
-
object code and/or source code for the Application, including any data
|
39
|
-
and utility programs needed for reproducing the Combined Work from the
|
40
|
-
Application, but excluding the System Libraries of the Combined Work.
|
41
|
-
|
42
|
-
1. Exception to Section 3 of the GNU GPL.
|
43
|
-
|
44
|
-
You may convey a covered work under sections 3 and 4 of this License
|
45
|
-
without being bound by section 3 of the GNU GPL.
|
46
|
-
|
47
|
-
2. Conveying Modified Versions.
|
48
|
-
|
49
|
-
If you modify a copy of the Library, and, in your modifications, a
|
50
|
-
facility refers to a function or data to be supplied by an Application
|
51
|
-
that uses the facility (other than as an argument passed when the
|
52
|
-
facility is invoked), then you may convey a copy of the modified
|
53
|
-
version:
|
54
|
-
|
55
|
-
a) under this License, provided that you make a good faith effort to
|
56
|
-
ensure that, in the event an Application does not supply the
|
57
|
-
function or data, the facility still operates, and performs
|
58
|
-
whatever part of its purpose remains meaningful, or
|
59
|
-
|
60
|
-
b) under the GNU GPL, with none of the additional permissions of
|
61
|
-
this License applicable to that copy.
|
62
|
-
|
63
|
-
3. Object Code Incorporating Material from Library Header Files.
|
64
|
-
|
65
|
-
The object code form of an Application may incorporate material from
|
66
|
-
a header file that is part of the Library. You may convey such object
|
67
|
-
code under terms of your choice, provided that, if the incorporated
|
68
|
-
material is not limited to numerical parameters, data structure
|
69
|
-
layouts and accessors, or small macros, inline functions and templates
|
70
|
-
(ten or fewer lines in length), you do both of the following:
|
71
|
-
|
72
|
-
a) Give prominent notice with each copy of the object code that the
|
73
|
-
Library is used in it and that the Library and its use are
|
74
|
-
covered by this License.
|
75
|
-
|
76
|
-
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
-
document.
|
78
|
-
|
79
|
-
4. Combined Works.
|
80
|
-
|
81
|
-
You may convey a Combined Work under terms of your choice that,
|
82
|
-
taken together, effectively do not restrict modification of the
|
83
|
-
portions of the Library contained in the Combined Work and reverse
|
84
|
-
engineering for debugging such modifications, if you also do each of
|
85
|
-
the following:
|
86
|
-
|
87
|
-
a) Give prominent notice with each copy of the Combined Work that
|
88
|
-
the Library is used in it and that the Library and its use are
|
89
|
-
covered by this License.
|
90
|
-
|
91
|
-
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
-
document.
|
93
|
-
|
94
|
-
c) For a Combined Work that displays copyright notices during
|
95
|
-
execution, include the copyright notice for the Library among
|
96
|
-
these notices, as well as a reference directing the user to the
|
97
|
-
copies of the GNU GPL and this license document.
|
98
|
-
|
99
|
-
d) Do one of the following:
|
100
|
-
|
101
|
-
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
-
License, and the Corresponding Application Code in a form
|
103
|
-
suitable for, and under terms that permit, the user to
|
104
|
-
recombine or relink the Application with a modified version of
|
105
|
-
the Linked Version to produce a modified Combined Work, in the
|
106
|
-
manner specified by section 6 of the GNU GPL for conveying
|
107
|
-
Corresponding Source.
|
108
|
-
|
109
|
-
1) Use a suitable shared library mechanism for linking with the
|
110
|
-
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
-
a copy of the Library already present on the user's computer
|
112
|
-
system, and (b) will operate properly with a modified version
|
113
|
-
of the Library that is interface-compatible with the Linked
|
114
|
-
Version.
|
115
|
-
|
116
|
-
e) Provide Installation Information, but only if you would otherwise
|
117
|
-
be required to provide such information under section 6 of the
|
118
|
-
GNU GPL, and only to the extent that such information is
|
119
|
-
necessary to install and execute a modified version of the
|
120
|
-
Combined Work produced by recombining or relinking the
|
121
|
-
Application with a modified version of the Linked Version. (If
|
122
|
-
you use option 4d0, the Installation Information must accompany
|
123
|
-
the Minimal Corresponding Source and Corresponding Application
|
124
|
-
Code. If you use option 4d1, you must provide the Installation
|
125
|
-
Information in the manner specified by section 6 of the GNU GPL
|
126
|
-
for conveying Corresponding Source.)
|
127
|
-
|
128
|
-
5. Combined Libraries.
|
129
|
-
|
130
|
-
You may place library facilities that are a work based on the
|
131
|
-
Library side by side in a single library together with other library
|
132
|
-
facilities that are not Applications and are not covered by this
|
133
|
-
License, and convey such a combined library under terms of your
|
134
|
-
choice, if you do both of the following:
|
135
|
-
|
136
|
-
a) Accompany the combined library with a copy of the same work based
|
137
|
-
on the Library, uncombined with any other library facilities,
|
138
|
-
conveyed under the terms of this License.
|
139
|
-
|
140
|
-
b) Give prominent notice with the combined library that part of it
|
141
|
-
is a work based on the Library, and explaining where to find the
|
142
|
-
accompanying uncombined form of the same work.
|
143
|
-
|
144
|
-
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
-
|
146
|
-
The Free Software Foundation may publish revised and/or new versions
|
147
|
-
of the GNU Lesser General Public License from time to time. Such new
|
148
|
-
versions will be similar in spirit to the present version, but may
|
149
|
-
differ in detail to address new problems or concerns.
|
150
|
-
|
151
|
-
Each version is given a distinguishing version number. If the
|
152
|
-
Library as you received it specifies that a certain numbered version
|
153
|
-
of the GNU Lesser General Public License "or any later version"
|
154
|
-
applies to it, you have the option of following the terms and
|
155
|
-
conditions either of that published version or of any later version
|
156
|
-
published by the Free Software Foundation. If the Library as you
|
157
|
-
received it does not specify a version number of the GNU Lesser
|
158
|
-
General Public License, you may choose any version of the GNU Lesser
|
159
|
-
General Public License ever published by the Free Software Foundation.
|
160
|
-
|
161
|
-
If the Library as you received it specifies that a proxy can decide
|
162
|
-
whether future versions of the GNU Lesser General Public License shall
|
163
|
-
apply, that proxy's public statement of acceptance of any version is
|
164
|
-
permanent authorization for you to choose that version for the
|
165
|
-
Library.
|