@sipemu/anofox-statistics 0.4.1 → 0.4.2
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.
- package/README.md +114 -32
- package/anofox_statistics_js.d.ts +50 -9
- package/anofox_statistics_js.js +148 -62
- package/anofox_statistics_js_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ import init, {
|
|
|
26
26
|
// Initialize the WASM module
|
|
27
27
|
await init();
|
|
28
28
|
|
|
29
|
-
// Two-sample t-test
|
|
29
|
+
// Two-sample Welch's t-test
|
|
30
30
|
const result = tTest(
|
|
31
31
|
new Float64Array([1.2, 2.3, 3.1, 4.5, 5.2]),
|
|
32
32
|
new Float64Array([2.1, 3.4, 4.2, 5.6, 6.1]),
|
|
@@ -45,7 +45,6 @@ console.log(result);
|
|
|
45
45
|
```javascript
|
|
46
46
|
const { tTest, JsTTestKind, JsAlternative } = require('@sipemu/anofox-statistics');
|
|
47
47
|
|
|
48
|
-
// Use directly (WASM auto-initializes)
|
|
49
48
|
const result = tTest(
|
|
50
49
|
new Float64Array([1.2, 2.3, 3.1]),
|
|
51
50
|
new Float64Array([2.1, 3.4, 4.2]),
|
|
@@ -63,6 +62,8 @@ const result = tTest(
|
|
|
63
62
|
| `tTest` | Student's, Welch's, or paired t-test |
|
|
64
63
|
| `yuenTest` | Yuen's test for trimmed means (robust) |
|
|
65
64
|
| `oneWayAnova` | One-way ANOVA (Fisher or Welch) |
|
|
65
|
+
| `twoWayAnova` | Two-way ANOVA with interaction |
|
|
66
|
+
| `repeatedMeasuresAnova` | One-way RM-ANOVA with sphericity test and GG/HF corrections |
|
|
66
67
|
| `brownForsythe` | Brown-Forsythe test for homogeneity of variances |
|
|
67
68
|
|
|
68
69
|
### Nonparametric Tests
|
|
@@ -73,44 +74,62 @@ const result = tTest(
|
|
|
73
74
|
| `wilcoxonSignedRank` | Wilcoxon signed-rank test |
|
|
74
75
|
| `kruskalWallis` | Kruskal-Wallis H test |
|
|
75
76
|
| `brunnerMunzel` | Brunner-Munzel test |
|
|
77
|
+
| `rank` | Rank a sample, with average rank assigned to ties |
|
|
76
78
|
|
|
77
79
|
### Distributional Tests
|
|
78
80
|
|
|
79
81
|
| Function | Description |
|
|
80
82
|
|----------|-------------|
|
|
81
83
|
| `shapiroWilk` | Shapiro-Wilk normality test |
|
|
82
|
-
| `
|
|
83
|
-
| `andersonDarling` | Anderson-Darling normality test |
|
|
84
|
-
| `jarqueBera` | Jarque-Bera normality test |
|
|
84
|
+
| `dagostinoKSquared` | D'Agostino's K² omnibus normality test |
|
|
85
85
|
|
|
86
86
|
### Categorical Tests
|
|
87
87
|
|
|
88
88
|
| Function | Description |
|
|
89
89
|
|----------|-------------|
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
90
|
+
| `chiSquareTest` | Chi-square test of independence (with optional Yates correction) |
|
|
91
|
+
| `chiSquareGoodnessOfFit` | Chi-square goodness-of-fit test |
|
|
92
|
+
| `gTest` | G-test (likelihood-ratio chi-square) |
|
|
93
|
+
| `fisherExact` | Fisher's exact test (2×2 tables) |
|
|
94
|
+
| `binomTest` | Exact binomial test |
|
|
93
95
|
| `mcnemarTest` | McNemar's test for paired proportions |
|
|
96
|
+
| `mcnemarExact` | Exact McNemar test for small samples |
|
|
97
|
+
| `propTestOne` | One-sample proportion test |
|
|
98
|
+
| `propTestTwo` | Two-sample proportion test |
|
|
99
|
+
| `cohenKappa` | Cohen's kappa for inter-rater agreement |
|
|
100
|
+
| `cramersV` | Cramér's V effect size |
|
|
101
|
+
| `phiCoefficient` | Phi coefficient (2×2 tables) |
|
|
102
|
+
| `contingencyCoefficient` | Pearson's contingency coefficient |
|
|
94
103
|
|
|
95
104
|
### Correlation Tests
|
|
96
105
|
|
|
97
106
|
| Function | Description |
|
|
98
107
|
|----------|-------------|
|
|
99
|
-
| `pearsonCorrelation` | Pearson correlation
|
|
108
|
+
| `pearsonCorrelation` | Pearson product-moment correlation |
|
|
100
109
|
| `spearmanCorrelation` | Spearman rank correlation |
|
|
101
110
|
| `kendallCorrelation` | Kendall's tau correlation |
|
|
102
|
-
| `
|
|
111
|
+
| `partialCorrelation` | Partial correlation (controlling for covariates) |
|
|
112
|
+
| `semiPartialCorrelation` | Semi-partial (part) correlation |
|
|
113
|
+
| `intraclassCorrelation` | Intraclass correlation coefficient |
|
|
114
|
+
| `distanceCorrelation` | Distance correlation (Székely-Rizzo) |
|
|
115
|
+
| `distanceCorrelationTest` | Distance correlation independence test |
|
|
103
116
|
|
|
104
117
|
### Equivalence Tests (TOST)
|
|
105
118
|
|
|
106
119
|
| Function | Description |
|
|
107
120
|
|----------|-------------|
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
|
|
113
|
-
|
|
121
|
+
| `tostTTestOneSample` | One-sample TOST |
|
|
122
|
+
| `tostTTestTwoSample` | Two-sample TOST (Welch / Student) |
|
|
123
|
+
| `tostTTestPaired` | Paired TOST |
|
|
124
|
+
| `tostCorrelation` | Correlation equivalence (Pearson / Spearman) |
|
|
125
|
+
| `tostPropOne` | One-proportion TOST |
|
|
126
|
+
| `tostPropTwo` | Two-proportion TOST |
|
|
127
|
+
| `tostWilcoxonPaired` | Paired Wilcoxon TOST |
|
|
128
|
+
| `tostWilcoxonTwoSample` | Two-sample Wilcoxon (Mann-Whitney) TOST |
|
|
129
|
+
| `tostYuen` | Trimmed-mean (Yuen) TOST |
|
|
130
|
+
| `tostBootstrap` | Bootstrap TOST with percentile CI |
|
|
131
|
+
|
|
132
|
+
### Modern / Kernel Tests
|
|
114
133
|
|
|
115
134
|
| Function | Description |
|
|
116
135
|
|----------|-------------|
|
|
@@ -129,13 +148,11 @@ const result = tTest(
|
|
|
129
148
|
| `mspeAdjustedSpa` | MSPE-adjusted SPA test |
|
|
130
149
|
| `modelConfidenceSet` | Model Confidence Set procedure |
|
|
131
150
|
|
|
132
|
-
### Resampling
|
|
151
|
+
### Resampling
|
|
133
152
|
|
|
134
153
|
| Function | Description |
|
|
135
154
|
|----------|-------------|
|
|
136
155
|
| `permutationTTest` | Permutation t-test |
|
|
137
|
-
| `permutationCorrelation` | Permutation correlation test |
|
|
138
|
-
| `bootstrapCI` | Bootstrap confidence intervals |
|
|
139
156
|
|
|
140
157
|
## Enums
|
|
141
158
|
|
|
@@ -149,13 +166,22 @@ enum JsAlternative { TwoSided, Less, Greater }
|
|
|
149
166
|
// ANOVA variants
|
|
150
167
|
enum JsAnovaKind { Fisher, Welch }
|
|
151
168
|
|
|
169
|
+
// Kendall correlation variants
|
|
170
|
+
enum JsKendallVariant { TauA, TauB, TauC }
|
|
171
|
+
|
|
172
|
+
// Intraclass correlation forms
|
|
173
|
+
enum JsICCType { ICC1, ICC2, ICC3, ICC1k, ICC2k, ICC3k }
|
|
174
|
+
|
|
175
|
+
// Method for correlation TOST
|
|
176
|
+
enum JsCorrelationTostMethod { Pearson, Spearman }
|
|
177
|
+
|
|
152
178
|
// Kernel types for MMD
|
|
153
179
|
enum JsKernel { Gaussian, Laplacian, Linear }
|
|
154
180
|
|
|
155
181
|
// Loss functions for forecast comparison
|
|
156
182
|
enum JsLossFunction { SquaredError, AbsoluteError }
|
|
157
183
|
|
|
158
|
-
// Variance estimators
|
|
184
|
+
// Variance estimators (Diebold-Mariano)
|
|
159
185
|
enum JsVarEstimator { Acf, Bartlett }
|
|
160
186
|
|
|
161
187
|
// MCS statistics
|
|
@@ -167,7 +193,7 @@ enum JsMCSStatistic { Max, Range }
|
|
|
167
193
|
### Normality Testing
|
|
168
194
|
|
|
169
195
|
```javascript
|
|
170
|
-
import init, { shapiroWilk,
|
|
196
|
+
import init, { shapiroWilk, dagostinoKSquared } from '@sipemu/anofox-statistics';
|
|
171
197
|
|
|
172
198
|
await init();
|
|
173
199
|
|
|
@@ -176,11 +202,11 @@ const data = new Float64Array([2.3, 3.1, 2.8, 3.5, 2.9, 3.2, 2.7]);
|
|
|
176
202
|
const sw = shapiroWilk(data);
|
|
177
203
|
console.log(`Shapiro-Wilk: W=${sw.statistic.toFixed(4)}, p=${sw.p_value.toFixed(4)}`);
|
|
178
204
|
|
|
179
|
-
const
|
|
180
|
-
console.log(`
|
|
205
|
+
const dk = dagostinoKSquared(data);
|
|
206
|
+
console.log(`D'Agostino K²: K²=${dk.statistic.toFixed(4)}, p=${dk.p_value.toFixed(4)}`);
|
|
181
207
|
```
|
|
182
208
|
|
|
183
|
-
### ANOVA
|
|
209
|
+
### One-Way ANOVA
|
|
184
210
|
|
|
185
211
|
```javascript
|
|
186
212
|
import init, { oneWayAnova, JsAnovaKind } from '@sipemu/anofox-statistics';
|
|
@@ -198,20 +224,61 @@ console.log(`F(${result.df_between}, ${result.df_within}) = ${result.statistic.t
|
|
|
198
224
|
console.log(`p-value: ${result.p_value.toFixed(6)}`);
|
|
199
225
|
```
|
|
200
226
|
|
|
227
|
+
### Two-Way ANOVA
|
|
228
|
+
|
|
229
|
+
```javascript
|
|
230
|
+
import init, { twoWayAnova } from '@sipemu/anofox-statistics';
|
|
231
|
+
|
|
232
|
+
await init();
|
|
233
|
+
|
|
234
|
+
// 2 (factor A) × 3 (factor B) design, 2 reps per cell
|
|
235
|
+
const values = new Float64Array([10, 12, 20, 22, 30, 32, 15, 17, 25, 27, 35, 37]);
|
|
236
|
+
const factorA = new Uint32Array([ 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]);
|
|
237
|
+
const factorB = new Uint32Array([ 0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 2, 2]);
|
|
238
|
+
|
|
239
|
+
const result = twoWayAnova(values, factorA, factorB);
|
|
240
|
+
console.log(`Factor A: F=${result.factor_a.f_statistic.toFixed(2)}, p=${result.factor_a.p_value.toFixed(4)}`);
|
|
241
|
+
console.log(`Factor B: F=${result.factor_b.f_statistic.toFixed(2)}, p=${result.factor_b.p_value.toFixed(4)}`);
|
|
242
|
+
console.log(`A×B: F=${result.interaction.f_statistic.toFixed(2)}, p=${result.interaction.p_value.toFixed(4)}`);
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Repeated-Measures ANOVA
|
|
246
|
+
|
|
247
|
+
```javascript
|
|
248
|
+
import init, { repeatedMeasuresAnova } from '@sipemu/anofox-statistics';
|
|
249
|
+
|
|
250
|
+
await init();
|
|
251
|
+
|
|
252
|
+
// Rows = subjects, columns = conditions
|
|
253
|
+
const data = [
|
|
254
|
+
new Float64Array([10, 12, 15]),
|
|
255
|
+
new Float64Array([11, 14, 17]),
|
|
256
|
+
new Float64Array([ 9, 13, 16]),
|
|
257
|
+
new Float64Array([12, 15, 18]),
|
|
258
|
+
];
|
|
259
|
+
|
|
260
|
+
const result = repeatedMeasuresAnova(data, /* computeSphericity */ true);
|
|
261
|
+
console.log(`Within-subjects: F=${result.within_subjects.f_statistic.toFixed(2)}, p=${result.within_subjects.p_value.toFixed(4)}`);
|
|
262
|
+
if (result.sphericity) {
|
|
263
|
+
console.log(`Mauchly W=${result.sphericity.w.toFixed(4)}, p=${result.sphericity.p_value.toFixed(4)}`);
|
|
264
|
+
console.log(`Greenhouse-Geisser p=${result.greenhouse_geisser.p_value.toFixed(4)}`);
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
201
268
|
### Equivalence Testing (TOST)
|
|
202
269
|
|
|
203
270
|
```javascript
|
|
204
|
-
import init, {
|
|
271
|
+
import init, { tostTTestTwoSample, JsTTestKind } from '@sipemu/anofox-statistics';
|
|
205
272
|
|
|
206
273
|
await init();
|
|
207
274
|
|
|
208
275
|
const treatment = new Float64Array([10.2, 11.1, 9.8, 10.5, 10.9]);
|
|
209
|
-
const control
|
|
276
|
+
const control = new Float64Array([10.0, 10.8, 9.9, 10.3, 10.7]);
|
|
210
277
|
|
|
211
|
-
// Test equivalence within
|
|
212
|
-
const result =
|
|
278
|
+
// Test equivalence within ±1.0 of zero difference
|
|
279
|
+
const result = tostTTestTwoSample(treatment, control, -1.0, 1.0, JsTTestKind.Welch, 0.05);
|
|
213
280
|
console.log(`Equivalent: ${result.equivalent}`);
|
|
214
|
-
console.log(`TOST p-value: ${result.
|
|
281
|
+
console.log(`TOST p-value: ${result.tost_p_value.toFixed(4)}`);
|
|
215
282
|
```
|
|
216
283
|
|
|
217
284
|
### Forecast Model Comparison
|
|
@@ -233,7 +300,7 @@ const dm = dieboldMariano(
|
|
|
233
300
|
errors1,
|
|
234
301
|
errors2,
|
|
235
302
|
JsLossFunction.SquaredError,
|
|
236
|
-
1,
|
|
303
|
+
1, // horizon
|
|
237
304
|
JsAlternative.TwoSided,
|
|
238
305
|
JsVarEstimator.Bartlett
|
|
239
306
|
);
|
|
@@ -268,11 +335,26 @@ console.log(result.p_value);
|
|
|
268
335
|
|
|
269
336
|
## Validation
|
|
270
337
|
|
|
271
|
-
All statistical tests are validated against R's implementation using extensive test suites. Results match R's output within numerical precision (typically 10
|
|
338
|
+
All statistical tests are validated against R's implementation using extensive test suites. Results match R's output within numerical precision (typically 10⁻¹⁰).
|
|
339
|
+
|
|
340
|
+
## Changelog
|
|
341
|
+
|
|
342
|
+
### 0.4.2
|
|
343
|
+
|
|
344
|
+
- **Fixed:** p-values smaller than ~1.4×10⁻¹⁴ no longer underflow to `0.0`. The
|
|
345
|
+
underlying Rust library now uses each distribution's survival function (`sf`)
|
|
346
|
+
instead of `1 - cdf(x)` everywhere a tail probability is computed. Affects all
|
|
347
|
+
tests that use a normal, Student's t, chi-square, or F approximation
|
|
348
|
+
(Mann-Whitney, Wilcoxon, t/Welch/paired, Yuen, every ANOVA variant, Levene,
|
|
349
|
+
Brunner-Munzel, Kruskal-Wallis, chi-square, McNemar, Shapiro-Wilk, D'Agostino,
|
|
350
|
+
Pearson/Spearman/Kendall/partial correlation, ICC, proportion tests, Cohen's
|
|
351
|
+
kappa, Diebold-Mariano, Clark-West, and all TOST variants).
|
|
352
|
+
- **Added:** `rank`, `twoWayAnova`, `repeatedMeasuresAnova` bindings — the JS
|
|
353
|
+
package now exposes the same statistical surface as the Rust crate.
|
|
272
354
|
|
|
273
355
|
## License
|
|
274
356
|
|
|
275
|
-
MIT License
|
|
357
|
+
MIT License — see [LICENSE](LICENSE) for details.
|
|
276
358
|
|
|
277
359
|
## Links
|
|
278
360
|
|
|
@@ -442,6 +442,28 @@ export function propTestOne(successes: number, trials: number, p0: number, alter
|
|
|
442
442
|
*/
|
|
443
443
|
export function propTestTwo(successes1: number, trials1: number, successes2: number, trials2: number, alternative: JsAlternative, correction?: boolean | null): any;
|
|
444
444
|
|
|
445
|
+
/**
|
|
446
|
+
* Rank a sample, assigning the average rank to ties.
|
|
447
|
+
*
|
|
448
|
+
* @param data - Input sample as Float64Array
|
|
449
|
+
* @returns Float64Array of ranks (length matches input)
|
|
450
|
+
*/
|
|
451
|
+
export function rank(data: Float64Array): Float64Array;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* One-way repeated-measures ANOVA.
|
|
455
|
+
*
|
|
456
|
+
* @param data - Array of subjects, each subject is a Float64Array whose
|
|
457
|
+
* entries are that subject's measurements across conditions. All inner
|
|
458
|
+
* arrays must have the same length.
|
|
459
|
+
* @param computeSphericity - If true, also compute Mauchly's test and
|
|
460
|
+
* Greenhouse-Geisser / Huynh-Feldt corrections (requires k >= 3 conditions).
|
|
461
|
+
* @returns Object with within_subjects, subjects, error, total rows; optional
|
|
462
|
+
* sphericity, greenhouse_geisser, huynh_feldt; grand_mean, condition_means,
|
|
463
|
+
* subject_means.
|
|
464
|
+
*/
|
|
465
|
+
export function repeatedMeasuresAnova(data: Array<any>, compute_sphericity?: boolean | null): any;
|
|
466
|
+
|
|
445
467
|
/**
|
|
446
468
|
* Semi-partial (part) correlation.
|
|
447
469
|
*
|
|
@@ -628,6 +650,22 @@ export function tostWilcoxonTwoSample(x: Float64Array, y: Float64Array, lower_bo
|
|
|
628
650
|
*/
|
|
629
651
|
export function tostYuen(x: Float64Array, y: Float64Array, lower_bound: number, upper_bound: number, trim?: number | null, alpha?: number | null): any;
|
|
630
652
|
|
|
653
|
+
/**
|
|
654
|
+
* Two-way ANOVA with interaction.
|
|
655
|
+
*
|
|
656
|
+
* All three input arrays must have the same length. `factorA` and `factorB`
|
|
657
|
+
* hold the factor-level index for each observation (0-based; the number of
|
|
658
|
+
* levels is inferred from the maximum index plus one).
|
|
659
|
+
*
|
|
660
|
+
* @param values - Observations as Float64Array
|
|
661
|
+
* @param factorA - Factor A level index per observation as Uint32Array
|
|
662
|
+
* @param factorB - Factor B level index per observation as Uint32Array
|
|
663
|
+
* @returns Object with factor_a, factor_b, interaction, residual, total rows
|
|
664
|
+
* (each: ss, df, ms, f_statistic, p_value), plus levels_a, levels_b, n,
|
|
665
|
+
* grand_mean, cell_means, marginal_means_a, marginal_means_b.
|
|
666
|
+
*/
|
|
667
|
+
export function twoWayAnova(values: Float64Array, factor_a: Uint32Array, factor_b: Uint32Array): any;
|
|
668
|
+
|
|
631
669
|
/**
|
|
632
670
|
* Wilcoxon signed-rank test.
|
|
633
671
|
*
|
|
@@ -671,6 +709,12 @@ export interface InitOutput {
|
|
|
671
709
|
readonly phiCoefficient: (a: any) => [number, number, number];
|
|
672
710
|
readonly propTestOne: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
673
711
|
readonly propTestTwo: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
712
|
+
readonly brownForsythe: (a: any) => [number, number, number];
|
|
713
|
+
readonly oneWayAnova: (a: any, b: number) => [number, number, number];
|
|
714
|
+
readonly repeatedMeasuresAnova: (a: any, b: number) => [number, number, number];
|
|
715
|
+
readonly tTest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
716
|
+
readonly twoWayAnova: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
717
|
+
readonly yuenTest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
674
718
|
readonly tostBootstrap: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: bigint) => [number, number, number];
|
|
675
719
|
readonly tostCorrelation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
676
720
|
readonly tostPropOne: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
@@ -689,28 +733,25 @@ export interface InitOutput {
|
|
|
689
733
|
readonly pearsonCorrelation: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
690
734
|
readonly semiPartialCorrelation: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
|
|
691
735
|
readonly spearmanCorrelation: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
736
|
+
readonly getVersion: () => [number, number];
|
|
737
|
+
readonly start: () => void;
|
|
692
738
|
readonly clarkWest: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
693
739
|
readonly dieboldMariano: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
694
740
|
readonly modelConfidenceSet: (a: any, b: number, c: number, d: number, e: number, f: number, g: number, h: bigint) => [number, number, number];
|
|
695
741
|
readonly mspeAdjustedSpa: (a: number, b: number, c: any, d: number, e: number, f: number, g: bigint) => [number, number, number];
|
|
696
742
|
readonly spaTest: (a: number, b: number, c: any, d: number, e: number, f: number, g: bigint) => [number, number, number];
|
|
697
|
-
readonly brownForsythe: (a: any) => [number, number, number];
|
|
698
|
-
readonly oneWayAnova: (a: any, b: number) => [number, number, number];
|
|
699
|
-
readonly tTest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
700
|
-
readonly yuenTest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
701
743
|
readonly brunnerMunzel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
702
744
|
readonly kruskalWallis: (a: any) => [number, number, number];
|
|
703
745
|
readonly mannWhitneyU: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => [number, number, number];
|
|
746
|
+
readonly rank: (a: number, b: number) => [number, number, number, number];
|
|
704
747
|
readonly wilcoxonSignedRank: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => [number, number, number];
|
|
748
|
+
readonly dagostinoKSquared: (a: number, b: number) => [number, number, number];
|
|
749
|
+
readonly permutationTTest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: bigint) => [number, number, number];
|
|
750
|
+
readonly shapiroWilk: (a: number, b: number) => [number, number, number];
|
|
705
751
|
readonly energyDistanceTest: (a: any, b: any, c: number, d: number, e: bigint) => [number, number, number];
|
|
706
752
|
readonly energyDistanceTest1d: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint) => [number, number, number];
|
|
707
753
|
readonly mmdTest: (a: any, b: any, c: number, d: number, e: number, f: number, g: number, h: bigint) => [number, number, number];
|
|
708
754
|
readonly mmdTest1d: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint) => [number, number, number];
|
|
709
|
-
readonly dagostinoKSquared: (a: number, b: number) => [number, number, number];
|
|
710
|
-
readonly getVersion: () => [number, number];
|
|
711
|
-
readonly permutationTTest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: bigint) => [number, number, number];
|
|
712
|
-
readonly shapiroWilk: (a: number, b: number) => [number, number, number];
|
|
713
|
-
readonly start: () => void;
|
|
714
755
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
715
756
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
716
757
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/anofox_statistics_js.js
CHANGED
|
@@ -367,7 +367,7 @@ export function distanceCorrelationTest(x, y, n_permutations, seed) {
|
|
|
367
367
|
const len0 = WASM_VECTOR_LEN;
|
|
368
368
|
const ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
369
369
|
const len1 = WASM_VECTOR_LEN;
|
|
370
|
-
const ret = wasm.distanceCorrelationTest(ptr0, len0, ptr1, len1, isLikeNone(n_permutations) ?
|
|
370
|
+
const ret = wasm.distanceCorrelationTest(ptr0, len0, ptr1, len1, isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
371
371
|
if (ret[2]) {
|
|
372
372
|
throw takeFromExternrefTable0(ret[1]);
|
|
373
373
|
}
|
|
@@ -389,7 +389,7 @@ export function distanceCorrelationTest(x, y, n_permutations, seed) {
|
|
|
389
389
|
* @returns {any}
|
|
390
390
|
*/
|
|
391
391
|
export function energyDistanceTest(x, y, n_permutations, seed) {
|
|
392
|
-
const ret = wasm.energyDistanceTest(x, y, isLikeNone(n_permutations) ?
|
|
392
|
+
const ret = wasm.energyDistanceTest(x, y, isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
393
393
|
if (ret[2]) {
|
|
394
394
|
throw takeFromExternrefTable0(ret[1]);
|
|
395
395
|
}
|
|
@@ -417,7 +417,7 @@ export function energyDistanceTest1d(x, y, n_permutations, seed) {
|
|
|
417
417
|
const len0 = WASM_VECTOR_LEN;
|
|
418
418
|
const ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
419
419
|
const len1 = WASM_VECTOR_LEN;
|
|
420
|
-
const ret = wasm.energyDistanceTest1d(ptr0, len0, ptr1, len1, isLikeNone(n_permutations) ?
|
|
420
|
+
const ret = wasm.energyDistanceTest1d(ptr0, len0, ptr1, len1, isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
421
421
|
if (ret[2]) {
|
|
422
422
|
throw takeFromExternrefTable0(ret[1]);
|
|
423
423
|
}
|
|
@@ -617,7 +617,7 @@ export function mcnemarTest(table, correction) {
|
|
|
617
617
|
* @returns {any}
|
|
618
618
|
*/
|
|
619
619
|
export function mmdTest(x, y, kernel, bandwidth, n_permutations, seed) {
|
|
620
|
-
const ret = wasm.mmdTest(x, y, kernel, !isLikeNone(bandwidth), isLikeNone(bandwidth) ? 0 : bandwidth, isLikeNone(n_permutations) ?
|
|
620
|
+
const ret = wasm.mmdTest(x, y, kernel, !isLikeNone(bandwidth), isLikeNone(bandwidth) ? 0 : bandwidth, isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
621
621
|
if (ret[2]) {
|
|
622
622
|
throw takeFromExternrefTable0(ret[1]);
|
|
623
623
|
}
|
|
@@ -645,7 +645,7 @@ export function mmdTest1d(x, y, n_permutations, seed) {
|
|
|
645
645
|
const len0 = WASM_VECTOR_LEN;
|
|
646
646
|
const ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
647
647
|
const len1 = WASM_VECTOR_LEN;
|
|
648
|
-
const ret = wasm.mmdTest1d(ptr0, len0, ptr1, len1, isLikeNone(n_permutations) ?
|
|
648
|
+
const ret = wasm.mmdTest1d(ptr0, len0, ptr1, len1, isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
649
649
|
if (ret[2]) {
|
|
650
650
|
throw takeFromExternrefTable0(ret[1]);
|
|
651
651
|
}
|
|
@@ -673,7 +673,7 @@ export function mmdTest1d(x, y, n_permutations, seed) {
|
|
|
673
673
|
* @returns {any}
|
|
674
674
|
*/
|
|
675
675
|
export function modelConfidenceSet(losses, alpha, statistic, n_bootstrap, block_length, seed) {
|
|
676
|
-
const ret = wasm.modelConfidenceSet(losses, !isLikeNone(alpha), isLikeNone(alpha) ? 0 : alpha, statistic, isLikeNone(n_bootstrap) ?
|
|
676
|
+
const ret = wasm.modelConfidenceSet(losses, !isLikeNone(alpha), isLikeNone(alpha) ? 0 : alpha, statistic, isLikeNone(n_bootstrap) ? Number.MAX_SAFE_INTEGER : (n_bootstrap) >>> 0, block_length, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
677
677
|
if (ret[2]) {
|
|
678
678
|
throw takeFromExternrefTable0(ret[1]);
|
|
679
679
|
}
|
|
@@ -699,7 +699,7 @@ export function modelConfidenceSet(losses, alpha, statistic, n_bootstrap, block_
|
|
|
699
699
|
export function mspeAdjustedSpa(benchmark_errors, model_errors, n_bootstrap, block_length, seed) {
|
|
700
700
|
const ptr0 = passArrayF64ToWasm0(benchmark_errors, wasm.__wbindgen_malloc);
|
|
701
701
|
const len0 = WASM_VECTOR_LEN;
|
|
702
|
-
const ret = wasm.mspeAdjustedSpa(ptr0, len0, model_errors, isLikeNone(n_bootstrap) ?
|
|
702
|
+
const ret = wasm.mspeAdjustedSpa(ptr0, len0, model_errors, isLikeNone(n_bootstrap) ? Number.MAX_SAFE_INTEGER : (n_bootstrap) >>> 0, block_length, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
703
703
|
if (ret[2]) {
|
|
704
704
|
throw takeFromExternrefTable0(ret[1]);
|
|
705
705
|
}
|
|
@@ -793,7 +793,7 @@ export function permutationTTest(x, y, alternative, n_permutations, seed) {
|
|
|
793
793
|
const len0 = WASM_VECTOR_LEN;
|
|
794
794
|
const ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
795
795
|
const len1 = WASM_VECTOR_LEN;
|
|
796
|
-
const ret = wasm.permutationTTest(ptr0, len0, ptr1, len1, alternative, isLikeNone(n_permutations) ?
|
|
796
|
+
const ret = wasm.permutationTTest(ptr0, len0, ptr1, len1, alternative, isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
797
797
|
if (ret[2]) {
|
|
798
798
|
throw takeFromExternrefTable0(ret[1]);
|
|
799
799
|
}
|
|
@@ -864,6 +864,49 @@ export function propTestTwo(successes1, trials1, successes2, trials2, alternativ
|
|
|
864
864
|
return takeFromExternrefTable0(ret[0]);
|
|
865
865
|
}
|
|
866
866
|
|
|
867
|
+
/**
|
|
868
|
+
* Rank a sample, assigning the average rank to ties.
|
|
869
|
+
*
|
|
870
|
+
* @param data - Input sample as Float64Array
|
|
871
|
+
* @returns Float64Array of ranks (length matches input)
|
|
872
|
+
* @param {Float64Array} data
|
|
873
|
+
* @returns {Float64Array}
|
|
874
|
+
*/
|
|
875
|
+
export function rank(data) {
|
|
876
|
+
const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
|
|
877
|
+
const len0 = WASM_VECTOR_LEN;
|
|
878
|
+
const ret = wasm.rank(ptr0, len0);
|
|
879
|
+
if (ret[3]) {
|
|
880
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
881
|
+
}
|
|
882
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
883
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
884
|
+
return v2;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* One-way repeated-measures ANOVA.
|
|
889
|
+
*
|
|
890
|
+
* @param data - Array of subjects, each subject is a Float64Array whose
|
|
891
|
+
* entries are that subject's measurements across conditions. All inner
|
|
892
|
+
* arrays must have the same length.
|
|
893
|
+
* @param computeSphericity - If true, also compute Mauchly's test and
|
|
894
|
+
* Greenhouse-Geisser / Huynh-Feldt corrections (requires k >= 3 conditions).
|
|
895
|
+
* @returns Object with within_subjects, subjects, error, total rows; optional
|
|
896
|
+
* sphericity, greenhouse_geisser, huynh_feldt; grand_mean, condition_means,
|
|
897
|
+
* subject_means.
|
|
898
|
+
* @param {Array<any>} data
|
|
899
|
+
* @param {boolean | null} [compute_sphericity]
|
|
900
|
+
* @returns {any}
|
|
901
|
+
*/
|
|
902
|
+
export function repeatedMeasuresAnova(data, compute_sphericity) {
|
|
903
|
+
const ret = wasm.repeatedMeasuresAnova(data, isLikeNone(compute_sphericity) ? 0xFFFFFF : compute_sphericity ? 1 : 0);
|
|
904
|
+
if (ret[2]) {
|
|
905
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
906
|
+
}
|
|
907
|
+
return takeFromExternrefTable0(ret[0]);
|
|
908
|
+
}
|
|
909
|
+
|
|
867
910
|
/**
|
|
868
911
|
* Semi-partial (part) correlation.
|
|
869
912
|
*
|
|
@@ -927,7 +970,7 @@ export function shapiroWilk(x) {
|
|
|
927
970
|
export function spaTest(benchmark_losses, model_losses, n_bootstrap, block_length, seed) {
|
|
928
971
|
const ptr0 = passArrayF64ToWasm0(benchmark_losses, wasm.__wbindgen_malloc);
|
|
929
972
|
const len0 = WASM_VECTOR_LEN;
|
|
930
|
-
const ret = wasm.spaTest(ptr0, len0, model_losses, isLikeNone(n_bootstrap) ?
|
|
973
|
+
const ret = wasm.spaTest(ptr0, len0, model_losses, isLikeNone(n_bootstrap) ? Number.MAX_SAFE_INTEGER : (n_bootstrap) >>> 0, block_length, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
931
974
|
if (ret[2]) {
|
|
932
975
|
throw takeFromExternrefTable0(ret[1]);
|
|
933
976
|
}
|
|
@@ -1017,7 +1060,7 @@ export function tostBootstrap(x, y, lower_bound, upper_bound, alpha, n_bootstrap
|
|
|
1017
1060
|
const len0 = WASM_VECTOR_LEN;
|
|
1018
1061
|
const ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1019
1062
|
const len1 = WASM_VECTOR_LEN;
|
|
1020
|
-
const ret = wasm.tostBootstrap(ptr0, len0, ptr1, len1, lower_bound, upper_bound, !isLikeNone(alpha), isLikeNone(alpha) ? 0 : alpha, isLikeNone(n_bootstrap) ?
|
|
1063
|
+
const ret = wasm.tostBootstrap(ptr0, len0, ptr1, len1, lower_bound, upper_bound, !isLikeNone(alpha), isLikeNone(alpha) ? 0 : alpha, isLikeNone(n_bootstrap) ? Number.MAX_SAFE_INTEGER : (n_bootstrap) >>> 0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
|
|
1021
1064
|
if (ret[2]) {
|
|
1022
1065
|
throw takeFromExternrefTable0(ret[1]);
|
|
1023
1066
|
}
|
|
@@ -1280,6 +1323,38 @@ export function tostYuen(x, y, lower_bound, upper_bound, trim, alpha) {
|
|
|
1280
1323
|
return takeFromExternrefTable0(ret[0]);
|
|
1281
1324
|
}
|
|
1282
1325
|
|
|
1326
|
+
/**
|
|
1327
|
+
* Two-way ANOVA with interaction.
|
|
1328
|
+
*
|
|
1329
|
+
* All three input arrays must have the same length. `factorA` and `factorB`
|
|
1330
|
+
* hold the factor-level index for each observation (0-based; the number of
|
|
1331
|
+
* levels is inferred from the maximum index plus one).
|
|
1332
|
+
*
|
|
1333
|
+
* @param values - Observations as Float64Array
|
|
1334
|
+
* @param factorA - Factor A level index per observation as Uint32Array
|
|
1335
|
+
* @param factorB - Factor B level index per observation as Uint32Array
|
|
1336
|
+
* @returns Object with factor_a, factor_b, interaction, residual, total rows
|
|
1337
|
+
* (each: ss, df, ms, f_statistic, p_value), plus levels_a, levels_b, n,
|
|
1338
|
+
* grand_mean, cell_means, marginal_means_a, marginal_means_b.
|
|
1339
|
+
* @param {Float64Array} values
|
|
1340
|
+
* @param {Uint32Array} factor_a
|
|
1341
|
+
* @param {Uint32Array} factor_b
|
|
1342
|
+
* @returns {any}
|
|
1343
|
+
*/
|
|
1344
|
+
export function twoWayAnova(values, factor_a, factor_b) {
|
|
1345
|
+
const ptr0 = passArrayF64ToWasm0(values, wasm.__wbindgen_malloc);
|
|
1346
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1347
|
+
const ptr1 = passArray32ToWasm0(factor_a, wasm.__wbindgen_malloc);
|
|
1348
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1349
|
+
const ptr2 = passArray32ToWasm0(factor_b, wasm.__wbindgen_malloc);
|
|
1350
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1351
|
+
const ret = wasm.twoWayAnova(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1352
|
+
if (ret[2]) {
|
|
1353
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1354
|
+
}
|
|
1355
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1283
1358
|
/**
|
|
1284
1359
|
* Wilcoxon signed-rank test.
|
|
1285
1360
|
*
|
|
@@ -1339,154 +1414,149 @@ export function yuenTest(x, y, trim, alternative, conf_level) {
|
|
|
1339
1414
|
}
|
|
1340
1415
|
return takeFromExternrefTable0(ret[0]);
|
|
1341
1416
|
}
|
|
1342
|
-
|
|
1343
1417
|
function __wbg_get_imports() {
|
|
1344
1418
|
const import0 = {
|
|
1345
1419
|
__proto__: null,
|
|
1346
|
-
|
|
1420
|
+
__wbg_Error_ef53bc310eb298a0: function(arg0, arg1) {
|
|
1347
1421
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1348
1422
|
return ret;
|
|
1349
1423
|
},
|
|
1350
|
-
|
|
1424
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
1351
1425
|
const ret = String(arg1);
|
|
1352
1426
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1353
1427
|
const len1 = WASM_VECTOR_LEN;
|
|
1354
1428
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1355
1429
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1356
1430
|
},
|
|
1357
|
-
|
|
1431
|
+
__wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) {
|
|
1358
1432
|
const ret = typeof(arg0) === 'function';
|
|
1359
1433
|
return ret;
|
|
1360
1434
|
},
|
|
1361
|
-
|
|
1435
|
+
__wbg___wbindgen_is_object_56732c2bc353f41d: function(arg0) {
|
|
1362
1436
|
const val = arg0;
|
|
1363
1437
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1364
1438
|
return ret;
|
|
1365
1439
|
},
|
|
1366
|
-
|
|
1440
|
+
__wbg___wbindgen_is_string_c236cabd84a4d769: function(arg0) {
|
|
1367
1441
|
const ret = typeof(arg0) === 'string';
|
|
1368
1442
|
return ret;
|
|
1369
1443
|
},
|
|
1370
|
-
|
|
1444
|
+
__wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) {
|
|
1371
1445
|
const ret = arg0 === undefined;
|
|
1372
1446
|
return ret;
|
|
1373
1447
|
},
|
|
1374
|
-
|
|
1448
|
+
__wbg___wbindgen_number_get_9bb1761122181af2: function(arg0, arg1) {
|
|
1375
1449
|
const obj = arg1;
|
|
1376
1450
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1377
1451
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1378
1452
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1379
1453
|
},
|
|
1380
|
-
|
|
1454
|
+
__wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
|
|
1381
1455
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1382
1456
|
},
|
|
1383
|
-
|
|
1384
|
-
const ret = arg0.call(arg1);
|
|
1385
|
-
return ret;
|
|
1386
|
-
}, arguments); },
|
|
1387
|
-
__wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1457
|
+
__wbg_call_9c758de292015997: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1388
1458
|
const ret = arg0.call(arg1, arg2);
|
|
1389
1459
|
return ret;
|
|
1390
1460
|
}, arguments); },
|
|
1391
|
-
|
|
1461
|
+
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
1392
1462
|
const ret = arg0.crypto;
|
|
1393
1463
|
return ret;
|
|
1394
1464
|
},
|
|
1395
|
-
|
|
1465
|
+
__wbg_from_d300fe49deab18f5: function(arg0) {
|
|
1396
1466
|
const ret = Array.from(arg0);
|
|
1397
1467
|
return ret;
|
|
1398
1468
|
},
|
|
1399
|
-
|
|
1469
|
+
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1400
1470
|
arg0.getRandomValues(arg1);
|
|
1401
1471
|
}, arguments); },
|
|
1402
|
-
|
|
1472
|
+
__wbg_get_2b48c7d0d006a781: function(arg0, arg1) {
|
|
1403
1473
|
const ret = arg0[arg1 >>> 0];
|
|
1404
1474
|
return ret;
|
|
1405
1475
|
},
|
|
1406
|
-
|
|
1407
|
-
const ret = arg0
|
|
1476
|
+
__wbg_get_unchecked_33f6e5c9e2f2d6b2: function(arg0, arg1) {
|
|
1477
|
+
const ret = arg0[arg1 >>> 0];
|
|
1408
1478
|
return ret;
|
|
1409
1479
|
},
|
|
1410
|
-
|
|
1480
|
+
__wbg_length_33096ac1966bb961: function(arg0) {
|
|
1411
1481
|
const ret = arg0.length;
|
|
1412
1482
|
return ret;
|
|
1413
1483
|
},
|
|
1414
|
-
|
|
1484
|
+
__wbg_length_4a591ecaa01354d9: function(arg0) {
|
|
1415
1485
|
const ret = arg0.length;
|
|
1416
1486
|
return ret;
|
|
1417
1487
|
},
|
|
1418
|
-
|
|
1419
|
-
const ret = arg0.
|
|
1488
|
+
__wbg_length_66f1a4b2e9026940: function(arg0) {
|
|
1489
|
+
const ret = arg0.length;
|
|
1420
1490
|
return ret;
|
|
1421
1491
|
},
|
|
1422
|
-
|
|
1423
|
-
const ret =
|
|
1492
|
+
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
1493
|
+
const ret = arg0.msCrypto;
|
|
1424
1494
|
return ret;
|
|
1425
1495
|
},
|
|
1426
|
-
|
|
1427
|
-
const ret = new
|
|
1496
|
+
__wbg_new_8d67bd740527e37f: function(arg0) {
|
|
1497
|
+
const ret = new Float64Array(arg0);
|
|
1428
1498
|
return ret;
|
|
1429
1499
|
},
|
|
1430
|
-
|
|
1431
|
-
const ret = new
|
|
1500
|
+
__wbg_new_ce1ab61c1c2b300d: function() {
|
|
1501
|
+
const ret = new Object();
|
|
1432
1502
|
return ret;
|
|
1433
1503
|
},
|
|
1434
|
-
|
|
1435
|
-
const ret = new
|
|
1504
|
+
__wbg_new_d90091b82fdf5b91: function() {
|
|
1505
|
+
const ret = new Array();
|
|
1436
1506
|
return ret;
|
|
1437
1507
|
},
|
|
1438
|
-
|
|
1508
|
+
__wbg_new_with_length_36a4998e27b014c5: function(arg0) {
|
|
1439
1509
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1440
1510
|
return ret;
|
|
1441
1511
|
},
|
|
1442
|
-
|
|
1512
|
+
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1443
1513
|
const ret = arg0.node;
|
|
1444
1514
|
return ret;
|
|
1445
1515
|
},
|
|
1446
|
-
|
|
1516
|
+
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
1447
1517
|
const ret = arg0.process;
|
|
1448
1518
|
return ret;
|
|
1449
1519
|
},
|
|
1450
|
-
|
|
1451
|
-
Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);
|
|
1452
|
-
},
|
|
1453
|
-
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
|
|
1520
|
+
__wbg_prototypesetcall_3249fc62a0fafa30: function(arg0, arg1, arg2) {
|
|
1454
1521
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1455
1522
|
},
|
|
1456
|
-
|
|
1523
|
+
__wbg_prototypesetcall_d1ae8885a2e9d458: function(arg0, arg1, arg2) {
|
|
1524
|
+
Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);
|
|
1525
|
+
},
|
|
1526
|
+
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
1457
1527
|
arg0.randomFillSync(arg1);
|
|
1458
1528
|
}, arguments); },
|
|
1459
|
-
|
|
1529
|
+
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
1460
1530
|
const ret = module.require;
|
|
1461
1531
|
return ret;
|
|
1462
1532
|
}, arguments); },
|
|
1463
|
-
|
|
1533
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1464
1534
|
arg0[arg1] = arg2;
|
|
1465
1535
|
},
|
|
1466
|
-
|
|
1536
|
+
__wbg_set_dca99999bba88a9a: function(arg0, arg1, arg2) {
|
|
1467
1537
|
arg0[arg1 >>> 0] = arg2;
|
|
1468
1538
|
},
|
|
1469
|
-
|
|
1539
|
+
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
1470
1540
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1471
1541
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1472
1542
|
},
|
|
1473
|
-
|
|
1543
|
+
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
1474
1544
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1475
1545
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1476
1546
|
},
|
|
1477
|
-
|
|
1547
|
+
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
1478
1548
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1479
1549
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1480
1550
|
},
|
|
1481
|
-
|
|
1551
|
+
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
1482
1552
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1483
1553
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1484
1554
|
},
|
|
1485
|
-
|
|
1555
|
+
__wbg_subarray_4aa221f6a4f5ab22: function(arg0, arg1, arg2) {
|
|
1486
1556
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1487
1557
|
return ret;
|
|
1488
1558
|
},
|
|
1489
|
-
|
|
1559
|
+
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
1490
1560
|
const ret = arg0.versions;
|
|
1491
1561
|
return ret;
|
|
1492
1562
|
},
|
|
@@ -1559,8 +1629,15 @@ function getFloat64ArrayMemory0() {
|
|
|
1559
1629
|
}
|
|
1560
1630
|
|
|
1561
1631
|
function getStringFromWasm0(ptr, len) {
|
|
1562
|
-
|
|
1563
|
-
|
|
1632
|
+
return decodeText(ptr >>> 0, len);
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
let cachedUint32ArrayMemory0 = null;
|
|
1636
|
+
function getUint32ArrayMemory0() {
|
|
1637
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1638
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1639
|
+
}
|
|
1640
|
+
return cachedUint32ArrayMemory0;
|
|
1564
1641
|
}
|
|
1565
1642
|
|
|
1566
1643
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -1584,6 +1661,13 @@ function isLikeNone(x) {
|
|
|
1584
1661
|
return x === undefined || x === null;
|
|
1585
1662
|
}
|
|
1586
1663
|
|
|
1664
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
1665
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
1666
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
1667
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1668
|
+
return ptr;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1587
1671
|
function passArrayF64ToWasm0(arg, malloc) {
|
|
1588
1672
|
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
1589
1673
|
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
@@ -1663,12 +1747,14 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
1663
1747
|
|
|
1664
1748
|
let WASM_VECTOR_LEN = 0;
|
|
1665
1749
|
|
|
1666
|
-
let wasmModule, wasm;
|
|
1750
|
+
let wasmModule, wasmInstance, wasm;
|
|
1667
1751
|
function __wbg_finalize_init(instance, module) {
|
|
1752
|
+
wasmInstance = instance;
|
|
1668
1753
|
wasm = instance.exports;
|
|
1669
1754
|
wasmModule = module;
|
|
1670
1755
|
cachedDataViewMemory0 = null;
|
|
1671
1756
|
cachedFloat64ArrayMemory0 = null;
|
|
1757
|
+
cachedUint32ArrayMemory0 = null;
|
|
1672
1758
|
cachedUint8ArrayMemory0 = null;
|
|
1673
1759
|
wasm.__wbindgen_start();
|
|
1674
1760
|
return wasm;
|
|
Binary file
|