@sipemu/anofox-statistics 0.6.0 → 0.8.0
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/anofox_statistics_js.d.ts +33 -33
- package/anofox_statistics_js.js +508 -249
- package/anofox_statistics_js_bg.wasm +0 -0
- package/package.json +1 -1
package/anofox_statistics_js.js
CHANGED
|
@@ -144,18 +144,27 @@ export function brownForsythe(groups) {
|
|
|
144
144
|
* @param alternative - Alternative hypothesis direction
|
|
145
145
|
* @param alpha - If specified, compute CI at (1-alpha) level (e.g., 0.05 for 95% CI)
|
|
146
146
|
* @returns Object with statistic, df, p_value, estimate, conf_int
|
|
147
|
-
* @param {Float64Array} x
|
|
148
|
-
* @param {Float64Array} y
|
|
147
|
+
* @param {Float64Array | number[]} x
|
|
148
|
+
* @param {Float64Array | number[]} y
|
|
149
149
|
* @param {JsAlternative} alternative
|
|
150
150
|
* @param {number | null} [alpha]
|
|
151
151
|
* @returns {any}
|
|
152
152
|
*/
|
|
153
153
|
export function brunnerMunzel(x, y, alternative, alpha) {
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
const val3 = +alternative;
|
|
155
|
+
const val4 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
156
|
+
let ptr0, len0, ptr1, len1;
|
|
157
|
+
try {
|
|
158
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
159
|
+
len0 = WASM_VECTOR_LEN;
|
|
160
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
161
|
+
len1 = WASM_VECTOR_LEN;
|
|
162
|
+
} catch (e) {
|
|
163
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
164
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
165
|
+
throw e;
|
|
166
|
+
}
|
|
167
|
+
const ret = wasm.brunnerMunzel(ptr0, len0, ptr1, len1, val3, !isLikeNone(alpha), val4);
|
|
159
168
|
if (ret[2]) {
|
|
160
169
|
throw takeFromExternrefTable0(ret[1]);
|
|
161
170
|
}
|
|
@@ -168,15 +177,22 @@ export function brunnerMunzel(x, y, alternative, alpha) {
|
|
|
168
177
|
* @param observed - Observed counts as array of numbers
|
|
169
178
|
* @param expectedProps - Expected proportions as array of numbers (must sum to 1), or null for uniform
|
|
170
179
|
* @returns Object with statistic, df, p_value
|
|
171
|
-
* @param {Float64Array} observed
|
|
172
|
-
* @param {Float64Array | null} [expected_props]
|
|
180
|
+
* @param {Float64Array | number[]} observed
|
|
181
|
+
* @param {Float64Array | number[] | null} [expected_props]
|
|
173
182
|
* @returns {any}
|
|
174
183
|
*/
|
|
175
184
|
export function chiSquareGoodnessOfFit(observed, expected_props) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
185
|
+
let ptr0, len0, ptr1, len1;
|
|
186
|
+
try {
|
|
187
|
+
ptr0 = passArrayF64ToWasm0(observed, wasm.__wbindgen_malloc);
|
|
188
|
+
len0 = WASM_VECTOR_LEN;
|
|
189
|
+
ptr1 = isLikeNone(expected_props) ? 0 : passArrayF64ToWasm0(expected_props, wasm.__wbindgen_malloc);
|
|
190
|
+
len1 = WASM_VECTOR_LEN;
|
|
191
|
+
} catch (e) {
|
|
192
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
193
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
194
|
+
throw e;
|
|
195
|
+
}
|
|
180
196
|
const ret = wasm.chiSquareGoodnessOfFit(ptr0, len0, ptr1, len1);
|
|
181
197
|
if (ret[2]) {
|
|
182
198
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -209,17 +225,25 @@ export function chiSquareTest(observed, yates_correction) {
|
|
|
209
225
|
* @param e2 - Forecast errors from unrestricted model as Float64Array
|
|
210
226
|
* @param horizon - Forecast horizon for HAC variance adjustment
|
|
211
227
|
* @returns Object with statistic, p_value, p_value_two_sided
|
|
212
|
-
* @param {Float64Array} e1
|
|
213
|
-
* @param {Float64Array} e2
|
|
228
|
+
* @param {Float64Array | number[]} e1
|
|
229
|
+
* @param {Float64Array | number[]} e2
|
|
214
230
|
* @param {number} horizon
|
|
215
231
|
* @returns {any}
|
|
216
232
|
*/
|
|
217
233
|
export function clarkWest(e1, e2, horizon) {
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
234
|
+
const val3 = +horizon;
|
|
235
|
+
let ptr0, len0, ptr1, len1;
|
|
236
|
+
try {
|
|
237
|
+
ptr0 = passArrayF64ToWasm0(e1, wasm.__wbindgen_malloc);
|
|
238
|
+
len0 = WASM_VECTOR_LEN;
|
|
239
|
+
ptr1 = passArrayF64ToWasm0(e2, wasm.__wbindgen_malloc);
|
|
240
|
+
len1 = WASM_VECTOR_LEN;
|
|
241
|
+
} catch (e) {
|
|
242
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
243
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
244
|
+
throw e;
|
|
245
|
+
}
|
|
246
|
+
const ret = wasm.clarkWest(ptr0, len0, ptr1, len1, val3);
|
|
223
247
|
if (ret[2]) {
|
|
224
248
|
throw takeFromExternrefTable0(ret[1]);
|
|
225
249
|
}
|
|
@@ -283,7 +307,7 @@ export function cramersV(observed) {
|
|
|
283
307
|
*
|
|
284
308
|
* @param x - Sample data as Float64Array
|
|
285
309
|
* @returns Object with k2_statistic, p_value, skewness_z, kurtosis_z
|
|
286
|
-
* @param {Float64Array} x
|
|
310
|
+
* @param {Float64Array | number[]} x
|
|
287
311
|
* @returns {any}
|
|
288
312
|
*/
|
|
289
313
|
export function dagostinoKSquared(x) {
|
|
@@ -306,8 +330,8 @@ export function dagostinoKSquared(x) {
|
|
|
306
330
|
* @param alternative - Alternative hypothesis direction
|
|
307
331
|
* @param varEstimator - Variance estimator (Acf or Bartlett)
|
|
308
332
|
* @returns Object with statistic, p_value, horizon
|
|
309
|
-
* @param {Float64Array} e1
|
|
310
|
-
* @param {Float64Array} e2
|
|
333
|
+
* @param {Float64Array | number[]} e1
|
|
334
|
+
* @param {Float64Array | number[]} e2
|
|
311
335
|
* @param {JsLossFunction} loss_function
|
|
312
336
|
* @param {number} horizon
|
|
313
337
|
* @param {JsAlternative} alternative
|
|
@@ -315,11 +339,22 @@ export function dagostinoKSquared(x) {
|
|
|
315
339
|
* @returns {any}
|
|
316
340
|
*/
|
|
317
341
|
export function dieboldMariano(e1, e2, loss_function, horizon, alternative, var_estimator) {
|
|
318
|
-
const
|
|
319
|
-
const
|
|
320
|
-
const
|
|
321
|
-
const
|
|
322
|
-
|
|
342
|
+
const val3 = +loss_function;
|
|
343
|
+
const val4 = +horizon;
|
|
344
|
+
const val5 = +alternative;
|
|
345
|
+
const val6 = +var_estimator;
|
|
346
|
+
let ptr0, len0, ptr1, len1;
|
|
347
|
+
try {
|
|
348
|
+
ptr0 = passArrayF64ToWasm0(e1, wasm.__wbindgen_malloc);
|
|
349
|
+
len0 = WASM_VECTOR_LEN;
|
|
350
|
+
ptr1 = passArrayF64ToWasm0(e2, wasm.__wbindgen_malloc);
|
|
351
|
+
len1 = WASM_VECTOR_LEN;
|
|
352
|
+
} catch (e) {
|
|
353
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
354
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
355
|
+
throw e;
|
|
356
|
+
}
|
|
357
|
+
const ret = wasm.dieboldMariano(ptr0, len0, ptr1, len1, val3, val4, val5, val6);
|
|
323
358
|
if (ret[2]) {
|
|
324
359
|
throw takeFromExternrefTable0(ret[1]);
|
|
325
360
|
}
|
|
@@ -332,15 +367,22 @@ export function dieboldMariano(e1, e2, loss_function, horizon, alternative, var_
|
|
|
332
367
|
* @param x - First variable as Float64Array
|
|
333
368
|
* @param y - Second variable as Float64Array
|
|
334
369
|
* @returns Object with dcor, dcov, dvar_x, dvar_y, statistic
|
|
335
|
-
* @param {Float64Array} x
|
|
336
|
-
* @param {Float64Array} y
|
|
370
|
+
* @param {Float64Array | number[]} x
|
|
371
|
+
* @param {Float64Array | number[]} y
|
|
337
372
|
* @returns {any}
|
|
338
373
|
*/
|
|
339
374
|
export function distanceCorrelation(x, y) {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
375
|
+
let ptr0, len0, ptr1, len1;
|
|
376
|
+
try {
|
|
377
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
378
|
+
len0 = WASM_VECTOR_LEN;
|
|
379
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
380
|
+
len1 = WASM_VECTOR_LEN;
|
|
381
|
+
} catch (e) {
|
|
382
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
383
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
384
|
+
throw e;
|
|
385
|
+
}
|
|
344
386
|
const ret = wasm.distanceCorrelation(ptr0, len0, ptr1, len1);
|
|
345
387
|
if (ret[2]) {
|
|
346
388
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -356,18 +398,27 @@ export function distanceCorrelation(x, y) {
|
|
|
356
398
|
* @param nPermutations - Number of permutations (default: 999)
|
|
357
399
|
* @param seed - Random seed (optional)
|
|
358
400
|
* @returns Object with dcor, statistic, p_value
|
|
359
|
-
* @param {Float64Array} x
|
|
360
|
-
* @param {Float64Array} y
|
|
401
|
+
* @param {Float64Array | number[]} x
|
|
402
|
+
* @param {Float64Array | number[]} y
|
|
361
403
|
* @param {number | null} [n_permutations]
|
|
362
404
|
* @param {bigint | null} [seed]
|
|
363
405
|
* @returns {any}
|
|
364
406
|
*/
|
|
365
407
|
export function distanceCorrelationTest(x, y, n_permutations, seed) {
|
|
366
|
-
const
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
408
|
+
const val3 = +(isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0);
|
|
409
|
+
const val4 = BigInt.asIntN(64, (isLikeNone(seed) ? BigInt(0) : seed));
|
|
410
|
+
let ptr0, len0, ptr1, len1;
|
|
411
|
+
try {
|
|
412
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
413
|
+
len0 = WASM_VECTOR_LEN;
|
|
414
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
415
|
+
len1 = WASM_VECTOR_LEN;
|
|
416
|
+
} catch (e) {
|
|
417
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
418
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
419
|
+
throw e;
|
|
420
|
+
}
|
|
421
|
+
const ret = wasm.distanceCorrelationTest(ptr0, len0, ptr1, len1, val3, !isLikeNone(seed), val4);
|
|
371
422
|
if (ret[2]) {
|
|
372
423
|
throw takeFromExternrefTable0(ret[1]);
|
|
373
424
|
}
|
|
@@ -406,18 +457,27 @@ export function energyDistanceTest(x, y, n_permutations, seed) {
|
|
|
406
457
|
* @param nPermutations - Number of permutations (default: 999)
|
|
407
458
|
* @param seed - Random seed (optional)
|
|
408
459
|
* @returns Object with statistic, p_value, n_permutations
|
|
409
|
-
* @param {Float64Array} x
|
|
410
|
-
* @param {Float64Array} y
|
|
460
|
+
* @param {Float64Array | number[]} x
|
|
461
|
+
* @param {Float64Array | number[]} y
|
|
411
462
|
* @param {number | null} [n_permutations]
|
|
412
463
|
* @param {bigint | null} [seed]
|
|
413
464
|
* @returns {any}
|
|
414
465
|
*/
|
|
415
466
|
export function energyDistanceTest1d(x, y, n_permutations, seed) {
|
|
416
|
-
const
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
467
|
+
const val3 = +(isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0);
|
|
468
|
+
const val4 = BigInt.asIntN(64, (isLikeNone(seed) ? BigInt(0) : seed));
|
|
469
|
+
let ptr0, len0, ptr1, len1;
|
|
470
|
+
try {
|
|
471
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
472
|
+
len0 = WASM_VECTOR_LEN;
|
|
473
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
474
|
+
len1 = WASM_VECTOR_LEN;
|
|
475
|
+
} catch (e) {
|
|
476
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
477
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
478
|
+
throw e;
|
|
479
|
+
}
|
|
480
|
+
const ret = wasm.energyDistanceTest1d(ptr0, len0, ptr1, len1, val3, !isLikeNone(seed), val4);
|
|
421
481
|
if (ret[2]) {
|
|
422
482
|
throw takeFromExternrefTable0(ret[1]);
|
|
423
483
|
}
|
|
@@ -499,17 +559,25 @@ export function intraclassCorrelation(data, icc_type) {
|
|
|
499
559
|
* @param y - Second variable as Float64Array
|
|
500
560
|
* @param variant - Tau variant (TauA, TauB, TauC)
|
|
501
561
|
* @returns Object with estimate, statistic, p_value, conf_int
|
|
502
|
-
* @param {Float64Array} x
|
|
503
|
-
* @param {Float64Array} y
|
|
562
|
+
* @param {Float64Array | number[]} x
|
|
563
|
+
* @param {Float64Array | number[]} y
|
|
504
564
|
* @param {JsKendallVariant} variant
|
|
505
565
|
* @returns {any}
|
|
506
566
|
*/
|
|
507
567
|
export function kendallCorrelation(x, y, variant) {
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
568
|
+
const val3 = +variant;
|
|
569
|
+
let ptr0, len0, ptr1, len1;
|
|
570
|
+
try {
|
|
571
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
572
|
+
len0 = WASM_VECTOR_LEN;
|
|
573
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
574
|
+
len1 = WASM_VECTOR_LEN;
|
|
575
|
+
} catch (e) {
|
|
576
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
577
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
578
|
+
throw e;
|
|
579
|
+
}
|
|
580
|
+
const ret = wasm.kendallCorrelation(ptr0, len0, ptr1, len1, val3);
|
|
513
581
|
if (ret[2]) {
|
|
514
582
|
throw takeFromExternrefTable0(ret[1]);
|
|
515
583
|
}
|
|
@@ -543,8 +611,8 @@ export function kruskalWallis(groups) {
|
|
|
543
611
|
* @param confLevel - Confidence level for Hodges-Lehmann CI (optional)
|
|
544
612
|
* @param mu - Location shift under H0 (default: 0)
|
|
545
613
|
* @returns Object with statistic, p_value, estimate, null_value, conf_int
|
|
546
|
-
* @param {Float64Array} x
|
|
547
|
-
* @param {Float64Array} y
|
|
614
|
+
* @param {Float64Array | number[]} x
|
|
615
|
+
* @param {Float64Array | number[]} y
|
|
548
616
|
* @param {JsAlternative} alternative
|
|
549
617
|
* @param {boolean | null} [continuity_correction]
|
|
550
618
|
* @param {boolean | null} [exact]
|
|
@@ -553,11 +621,21 @@ export function kruskalWallis(groups) {
|
|
|
553
621
|
* @returns {any}
|
|
554
622
|
*/
|
|
555
623
|
export function mannWhitneyU(x, y, alternative, continuity_correction, exact, conf_level, mu) {
|
|
556
|
-
const
|
|
557
|
-
const
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
-
|
|
624
|
+
const val3 = +alternative;
|
|
625
|
+
const val4 = +(isLikeNone(conf_level) ? 0 : conf_level);
|
|
626
|
+
const val5 = +(isLikeNone(mu) ? 0 : mu);
|
|
627
|
+
let ptr0, len0, ptr1, len1;
|
|
628
|
+
try {
|
|
629
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
630
|
+
len0 = WASM_VECTOR_LEN;
|
|
631
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
632
|
+
len1 = WASM_VECTOR_LEN;
|
|
633
|
+
} catch (e) {
|
|
634
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
635
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
636
|
+
throw e;
|
|
637
|
+
}
|
|
638
|
+
const ret = wasm.mannWhitneyU(ptr0, len0, ptr1, len1, val3, isLikeNone(continuity_correction) ? 0xFFFFFF : continuity_correction ? 1 : 0, isLikeNone(exact) ? 0xFFFFFF : exact ? 1 : 0, !isLikeNone(conf_level), val4, !isLikeNone(mu), val5);
|
|
561
639
|
if (ret[2]) {
|
|
562
640
|
throw takeFromExternrefTable0(ret[1]);
|
|
563
641
|
}
|
|
@@ -634,18 +712,27 @@ export function mmdTest(x, y, kernel, bandwidth, n_permutations, seed) {
|
|
|
634
712
|
* @param nPermutations - Number of permutations (default: 999)
|
|
635
713
|
* @param seed - Random seed (optional)
|
|
636
714
|
* @returns Object with statistic, p_value, n_permutations
|
|
637
|
-
* @param {Float64Array} x
|
|
638
|
-
* @param {Float64Array} y
|
|
715
|
+
* @param {Float64Array | number[]} x
|
|
716
|
+
* @param {Float64Array | number[]} y
|
|
639
717
|
* @param {number | null} [n_permutations]
|
|
640
718
|
* @param {bigint | null} [seed]
|
|
641
719
|
* @returns {any}
|
|
642
720
|
*/
|
|
643
721
|
export function mmdTest1d(x, y, n_permutations, seed) {
|
|
644
|
-
const
|
|
645
|
-
const
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
722
|
+
const val3 = +(isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0);
|
|
723
|
+
const val4 = BigInt.asIntN(64, (isLikeNone(seed) ? BigInt(0) : seed));
|
|
724
|
+
let ptr0, len0, ptr1, len1;
|
|
725
|
+
try {
|
|
726
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
727
|
+
len0 = WASM_VECTOR_LEN;
|
|
728
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
729
|
+
len1 = WASM_VECTOR_LEN;
|
|
730
|
+
} catch (e) {
|
|
731
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
732
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
733
|
+
throw e;
|
|
734
|
+
}
|
|
735
|
+
const ret = wasm.mmdTest1d(ptr0, len0, ptr1, len1, val3, !isLikeNone(seed), val4);
|
|
649
736
|
if (ret[2]) {
|
|
650
737
|
throw takeFromExternrefTable0(ret[1]);
|
|
651
738
|
}
|
|
@@ -689,7 +776,7 @@ export function modelConfidenceSet(losses, alpha, statistic, n_bootstrap, block_
|
|
|
689
776
|
* @param blockLength - Expected block length for stationary bootstrap
|
|
690
777
|
* @param seed - Random seed (optional)
|
|
691
778
|
* @returns Object with statistic, p_value_consistent, p_value_upper
|
|
692
|
-
* @param {Float64Array} benchmark_errors
|
|
779
|
+
* @param {Float64Array | number[]} benchmark_errors
|
|
693
780
|
* @param {Array<any>} model_errors
|
|
694
781
|
* @param {number | null | undefined} n_bootstrap
|
|
695
782
|
* @param {number} block_length
|
|
@@ -697,9 +784,12 @@ export function modelConfidenceSet(losses, alpha, statistic, n_bootstrap, block_
|
|
|
697
784
|
* @returns {any}
|
|
698
785
|
*/
|
|
699
786
|
export function mspeAdjustedSpa(benchmark_errors, model_errors, n_bootstrap, block_length, seed) {
|
|
787
|
+
const val2 = +(isLikeNone(n_bootstrap) ? Number.MAX_SAFE_INTEGER : (n_bootstrap) >>> 0);
|
|
788
|
+
const val3 = +block_length;
|
|
789
|
+
const val4 = BigInt.asIntN(64, (isLikeNone(seed) ? BigInt(0) : seed));
|
|
700
790
|
const ptr0 = passArrayF64ToWasm0(benchmark_errors, wasm.__wbindgen_malloc);
|
|
701
791
|
const len0 = WASM_VECTOR_LEN;
|
|
702
|
-
const ret = wasm.mspeAdjustedSpa(ptr0, len0, model_errors,
|
|
792
|
+
const ret = wasm.mspeAdjustedSpa(ptr0, len0, model_errors, val2, val3, !isLikeNone(seed), val4);
|
|
703
793
|
if (ret[2]) {
|
|
704
794
|
throw takeFromExternrefTable0(ret[1]);
|
|
705
795
|
}
|
|
@@ -731,16 +821,23 @@ export function oneWayAnova(groups, kind) {
|
|
|
731
821
|
* @param y - Second variable as Float64Array
|
|
732
822
|
* @param z - Array of confounding variables (each as Float64Array)
|
|
733
823
|
* @returns Object with estimate, statistic, df, p_value
|
|
734
|
-
* @param {Float64Array} x
|
|
735
|
-
* @param {Float64Array} y
|
|
824
|
+
* @param {Float64Array | number[]} x
|
|
825
|
+
* @param {Float64Array | number[]} y
|
|
736
826
|
* @param {Array<any>} z
|
|
737
827
|
* @returns {any}
|
|
738
828
|
*/
|
|
739
829
|
export function partialCorrelation(x, y, z) {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
830
|
+
let ptr0, len0, ptr1, len1;
|
|
831
|
+
try {
|
|
832
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
833
|
+
len0 = WASM_VECTOR_LEN;
|
|
834
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
835
|
+
len1 = WASM_VECTOR_LEN;
|
|
836
|
+
} catch (e) {
|
|
837
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
838
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
839
|
+
throw e;
|
|
840
|
+
}
|
|
744
841
|
const ret = wasm.partialCorrelation(ptr0, len0, ptr1, len1, z);
|
|
745
842
|
if (ret[2]) {
|
|
746
843
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -755,17 +852,25 @@ export function partialCorrelation(x, y, z) {
|
|
|
755
852
|
* @param y - Second variable as Float64Array
|
|
756
853
|
* @param confLevel - Confidence level for CI (optional, e.g., 0.95)
|
|
757
854
|
* @returns Object with estimate, statistic, df, p_value, conf_int
|
|
758
|
-
* @param {Float64Array} x
|
|
759
|
-
* @param {Float64Array} y
|
|
855
|
+
* @param {Float64Array | number[]} x
|
|
856
|
+
* @param {Float64Array | number[]} y
|
|
760
857
|
* @param {number | null} [conf_level]
|
|
761
858
|
* @returns {any}
|
|
762
859
|
*/
|
|
763
860
|
export function pearsonCorrelation(x, y, conf_level) {
|
|
764
|
-
const
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
861
|
+
const val3 = +(isLikeNone(conf_level) ? 0 : conf_level);
|
|
862
|
+
let ptr0, len0, ptr1, len1;
|
|
863
|
+
try {
|
|
864
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
865
|
+
len0 = WASM_VECTOR_LEN;
|
|
866
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
867
|
+
len1 = WASM_VECTOR_LEN;
|
|
868
|
+
} catch (e) {
|
|
869
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
870
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
871
|
+
throw e;
|
|
872
|
+
}
|
|
873
|
+
const ret = wasm.pearsonCorrelation(ptr0, len0, ptr1, len1, !isLikeNone(conf_level), val3);
|
|
769
874
|
if (ret[2]) {
|
|
770
875
|
throw takeFromExternrefTable0(ret[1]);
|
|
771
876
|
}
|
|
@@ -781,19 +886,29 @@ export function pearsonCorrelation(x, y, conf_level) {
|
|
|
781
886
|
* @param nPermutations - Number of permutations (default: 9999)
|
|
782
887
|
* @param seed - Random seed (optional)
|
|
783
888
|
* @returns Object with statistic, p_value, n_permutations
|
|
784
|
-
* @param {Float64Array} x
|
|
785
|
-
* @param {Float64Array} y
|
|
889
|
+
* @param {Float64Array | number[]} x
|
|
890
|
+
* @param {Float64Array | number[]} y
|
|
786
891
|
* @param {JsAlternative} alternative
|
|
787
892
|
* @param {number | null} [n_permutations]
|
|
788
893
|
* @param {bigint | null} [seed]
|
|
789
894
|
* @returns {any}
|
|
790
895
|
*/
|
|
791
896
|
export function permutationTTest(x, y, alternative, n_permutations, seed) {
|
|
792
|
-
const
|
|
793
|
-
const
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
|
|
897
|
+
const val3 = +alternative;
|
|
898
|
+
const val4 = +(isLikeNone(n_permutations) ? Number.MAX_SAFE_INTEGER : (n_permutations) >>> 0);
|
|
899
|
+
const val5 = BigInt.asIntN(64, (isLikeNone(seed) ? BigInt(0) : seed));
|
|
900
|
+
let ptr0, len0, ptr1, len1;
|
|
901
|
+
try {
|
|
902
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
903
|
+
len0 = WASM_VECTOR_LEN;
|
|
904
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
905
|
+
len1 = WASM_VECTOR_LEN;
|
|
906
|
+
} catch (e) {
|
|
907
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
908
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
909
|
+
throw e;
|
|
910
|
+
}
|
|
911
|
+
const ret = wasm.permutationTTest(ptr0, len0, ptr1, len1, val3, val4, !isLikeNone(seed), val5);
|
|
797
912
|
if (ret[2]) {
|
|
798
913
|
throw takeFromExternrefTable0(ret[1]);
|
|
799
914
|
}
|
|
@@ -869,7 +984,7 @@ export function propTestTwo(successes1, trials1, successes2, trials2, alternativ
|
|
|
869
984
|
*
|
|
870
985
|
* @param data - Input sample as Float64Array
|
|
871
986
|
* @returns Float64Array of ranks (length matches input)
|
|
872
|
-
* @param {Float64Array} data
|
|
987
|
+
* @param {Float64Array | number[]} data
|
|
873
988
|
* @returns {Float64Array}
|
|
874
989
|
*/
|
|
875
990
|
export function rank(data) {
|
|
@@ -914,16 +1029,23 @@ export function repeatedMeasuresAnova(data, compute_sphericity) {
|
|
|
914
1029
|
* @param y - Second variable as Float64Array
|
|
915
1030
|
* @param z - Array of confounding variables to control for x only (each as Float64Array)
|
|
916
1031
|
* @returns Object with estimate, statistic, df, p_value
|
|
917
|
-
* @param {Float64Array} x
|
|
918
|
-
* @param {Float64Array} y
|
|
1032
|
+
* @param {Float64Array | number[]} x
|
|
1033
|
+
* @param {Float64Array | number[]} y
|
|
919
1034
|
* @param {Array<any>} z
|
|
920
1035
|
* @returns {any}
|
|
921
1036
|
*/
|
|
922
1037
|
export function semiPartialCorrelation(x, y, z) {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1038
|
+
let ptr0, len0, ptr1, len1;
|
|
1039
|
+
try {
|
|
1040
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1041
|
+
len0 = WASM_VECTOR_LEN;
|
|
1042
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1043
|
+
len1 = WASM_VECTOR_LEN;
|
|
1044
|
+
} catch (e) {
|
|
1045
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1046
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1047
|
+
throw e;
|
|
1048
|
+
}
|
|
927
1049
|
const ret = wasm.semiPartialCorrelation(ptr0, len0, ptr1, len1, z);
|
|
928
1050
|
if (ret[2]) {
|
|
929
1051
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -936,7 +1058,7 @@ export function semiPartialCorrelation(x, y, z) {
|
|
|
936
1058
|
*
|
|
937
1059
|
* @param x - Sample data as Float64Array
|
|
938
1060
|
* @returns Object with statistic (W) and p_value
|
|
939
|
-
* @param {Float64Array} x
|
|
1061
|
+
* @param {Float64Array | number[]} x
|
|
940
1062
|
* @returns {any}
|
|
941
1063
|
*/
|
|
942
1064
|
export function shapiroWilk(x) {
|
|
@@ -960,7 +1082,7 @@ export function shapiroWilk(x) {
|
|
|
960
1082
|
* @param blockLength - Expected block length for stationary bootstrap
|
|
961
1083
|
* @param seed - Random seed (optional)
|
|
962
1084
|
* @returns Object with statistic, p_values, best_model_idx
|
|
963
|
-
* @param {Float64Array} benchmark_losses
|
|
1085
|
+
* @param {Float64Array | number[]} benchmark_losses
|
|
964
1086
|
* @param {Array<any>} model_losses
|
|
965
1087
|
* @param {number | null | undefined} n_bootstrap
|
|
966
1088
|
* @param {number} block_length
|
|
@@ -968,9 +1090,12 @@ export function shapiroWilk(x) {
|
|
|
968
1090
|
* @returns {any}
|
|
969
1091
|
*/
|
|
970
1092
|
export function spaTest(benchmark_losses, model_losses, n_bootstrap, block_length, seed) {
|
|
1093
|
+
const val2 = +(isLikeNone(n_bootstrap) ? Number.MAX_SAFE_INTEGER : (n_bootstrap) >>> 0);
|
|
1094
|
+
const val3 = +block_length;
|
|
1095
|
+
const val4 = BigInt.asIntN(64, (isLikeNone(seed) ? BigInt(0) : seed));
|
|
971
1096
|
const ptr0 = passArrayF64ToWasm0(benchmark_losses, wasm.__wbindgen_malloc);
|
|
972
1097
|
const len0 = WASM_VECTOR_LEN;
|
|
973
|
-
const ret = wasm.spaTest(ptr0, len0, model_losses,
|
|
1098
|
+
const ret = wasm.spaTest(ptr0, len0, model_losses, val2, val3, !isLikeNone(seed), val4);
|
|
974
1099
|
if (ret[2]) {
|
|
975
1100
|
throw takeFromExternrefTable0(ret[1]);
|
|
976
1101
|
}
|
|
@@ -984,17 +1109,25 @@ export function spaTest(benchmark_losses, model_losses, n_bootstrap, block_lengt
|
|
|
984
1109
|
* @param y - Second variable as Float64Array
|
|
985
1110
|
* @param confLevel - Confidence level for CI (optional)
|
|
986
1111
|
* @returns Object with estimate, statistic, df, p_value, conf_int
|
|
987
|
-
* @param {Float64Array} x
|
|
988
|
-
* @param {Float64Array} y
|
|
1112
|
+
* @param {Float64Array | number[]} x
|
|
1113
|
+
* @param {Float64Array | number[]} y
|
|
989
1114
|
* @param {number | null} [conf_level]
|
|
990
1115
|
* @returns {any}
|
|
991
1116
|
*/
|
|
992
1117
|
export function spearmanCorrelation(x, y, conf_level) {
|
|
993
|
-
const
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1118
|
+
const val3 = +(isLikeNone(conf_level) ? 0 : conf_level);
|
|
1119
|
+
let ptr0, len0, ptr1, len1;
|
|
1120
|
+
try {
|
|
1121
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1122
|
+
len0 = WASM_VECTOR_LEN;
|
|
1123
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1124
|
+
len1 = WASM_VECTOR_LEN;
|
|
1125
|
+
} catch (e) {
|
|
1126
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1127
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1128
|
+
throw e;
|
|
1129
|
+
}
|
|
1130
|
+
const ret = wasm.spearmanCorrelation(ptr0, len0, ptr1, len1, !isLikeNone(conf_level), val3);
|
|
998
1131
|
if (ret[2]) {
|
|
999
1132
|
throw takeFromExternrefTable0(ret[1]);
|
|
1000
1133
|
}
|
|
@@ -1015,8 +1148,8 @@ export function start() {
|
|
|
1015
1148
|
* @param mu - Null hypothesis value (default: 0.0)
|
|
1016
1149
|
* @param confLevel - Confidence level for CI (optional, e.g., 0.95)
|
|
1017
1150
|
* @returns Object with statistic, df, p_value, mean_x, mean_y, conf_int
|
|
1018
|
-
* @param {Float64Array} x
|
|
1019
|
-
* @param {Float64Array} y
|
|
1151
|
+
* @param {Float64Array | number[]} x
|
|
1152
|
+
* @param {Float64Array | number[]} y
|
|
1020
1153
|
* @param {JsTTestKind} kind
|
|
1021
1154
|
* @param {JsAlternative} alternative
|
|
1022
1155
|
* @param {number | null} [mu]
|
|
@@ -1024,11 +1157,22 @@ export function start() {
|
|
|
1024
1157
|
* @returns {any}
|
|
1025
1158
|
*/
|
|
1026
1159
|
export function tTest(x, y, kind, alternative, mu, conf_level) {
|
|
1027
|
-
const
|
|
1028
|
-
const
|
|
1029
|
-
const
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1160
|
+
const val3 = +kind;
|
|
1161
|
+
const val4 = +alternative;
|
|
1162
|
+
const val5 = +(isLikeNone(mu) ? 0 : mu);
|
|
1163
|
+
const val6 = +(isLikeNone(conf_level) ? 0 : conf_level);
|
|
1164
|
+
let ptr0, len0, ptr1, len1;
|
|
1165
|
+
try {
|
|
1166
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1167
|
+
len0 = WASM_VECTOR_LEN;
|
|
1168
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1169
|
+
len1 = WASM_VECTOR_LEN;
|
|
1170
|
+
} catch (e) {
|
|
1171
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1172
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1173
|
+
throw e;
|
|
1174
|
+
}
|
|
1175
|
+
const ret = wasm.tTest(ptr0, len0, ptr1, len1, val3, val4, !isLikeNone(mu), val5, !isLikeNone(conf_level), val6);
|
|
1032
1176
|
if (ret[2]) {
|
|
1033
1177
|
throw takeFromExternrefTable0(ret[1]);
|
|
1034
1178
|
}
|
|
@@ -1046,8 +1190,8 @@ export function tTest(x, y, kind, alternative, mu, conf_level) {
|
|
|
1046
1190
|
* @param nBootstrap - Number of bootstrap samples (default: 1000)
|
|
1047
1191
|
* @param seed - Random seed (optional)
|
|
1048
1192
|
* @returns TOST result object
|
|
1049
|
-
* @param {Float64Array} x
|
|
1050
|
-
* @param {Float64Array} y
|
|
1193
|
+
* @param {Float64Array | number[]} x
|
|
1194
|
+
* @param {Float64Array | number[]} y
|
|
1051
1195
|
* @param {number} lower_bound
|
|
1052
1196
|
* @param {number} upper_bound
|
|
1053
1197
|
* @param {number | null} [alpha]
|
|
@@ -1056,11 +1200,23 @@ export function tTest(x, y, kind, alternative, mu, conf_level) {
|
|
|
1056
1200
|
* @returns {any}
|
|
1057
1201
|
*/
|
|
1058
1202
|
export function tostBootstrap(x, y, lower_bound, upper_bound, alpha, n_bootstrap, seed) {
|
|
1059
|
-
const
|
|
1060
|
-
const
|
|
1061
|
-
const
|
|
1062
|
-
const
|
|
1063
|
-
const
|
|
1203
|
+
const val3 = +lower_bound;
|
|
1204
|
+
const val4 = +upper_bound;
|
|
1205
|
+
const val5 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
1206
|
+
const val6 = +(isLikeNone(n_bootstrap) ? Number.MAX_SAFE_INTEGER : (n_bootstrap) >>> 0);
|
|
1207
|
+
const val7 = BigInt.asIntN(64, (isLikeNone(seed) ? BigInt(0) : seed));
|
|
1208
|
+
let ptr0, len0, ptr1, len1;
|
|
1209
|
+
try {
|
|
1210
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1211
|
+
len0 = WASM_VECTOR_LEN;
|
|
1212
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1213
|
+
len1 = WASM_VECTOR_LEN;
|
|
1214
|
+
} catch (e) {
|
|
1215
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1216
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1217
|
+
throw e;
|
|
1218
|
+
}
|
|
1219
|
+
const ret = wasm.tostBootstrap(ptr0, len0, ptr1, len1, val3, val4, !isLikeNone(alpha), val5, val6, !isLikeNone(seed), val7);
|
|
1064
1220
|
if (ret[2]) {
|
|
1065
1221
|
throw takeFromExternrefTable0(ret[1]);
|
|
1066
1222
|
}
|
|
@@ -1078,8 +1234,8 @@ export function tostBootstrap(x, y, lower_bound, upper_bound, alpha, n_bootstrap
|
|
|
1078
1234
|
* @param method - Correlation method (Pearson or Spearman)
|
|
1079
1235
|
* @param alpha - Significance level (default: 0.05)
|
|
1080
1236
|
* @returns TOST result object
|
|
1081
|
-
* @param {Float64Array} x
|
|
1082
|
-
* @param {Float64Array} y
|
|
1237
|
+
* @param {Float64Array | number[]} x
|
|
1238
|
+
* @param {Float64Array | number[]} y
|
|
1083
1239
|
* @param {number} rho_null
|
|
1084
1240
|
* @param {number} lower_bound
|
|
1085
1241
|
* @param {number} upper_bound
|
|
@@ -1088,11 +1244,23 @@ export function tostBootstrap(x, y, lower_bound, upper_bound, alpha, n_bootstrap
|
|
|
1088
1244
|
* @returns {any}
|
|
1089
1245
|
*/
|
|
1090
1246
|
export function tostCorrelation(x, y, rho_null, lower_bound, upper_bound, method, alpha) {
|
|
1091
|
-
const
|
|
1092
|
-
const
|
|
1093
|
-
const
|
|
1094
|
-
const
|
|
1095
|
-
const
|
|
1247
|
+
const val3 = +rho_null;
|
|
1248
|
+
const val4 = +lower_bound;
|
|
1249
|
+
const val5 = +upper_bound;
|
|
1250
|
+
const val6 = +method;
|
|
1251
|
+
const val7 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
1252
|
+
let ptr0, len0, ptr1, len1;
|
|
1253
|
+
try {
|
|
1254
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1255
|
+
len0 = WASM_VECTOR_LEN;
|
|
1256
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1257
|
+
len1 = WASM_VECTOR_LEN;
|
|
1258
|
+
} catch (e) {
|
|
1259
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1260
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1261
|
+
throw e;
|
|
1262
|
+
}
|
|
1263
|
+
const ret = wasm.tostCorrelation(ptr0, len0, ptr1, len1, val3, val4, val5, val6, !isLikeNone(alpha), val7);
|
|
1096
1264
|
if (ret[2]) {
|
|
1097
1265
|
throw takeFromExternrefTable0(ret[1]);
|
|
1098
1266
|
}
|
|
@@ -1162,7 +1330,7 @@ export function tostPropTwo(successes1, trials1, successes2, trials2, lower_boun
|
|
|
1162
1330
|
* @param upperBound - Upper equivalence bound (e.g., 0.5)
|
|
1163
1331
|
* @param alpha - Significance level (default: 0.05)
|
|
1164
1332
|
* @returns TOST result object
|
|
1165
|
-
* @param {Float64Array} x
|
|
1333
|
+
* @param {Float64Array | number[]} x
|
|
1166
1334
|
* @param {number} mu
|
|
1167
1335
|
* @param {number} lower_bound
|
|
1168
1336
|
* @param {number} upper_bound
|
|
@@ -1170,9 +1338,13 @@ export function tostPropTwo(successes1, trials1, successes2, trials2, lower_boun
|
|
|
1170
1338
|
* @returns {any}
|
|
1171
1339
|
*/
|
|
1172
1340
|
export function tostTTestOneSample(x, mu, lower_bound, upper_bound, alpha) {
|
|
1341
|
+
const val2 = +mu;
|
|
1342
|
+
const val3 = +lower_bound;
|
|
1343
|
+
const val4 = +upper_bound;
|
|
1344
|
+
const val5 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
1173
1345
|
const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1174
1346
|
const len0 = WASM_VECTOR_LEN;
|
|
1175
|
-
const ret = wasm.tostTTestOneSample(ptr0, len0,
|
|
1347
|
+
const ret = wasm.tostTTestOneSample(ptr0, len0, val2, val3, val4, !isLikeNone(alpha), val5);
|
|
1176
1348
|
if (ret[2]) {
|
|
1177
1349
|
throw takeFromExternrefTable0(ret[1]);
|
|
1178
1350
|
}
|
|
@@ -1188,19 +1360,29 @@ export function tostTTestOneSample(x, mu, lower_bound, upper_bound, alpha) {
|
|
|
1188
1360
|
* @param upperBound - Upper equivalence bound
|
|
1189
1361
|
* @param alpha - Significance level (default: 0.05)
|
|
1190
1362
|
* @returns TOST result object
|
|
1191
|
-
* @param {Float64Array} x
|
|
1192
|
-
* @param {Float64Array} y
|
|
1363
|
+
* @param {Float64Array | number[]} x
|
|
1364
|
+
* @param {Float64Array | number[]} y
|
|
1193
1365
|
* @param {number} lower_bound
|
|
1194
1366
|
* @param {number} upper_bound
|
|
1195
1367
|
* @param {number | null} [alpha]
|
|
1196
1368
|
* @returns {any}
|
|
1197
1369
|
*/
|
|
1198
1370
|
export function tostTTestPaired(x, y, lower_bound, upper_bound, alpha) {
|
|
1199
|
-
const
|
|
1200
|
-
const
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1203
|
-
|
|
1371
|
+
const val3 = +lower_bound;
|
|
1372
|
+
const val4 = +upper_bound;
|
|
1373
|
+
const val5 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
1374
|
+
let ptr0, len0, ptr1, len1;
|
|
1375
|
+
try {
|
|
1376
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1377
|
+
len0 = WASM_VECTOR_LEN;
|
|
1378
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1379
|
+
len1 = WASM_VECTOR_LEN;
|
|
1380
|
+
} catch (e) {
|
|
1381
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1382
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1383
|
+
throw e;
|
|
1384
|
+
}
|
|
1385
|
+
const ret = wasm.tostTTestPaired(ptr0, len0, ptr1, len1, val3, val4, !isLikeNone(alpha), val5);
|
|
1204
1386
|
if (ret[2]) {
|
|
1205
1387
|
throw takeFromExternrefTable0(ret[1]);
|
|
1206
1388
|
}
|
|
@@ -1217,8 +1399,8 @@ export function tostTTestPaired(x, y, lower_bound, upper_bound, alpha) {
|
|
|
1217
1399
|
* @param alpha - Significance level (default: 0.05)
|
|
1218
1400
|
* @param pooled - Use pooled variance (default: false for Welch)
|
|
1219
1401
|
* @returns TOST result object
|
|
1220
|
-
* @param {Float64Array} x
|
|
1221
|
-
* @param {Float64Array} y
|
|
1402
|
+
* @param {Float64Array | number[]} x
|
|
1403
|
+
* @param {Float64Array | number[]} y
|
|
1222
1404
|
* @param {number} lower_bound
|
|
1223
1405
|
* @param {number} upper_bound
|
|
1224
1406
|
* @param {number | null} [alpha]
|
|
@@ -1226,11 +1408,21 @@ export function tostTTestPaired(x, y, lower_bound, upper_bound, alpha) {
|
|
|
1226
1408
|
* @returns {any}
|
|
1227
1409
|
*/
|
|
1228
1410
|
export function tostTTestTwoSample(x, y, lower_bound, upper_bound, alpha, pooled) {
|
|
1229
|
-
const
|
|
1230
|
-
const
|
|
1231
|
-
const
|
|
1232
|
-
|
|
1233
|
-
|
|
1411
|
+
const val3 = +lower_bound;
|
|
1412
|
+
const val4 = +upper_bound;
|
|
1413
|
+
const val5 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
1414
|
+
let ptr0, len0, ptr1, len1;
|
|
1415
|
+
try {
|
|
1416
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1417
|
+
len0 = WASM_VECTOR_LEN;
|
|
1418
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1419
|
+
len1 = WASM_VECTOR_LEN;
|
|
1420
|
+
} catch (e) {
|
|
1421
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1422
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1423
|
+
throw e;
|
|
1424
|
+
}
|
|
1425
|
+
const ret = wasm.tostTTestTwoSample(ptr0, len0, ptr1, len1, val3, val4, !isLikeNone(alpha), val5, isLikeNone(pooled) ? 0xFFFFFF : pooled ? 1 : 0);
|
|
1234
1426
|
if (ret[2]) {
|
|
1235
1427
|
throw takeFromExternrefTable0(ret[1]);
|
|
1236
1428
|
}
|
|
@@ -1246,19 +1438,29 @@ export function tostTTestTwoSample(x, y, lower_bound, upper_bound, alpha, pooled
|
|
|
1246
1438
|
* @param upperBound - Upper equivalence bound
|
|
1247
1439
|
* @param alpha - Significance level (default: 0.05)
|
|
1248
1440
|
* @returns TOST result object
|
|
1249
|
-
* @param {Float64Array} x
|
|
1250
|
-
* @param {Float64Array} y
|
|
1441
|
+
* @param {Float64Array | number[]} x
|
|
1442
|
+
* @param {Float64Array | number[]} y
|
|
1251
1443
|
* @param {number} lower_bound
|
|
1252
1444
|
* @param {number} upper_bound
|
|
1253
1445
|
* @param {number | null} [alpha]
|
|
1254
1446
|
* @returns {any}
|
|
1255
1447
|
*/
|
|
1256
1448
|
export function tostWilcoxonPaired(x, y, lower_bound, upper_bound, alpha) {
|
|
1257
|
-
const
|
|
1258
|
-
const
|
|
1259
|
-
const
|
|
1260
|
-
|
|
1261
|
-
|
|
1449
|
+
const val3 = +lower_bound;
|
|
1450
|
+
const val4 = +upper_bound;
|
|
1451
|
+
const val5 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
1452
|
+
let ptr0, len0, ptr1, len1;
|
|
1453
|
+
try {
|
|
1454
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1455
|
+
len0 = WASM_VECTOR_LEN;
|
|
1456
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1457
|
+
len1 = WASM_VECTOR_LEN;
|
|
1458
|
+
} catch (e) {
|
|
1459
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1460
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1461
|
+
throw e;
|
|
1462
|
+
}
|
|
1463
|
+
const ret = wasm.tostWilcoxonPaired(ptr0, len0, ptr1, len1, val3, val4, !isLikeNone(alpha), val5);
|
|
1262
1464
|
if (ret[2]) {
|
|
1263
1465
|
throw takeFromExternrefTable0(ret[1]);
|
|
1264
1466
|
}
|
|
@@ -1274,19 +1476,29 @@ export function tostWilcoxonPaired(x, y, lower_bound, upper_bound, alpha) {
|
|
|
1274
1476
|
* @param upperBound - Upper equivalence bound
|
|
1275
1477
|
* @param alpha - Significance level (default: 0.05)
|
|
1276
1478
|
* @returns TOST result object
|
|
1277
|
-
* @param {Float64Array} x
|
|
1278
|
-
* @param {Float64Array} y
|
|
1479
|
+
* @param {Float64Array | number[]} x
|
|
1480
|
+
* @param {Float64Array | number[]} y
|
|
1279
1481
|
* @param {number} lower_bound
|
|
1280
1482
|
* @param {number} upper_bound
|
|
1281
1483
|
* @param {number | null} [alpha]
|
|
1282
1484
|
* @returns {any}
|
|
1283
1485
|
*/
|
|
1284
1486
|
export function tostWilcoxonTwoSample(x, y, lower_bound, upper_bound, alpha) {
|
|
1285
|
-
const
|
|
1286
|
-
const
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
|
|
1487
|
+
const val3 = +lower_bound;
|
|
1488
|
+
const val4 = +upper_bound;
|
|
1489
|
+
const val5 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
1490
|
+
let ptr0, len0, ptr1, len1;
|
|
1491
|
+
try {
|
|
1492
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1493
|
+
len0 = WASM_VECTOR_LEN;
|
|
1494
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1495
|
+
len1 = WASM_VECTOR_LEN;
|
|
1496
|
+
} catch (e) {
|
|
1497
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1498
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1499
|
+
throw e;
|
|
1500
|
+
}
|
|
1501
|
+
const ret = wasm.tostWilcoxonTwoSample(ptr0, len0, ptr1, len1, val3, val4, !isLikeNone(alpha), val5);
|
|
1290
1502
|
if (ret[2]) {
|
|
1291
1503
|
throw takeFromExternrefTable0(ret[1]);
|
|
1292
1504
|
}
|
|
@@ -1303,8 +1515,8 @@ export function tostWilcoxonTwoSample(x, y, lower_bound, upper_bound, alpha) {
|
|
|
1303
1515
|
* @param trim - Trim proportion (default: 0.2)
|
|
1304
1516
|
* @param alpha - Significance level (default: 0.05)
|
|
1305
1517
|
* @returns TOST result object
|
|
1306
|
-
* @param {Float64Array} x
|
|
1307
|
-
* @param {Float64Array} y
|
|
1518
|
+
* @param {Float64Array | number[]} x
|
|
1519
|
+
* @param {Float64Array | number[]} y
|
|
1308
1520
|
* @param {number} lower_bound
|
|
1309
1521
|
* @param {number} upper_bound
|
|
1310
1522
|
* @param {number | null} [trim]
|
|
@@ -1312,11 +1524,22 @@ export function tostWilcoxonTwoSample(x, y, lower_bound, upper_bound, alpha) {
|
|
|
1312
1524
|
* @returns {any}
|
|
1313
1525
|
*/
|
|
1314
1526
|
export function tostYuen(x, y, lower_bound, upper_bound, trim, alpha) {
|
|
1315
|
-
const
|
|
1316
|
-
const
|
|
1317
|
-
const
|
|
1318
|
-
const
|
|
1319
|
-
|
|
1527
|
+
const val3 = +lower_bound;
|
|
1528
|
+
const val4 = +upper_bound;
|
|
1529
|
+
const val5 = +(isLikeNone(trim) ? 0 : trim);
|
|
1530
|
+
const val6 = +(isLikeNone(alpha) ? 0 : alpha);
|
|
1531
|
+
let ptr0, len0, ptr1, len1;
|
|
1532
|
+
try {
|
|
1533
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1534
|
+
len0 = WASM_VECTOR_LEN;
|
|
1535
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1536
|
+
len1 = WASM_VECTOR_LEN;
|
|
1537
|
+
} catch (e) {
|
|
1538
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1539
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1540
|
+
throw e;
|
|
1541
|
+
}
|
|
1542
|
+
const ret = wasm.tostYuen(ptr0, len0, ptr1, len1, val3, val4, !isLikeNone(trim), val5, !isLikeNone(alpha), val6);
|
|
1320
1543
|
if (ret[2]) {
|
|
1321
1544
|
throw takeFromExternrefTable0(ret[1]);
|
|
1322
1545
|
}
|
|
@@ -1336,18 +1559,26 @@ export function tostYuen(x, y, lower_bound, upper_bound, trim, alpha) {
|
|
|
1336
1559
|
* @returns Object with factor_a, factor_b, interaction, residual, total rows
|
|
1337
1560
|
* (each: ss, df, ms, f_statistic, p_value), plus levels_a, levels_b, n,
|
|
1338
1561
|
* grand_mean, cell_means, marginal_means_a, marginal_means_b.
|
|
1339
|
-
* @param {Float64Array} values
|
|
1340
|
-
* @param {Uint32Array} factor_a
|
|
1341
|
-
* @param {Uint32Array} factor_b
|
|
1562
|
+
* @param {Float64Array | number[]} values
|
|
1563
|
+
* @param {Uint32Array | number[]} factor_a
|
|
1564
|
+
* @param {Uint32Array | number[]} factor_b
|
|
1342
1565
|
* @returns {any}
|
|
1343
1566
|
*/
|
|
1344
1567
|
export function twoWayAnova(values, factor_a, factor_b) {
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1568
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
1569
|
+
try {
|
|
1570
|
+
ptr0 = passArrayF64ToWasm0(values, wasm.__wbindgen_malloc);
|
|
1571
|
+
len0 = WASM_VECTOR_LEN;
|
|
1572
|
+
ptr1 = passArray32ToWasm0(factor_a, wasm.__wbindgen_malloc);
|
|
1573
|
+
len1 = WASM_VECTOR_LEN;
|
|
1574
|
+
ptr2 = passArray32ToWasm0(factor_b, wasm.__wbindgen_malloc);
|
|
1575
|
+
len2 = WASM_VECTOR_LEN;
|
|
1576
|
+
} catch (e) {
|
|
1577
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 4, 4); }
|
|
1578
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 4, 4); }
|
|
1579
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1580
|
+
throw e;
|
|
1581
|
+
}
|
|
1351
1582
|
const ret = wasm.twoWayAnova(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1352
1583
|
if (ret[2]) {
|
|
1353
1584
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -1366,8 +1597,8 @@ export function twoWayAnova(values, factor_a, factor_b) {
|
|
|
1366
1597
|
* @param confLevel - Confidence level for CI (optional)
|
|
1367
1598
|
* @param mu - Null hypothesis value (default: 0.0)
|
|
1368
1599
|
* @returns Object with statistic, p_value, estimate, null_value, conf_int
|
|
1369
|
-
* @param {Float64Array} x
|
|
1370
|
-
* @param {Float64Array} y
|
|
1600
|
+
* @param {Float64Array | number[]} x
|
|
1601
|
+
* @param {Float64Array | number[]} y
|
|
1371
1602
|
* @param {JsAlternative} alternative
|
|
1372
1603
|
* @param {boolean | null} [continuity_correction]
|
|
1373
1604
|
* @param {boolean | null} [exact]
|
|
@@ -1376,11 +1607,21 @@ export function twoWayAnova(values, factor_a, factor_b) {
|
|
|
1376
1607
|
* @returns {any}
|
|
1377
1608
|
*/
|
|
1378
1609
|
export function wilcoxonSignedRank(x, y, alternative, continuity_correction, exact, conf_level, mu) {
|
|
1379
|
-
const
|
|
1380
|
-
const
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1383
|
-
|
|
1610
|
+
const val3 = +alternative;
|
|
1611
|
+
const val4 = +(isLikeNone(conf_level) ? 0 : conf_level);
|
|
1612
|
+
const val5 = +(isLikeNone(mu) ? 0 : mu);
|
|
1613
|
+
let ptr0, len0, ptr1, len1;
|
|
1614
|
+
try {
|
|
1615
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1616
|
+
len0 = WASM_VECTOR_LEN;
|
|
1617
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1618
|
+
len1 = WASM_VECTOR_LEN;
|
|
1619
|
+
} catch (e) {
|
|
1620
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1621
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1622
|
+
throw e;
|
|
1623
|
+
}
|
|
1624
|
+
const ret = wasm.wilcoxonSignedRank(ptr0, len0, ptr1, len1, val3, isLikeNone(continuity_correction) ? 0xFFFFFF : continuity_correction ? 1 : 0, isLikeNone(exact) ? 0xFFFFFF : exact ? 1 : 0, !isLikeNone(conf_level), val4, !isLikeNone(mu), val5);
|
|
1384
1625
|
if (ret[2]) {
|
|
1385
1626
|
throw takeFromExternrefTable0(ret[1]);
|
|
1386
1627
|
}
|
|
@@ -1396,19 +1637,29 @@ export function wilcoxonSignedRank(x, y, alternative, continuity_correction, exa
|
|
|
1396
1637
|
* @param alternative - Alternative hypothesis direction
|
|
1397
1638
|
* @param confLevel - Confidence level for CI (optional)
|
|
1398
1639
|
* @returns Object with statistic, df, p_value, diff, trimmed_mean_x, trimmed_mean_y
|
|
1399
|
-
* @param {Float64Array} x
|
|
1400
|
-
* @param {Float64Array} y
|
|
1640
|
+
* @param {Float64Array | number[]} x
|
|
1641
|
+
* @param {Float64Array | number[]} y
|
|
1401
1642
|
* @param {number | null | undefined} trim
|
|
1402
1643
|
* @param {JsAlternative} alternative
|
|
1403
1644
|
* @param {number | null} [conf_level]
|
|
1404
1645
|
* @returns {any}
|
|
1405
1646
|
*/
|
|
1406
1647
|
export function yuenTest(x, y, trim, alternative, conf_level) {
|
|
1407
|
-
const
|
|
1408
|
-
const
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
|
|
1648
|
+
const val3 = +(isLikeNone(trim) ? 0 : trim);
|
|
1649
|
+
const val4 = +alternative;
|
|
1650
|
+
const val5 = +(isLikeNone(conf_level) ? 0 : conf_level);
|
|
1651
|
+
let ptr0, len0, ptr1, len1;
|
|
1652
|
+
try {
|
|
1653
|
+
ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
1654
|
+
len0 = WASM_VECTOR_LEN;
|
|
1655
|
+
ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_malloc);
|
|
1656
|
+
len1 = WASM_VECTOR_LEN;
|
|
1657
|
+
} catch (e) {
|
|
1658
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
1659
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
1660
|
+
throw e;
|
|
1661
|
+
}
|
|
1662
|
+
const ret = wasm.yuenTest(ptr0, len0, ptr1, len1, !isLikeNone(trim), val3, val4, !isLikeNone(conf_level), val5);
|
|
1412
1663
|
if (ret[2]) {
|
|
1413
1664
|
throw takeFromExternrefTable0(ret[1]);
|
|
1414
1665
|
}
|
|
@@ -1417,7 +1668,7 @@ export function yuenTest(x, y, trim, alternative, conf_level) {
|
|
|
1417
1668
|
function __wbg_get_imports() {
|
|
1418
1669
|
const import0 = {
|
|
1419
1670
|
__proto__: null,
|
|
1420
|
-
|
|
1671
|
+
__wbg_Error_208446807d0d1e30: function(arg0, arg1) {
|
|
1421
1672
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1422
1673
|
return ret;
|
|
1423
1674
|
},
|
|
@@ -1425,138 +1676,138 @@ function __wbg_get_imports() {
|
|
|
1425
1676
|
const ret = String(arg1);
|
|
1426
1677
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1427
1678
|
const len1 = WASM_VECTOR_LEN;
|
|
1428
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1429
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1679
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
1680
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
1430
1681
|
},
|
|
1431
|
-
|
|
1682
|
+
__wbg___wbindgen_is_function_741ff2bb612836f5: function(arg0) {
|
|
1432
1683
|
const ret = typeof(arg0) === 'function';
|
|
1433
1684
|
return ret;
|
|
1434
1685
|
},
|
|
1435
|
-
|
|
1686
|
+
__wbg___wbindgen_is_object_8b968c3ab8e96595: function(arg0) {
|
|
1436
1687
|
const val = arg0;
|
|
1437
1688
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1438
1689
|
return ret;
|
|
1439
1690
|
},
|
|
1440
|
-
|
|
1691
|
+
__wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
|
|
1441
1692
|
const ret = typeof(arg0) === 'string';
|
|
1442
1693
|
return ret;
|
|
1443
1694
|
},
|
|
1444
|
-
|
|
1695
|
+
__wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
|
|
1445
1696
|
const ret = arg0 === undefined;
|
|
1446
1697
|
return ret;
|
|
1447
1698
|
},
|
|
1448
|
-
|
|
1699
|
+
__wbg___wbindgen_number_get_934b640d0889af78: function(arg0, arg1) {
|
|
1449
1700
|
const obj = arg1;
|
|
1450
1701
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1451
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1452
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1702
|
+
getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1703
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
|
|
1453
1704
|
},
|
|
1454
|
-
|
|
1705
|
+
__wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
|
|
1455
1706
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1456
1707
|
},
|
|
1457
|
-
|
|
1708
|
+
__wbg_call_a410eb4b59ed5965: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1458
1709
|
const ret = arg0.call(arg1, arg2);
|
|
1459
1710
|
return ret;
|
|
1460
1711
|
}, arguments); },
|
|
1461
|
-
|
|
1712
|
+
__wbg_crypto_23f565a907d30078: function(arg0) {
|
|
1462
1713
|
const ret = arg0.crypto;
|
|
1463
1714
|
return ret;
|
|
1464
1715
|
},
|
|
1465
|
-
|
|
1716
|
+
__wbg_from_eac91875c8a5ffa4: function(arg0) {
|
|
1466
1717
|
const ret = Array.from(arg0);
|
|
1467
1718
|
return ret;
|
|
1468
1719
|
},
|
|
1469
|
-
|
|
1720
|
+
__wbg_getRandomValues_d2908e0b99612b91: function() { return handleError(function (arg0, arg1) {
|
|
1470
1721
|
arg0.getRandomValues(arg1);
|
|
1471
1722
|
}, arguments); },
|
|
1472
|
-
|
|
1723
|
+
__wbg_get_d7176cfb76d71114: function(arg0, arg1) {
|
|
1473
1724
|
const ret = arg0[arg1 >>> 0];
|
|
1474
1725
|
return ret;
|
|
1475
1726
|
},
|
|
1476
|
-
|
|
1727
|
+
__wbg_get_unchecked_e6325ad374eff861: function(arg0, arg1) {
|
|
1477
1728
|
const ret = arg0[arg1 >>> 0];
|
|
1478
1729
|
return ret;
|
|
1479
1730
|
},
|
|
1480
|
-
|
|
1731
|
+
__wbg_length_186163212ffe79c3: function(arg0) {
|
|
1481
1732
|
const ret = arg0.length;
|
|
1482
1733
|
return ret;
|
|
1483
1734
|
},
|
|
1484
|
-
|
|
1735
|
+
__wbg_length_5a8bb8abe1e54e15: function(arg0) {
|
|
1485
1736
|
const ret = arg0.length;
|
|
1486
1737
|
return ret;
|
|
1487
1738
|
},
|
|
1488
|
-
|
|
1739
|
+
__wbg_length_b03a0fabb109b1e9: function(arg0) {
|
|
1489
1740
|
const ret = arg0.length;
|
|
1490
1741
|
return ret;
|
|
1491
1742
|
},
|
|
1492
|
-
|
|
1743
|
+
__wbg_msCrypto_d5f06fad6bf1409b: function(arg0) {
|
|
1493
1744
|
const ret = arg0.msCrypto;
|
|
1494
1745
|
return ret;
|
|
1495
1746
|
},
|
|
1496
|
-
|
|
1497
|
-
const ret = new Object();
|
|
1498
|
-
return ret;
|
|
1499
|
-
},
|
|
1500
|
-
__wbg_new_c0cfdc72bf7dee4d: function(arg0) {
|
|
1747
|
+
__wbg_new_22589e9be6cca455: function(arg0) {
|
|
1501
1748
|
const ret = new Float64Array(arg0);
|
|
1502
1749
|
return ret;
|
|
1503
1750
|
},
|
|
1504
|
-
|
|
1751
|
+
__wbg_new_37eb45aaf5eeb820: function() {
|
|
1505
1752
|
const ret = new Array();
|
|
1506
1753
|
return ret;
|
|
1507
1754
|
},
|
|
1508
|
-
|
|
1755
|
+
__wbg_new_cd4348290afae586: function() {
|
|
1756
|
+
const ret = new Object();
|
|
1757
|
+
return ret;
|
|
1758
|
+
},
|
|
1759
|
+
__wbg_new_with_length_01b143a7e5dd5a3e: function(arg0) {
|
|
1509
1760
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1510
1761
|
return ret;
|
|
1511
1762
|
},
|
|
1512
|
-
|
|
1763
|
+
__wbg_node_86166ff8ce1f2002: function(arg0) {
|
|
1513
1764
|
const ret = arg0.node;
|
|
1514
1765
|
return ret;
|
|
1515
1766
|
},
|
|
1516
|
-
|
|
1767
|
+
__wbg_process_91f425a63f58e399: function(arg0) {
|
|
1517
1768
|
const ret = arg0.process;
|
|
1518
1769
|
return ret;
|
|
1519
1770
|
},
|
|
1520
|
-
|
|
1771
|
+
__wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
|
|
1521
1772
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1522
1773
|
},
|
|
1523
|
-
|
|
1774
|
+
__wbg_prototypesetcall_a366c038a3918afa: function(arg0, arg1, arg2) {
|
|
1524
1775
|
Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);
|
|
1525
1776
|
},
|
|
1526
|
-
|
|
1777
|
+
__wbg_randomFillSync_34b023059e3363de: function() { return handleError(function (arg0, arg1) {
|
|
1527
1778
|
arg0.randomFillSync(arg1);
|
|
1528
1779
|
}, arguments); },
|
|
1529
|
-
|
|
1780
|
+
__wbg_require_9a7d8cc2e1d275c0: function() { return handleError(function () {
|
|
1530
1781
|
const ret = module.require;
|
|
1531
1782
|
return ret;
|
|
1532
1783
|
}, arguments); },
|
|
1533
|
-
|
|
1534
|
-
arg0[arg1] = arg2;
|
|
1535
|
-
},
|
|
1536
|
-
__wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
|
|
1784
|
+
__wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
|
|
1537
1785
|
arg0[arg1 >>> 0] = arg2;
|
|
1538
1786
|
},
|
|
1539
|
-
|
|
1540
|
-
|
|
1787
|
+
__wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
|
|
1788
|
+
arg0[arg1] = arg2;
|
|
1789
|
+
},
|
|
1790
|
+
__wbg_static_accessor_GLOBAL_THIS_003ee833af9699fc: function() {
|
|
1791
|
+
const ret = typeof globalThis === 'undefined' ? undefined : globalThis;
|
|
1541
1792
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1542
1793
|
},
|
|
1543
|
-
|
|
1544
|
-
const ret = typeof
|
|
1794
|
+
__wbg_static_accessor_GLOBAL_e4293fb22cbe77da: function() {
|
|
1795
|
+
const ret = typeof global === 'undefined' ? undefined : global;
|
|
1545
1796
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1546
1797
|
},
|
|
1547
|
-
|
|
1548
|
-
const ret = typeof self === 'undefined' ?
|
|
1798
|
+
__wbg_static_accessor_SELF_53bb20457401453d: function() {
|
|
1799
|
+
const ret = typeof self === 'undefined' ? undefined : self;
|
|
1549
1800
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1550
1801
|
},
|
|
1551
|
-
|
|
1552
|
-
const ret = typeof window === 'undefined' ?
|
|
1802
|
+
__wbg_static_accessor_WINDOW_b5e0810bfecb7feb: function() {
|
|
1803
|
+
const ret = typeof window === 'undefined' ? undefined : window;
|
|
1553
1804
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1554
1805
|
},
|
|
1555
|
-
|
|
1806
|
+
__wbg_subarray_58f388a9247ac0bb: function(arg0, arg1, arg2) {
|
|
1556
1807
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1557
1808
|
return ret;
|
|
1558
1809
|
},
|
|
1559
|
-
|
|
1810
|
+
__wbg_versions_6e128a981b0df859: function(arg0) {
|
|
1560
1811
|
const ret = arg0.versions;
|
|
1561
1812
|
return ret;
|
|
1562
1813
|
},
|
|
@@ -1582,12 +1833,11 @@ function __wbg_get_imports() {
|
|
|
1582
1833
|
},
|
|
1583
1834
|
__wbindgen_init_externref_table: function() {
|
|
1584
1835
|
const table = wasm.__wbindgen_externrefs;
|
|
1585
|
-
const offset = table.grow(4);
|
|
1586
1836
|
table.set(0, undefined);
|
|
1587
|
-
table.set(
|
|
1588
|
-
table.set(
|
|
1589
|
-
table.set(
|
|
1590
|
-
table.set(
|
|
1837
|
+
table.set(1024, undefined);
|
|
1838
|
+
table.set(1025, null);
|
|
1839
|
+
table.set(1026, true);
|
|
1840
|
+
table.set(1027, false);
|
|
1591
1841
|
},
|
|
1592
1842
|
};
|
|
1593
1843
|
return {
|
|
@@ -1629,7 +1879,8 @@ function getFloat64ArrayMemory0() {
|
|
|
1629
1879
|
}
|
|
1630
1880
|
|
|
1631
1881
|
function getStringFromWasm0(ptr, len) {
|
|
1632
|
-
|
|
1882
|
+
ptr = ptr >>> 0;
|
|
1883
|
+
return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1633
1884
|
}
|
|
1634
1885
|
|
|
1635
1886
|
let cachedUint32ArrayMemory0 = null;
|
|
@@ -1718,18 +1969,18 @@ function takeFromExternrefTable0(idx) {
|
|
|
1718
1969
|
return value;
|
|
1719
1970
|
}
|
|
1720
1971
|
|
|
1721
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
1972
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
1722
1973
|
cachedTextDecoder.decode();
|
|
1723
1974
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1724
1975
|
let numBytesDecoded = 0;
|
|
1725
|
-
function decodeText(
|
|
1726
|
-
numBytesDecoded +=
|
|
1976
|
+
function decodeText(bytes) {
|
|
1977
|
+
numBytesDecoded += bytes.length;
|
|
1727
1978
|
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1728
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
1979
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
1729
1980
|
cachedTextDecoder.decode();
|
|
1730
|
-
numBytesDecoded =
|
|
1981
|
+
numBytesDecoded = bytes.length;
|
|
1731
1982
|
}
|
|
1732
|
-
return cachedTextDecoder.decode(
|
|
1983
|
+
return cachedTextDecoder.decode(bytes);
|
|
1733
1984
|
}
|
|
1734
1985
|
|
|
1735
1986
|
const cachedTextEncoder = new TextEncoder();
|
|
@@ -1819,9 +2070,17 @@ function initSync(module) {
|
|
|
1819
2070
|
return __wbg_finalize_init(instance, module);
|
|
1820
2071
|
}
|
|
1821
2072
|
|
|
2073
|
+
let __wbg_init_promise;
|
|
1822
2074
|
async function __wbg_init(module_or_path) {
|
|
1823
2075
|
if (wasm !== undefined) return wasm;
|
|
2076
|
+
if (__wbg_init_promise === undefined) {
|
|
2077
|
+
__wbg_init_promise = __wbg_init_once(module_or_path);
|
|
2078
|
+
__wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
|
|
2079
|
+
}
|
|
2080
|
+
return __wbg_init_promise;
|
|
2081
|
+
}
|
|
1824
2082
|
|
|
2083
|
+
async function __wbg_init_once(module_or_path) {
|
|
1825
2084
|
|
|
1826
2085
|
if (module_or_path !== undefined) {
|
|
1827
2086
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|