-
-
Notifications
You must be signed in to change notification settings - Fork 400
/
index.d.ts
222 lines (206 loc) · 4.8 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/*
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// TypeScript Version: 2.0
/* tslint:disable:max-line-length */
/* tslint:disable:max-file-line-count */
import cdf = require( '@stdlib/stats/base/dists/cauchy/cdf' );
import Cauchy = require( '@stdlib/stats/base/dists/cauchy/ctor' );
import entropy = require( '@stdlib/stats/base/dists/cauchy/entropy' );
import logcdf = require( '@stdlib/stats/base/dists/cauchy/logcdf' );
import logpdf = require( '@stdlib/stats/base/dists/cauchy/logpdf' );
import median = require( '@stdlib/stats/base/dists/cauchy/median' );
import mode = require( '@stdlib/stats/base/dists/cauchy/mode' );
import pdf = require( '@stdlib/stats/base/dists/cauchy/pdf' );
import quantile = require( '@stdlib/stats/base/dists/cauchy/quantile' );
/**
* Interface describing the `cauchy` namespace.
*/
interface Namespace {
/**
* Cauchy distribution cumulative distribution function (CDF).
*
* @param x - input value
* @param x0 - location parameter
* @param gamma - scale parameter
* @returns evaluated CDF
*
* @example
* var y = ns.cdf( 2.0, 0.0, 1.0 );
* // returns ~0.852
*
* var mycdf = ns.cdf.factory( 1.5, 3.0 );
*
* y = mycdf( 1.0 );
* // returns ~0.447
*/
cdf: typeof cdf;
/**
* Cauchy distribution.
*/
Cauchy: typeof Cauchy;
/**
* Returns the differential entropy of a Cauchy distribution.
*
* ## Notes
*
* - If provided `gamma <= 0`, the function returns `NaN`.
*
* @param x0 - location parameter
* @param gamma - scale parameter
* @returns entropy
*
* @example
* var v = ns.entropy( 10.0, 5.0 );
* // returns ~4.14
*
* @example
* var v = ns.entropy( 7.0, 0.1 );
* // returns ~0.228
*
* @example
* var v = ns.entropy( 10.0, -0.5 );
* // returns NaN
*/
entropy: typeof entropy;
/**
* Cauchy distribution logarithm of cumulative distribution function (CDF).
*
* @param x - input value
* @param x0 - location parameter
* @param gamma - scale parameter
* @returns evaluated logCDF
*
* @example
* var y = ns.logcdf( 2.0, 0.0, 1.0 );
* // returns ~-0.16
*
* var mylogcdf = ns.logcdf.factory( 1.5, 3.0 );
*
* y = mylogcdf( 1.0 );
* // returns ~-0.805
*/
logcdf: typeof logcdf;
/**
* Cauchy distribution natural logarithm of probability density function (logPDF).
*
* @param x - input value
* @param x0 - location parameter
* @param gamma - scale parameter
* @returns evaluated logPDF
*
* @example
* var y = ns.logpdf( 2.0, 0.0, 1.0 );
* // returns ~-2.765
*
* var mylogpdf = ns.logpdf.factory( 10.0, 2.0 );
*
* y = mylogpdf( 10.0 );
* // returns ~-1.839
*/
logpdf: typeof logpdf;
/**
* Returns the median of a Cauchy distribution.
*
* ## Notes
*
* - If provided `gamma <= 0`, the function returns `NaN`.
*
* @param x0 - location parameter
* @param gamma - scale parameter
* @returns median
*
* @example
* var v = ns.median( 10.0, 5.0 );
* // returns 10.0
*
* @example
* var v = ns.median( 7.0, 0.1 );
* // returns 7.0
*
* @example
* var v = ns.median( 10.0, -0.5 );
* // returns NaN
*/
median: typeof median;
/**
* Returns the mode of a Cauchy distribution.
*
* ## Notes
*
* - If provided `gamma <= 0`, the function returns `NaN`.
*
* @param x0 - location parameter
* @param gamma - scale parameter
* @returns mode
*
* @example
* var v = ns.mode( 10.0, 5.0 );
* // returns 10.0
*
* @example
* var v = ns.mode( 7.0, 0.1 );
* // returns 7.0
*
* @example
* var v = ns.mode( 10.0, -0.5 );
* // returns NaN
*/
mode: typeof mode;
/**
* Cauchy distribution probability density function (PDF).
*
* @param x - input value
* @param x0 - location parameter
* @param gamma - scale parameter
* @returns evaluated PDF
*
* @example
* var y = ns.pdf( 2.0, 0.0, 1.0 );
* // returns ~0.063
*
* var mypdf = factory( 10.0, 2.0 );
*
* y = mypdf( 10.0 );
* // returns ~0.159
*/
pdf: typeof pdf;
/**
* Cauchy distribution quantile function.
*
* @param p - input value
* @param x0 - location parameter
* @param gamma - scale parameter
* @returns evaluated quantile function
*
* @example
* var y = ns.quantile( 0.8, 0.0, 1.0 );
* // returns ~1.376
*
* var myQuantile = ns.quantile.factory( 10.0, 2.0 );
*
* y = myQuantile( 0.5 );
* // returns 10.0
*/
quantile: typeof quantile;
}
/**
* Cauchy distribution.
*/
declare var ns: Namespace;
// EXPORTS //
export = ns;