@numero-uno-jpn/rstats 0.9.0 → 0.10.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/CHANGELOG.md +63 -0
- package/README.ja.md +60 -11
- package/README.md +59 -10
- package/THIRD_PARTY_NOTICES.md +7 -2
- package/dist/chunks/{chunk-H2AP6TCR.js → chunk-2XKG3DX4.js} +1 -1
- package/dist/chunks/{chunk-FC2TLHZC.js → chunk-4NM37MGA.js} +2 -2
- package/dist/chunks/chunk-7HPVUVZB.js +2 -0
- package/dist/chunks/{chunk-YC4JWUKG.js → chunk-AECGWZHD.js} +2 -2
- package/dist/chunks/{chunk-LE7TBHNI.js → chunk-ENL43FNO.js} +2 -2
- package/dist/chunks/chunk-EWC6I75B.js +2 -0
- package/dist/chunks/chunk-IT354SHV.js +3 -0
- package/dist/chunks/{chunk-BGVMSDVJ.js → chunk-LIMZKONM.js} +2 -2
- package/dist/chunks/chunk-O6PT7IVU.js +2 -0
- package/dist/chunks/{chunk-TOVTN5Y2.js → chunk-QFULZNHL.js} +1 -1
- package/dist/chunks/{chunk-5K4PS7IV.js → chunk-QJJWGNJP.js} +2 -2
- package/dist/chunks/{chunk-LWUSYIQ4.js → chunk-QULPY6YM.js} +1 -1
- package/dist/chunks/chunk-XWTZ4RTR.js +2 -0
- package/dist/chunks/chunk-ZRIM4R4A.js +2 -0
- package/dist/descriptive/factanal.d.ts +56 -0
- package/dist/descriptive/factanal.js +186 -0
- package/dist/descriptive/omega.d.ts +56 -0
- package/dist/descriptive/omega.js +323 -0
- package/dist/descriptive.js +2 -2
- package/dist/distributions/bvnorm.d.ts +15 -0
- package/dist/distributions/bvnorm.js +131 -0
- package/dist/distributions/nbeta.js +34 -1
- package/dist/distributions/nchisq.d.ts +10 -0
- package/dist/distributions/nchisq.js +46 -0
- package/dist/distributions.js +2 -2
- package/dist/entries/distributions.d.ts +1 -0
- package/dist/entries/distributions.js +1 -0
- package/dist/entries/linalg.d.ts +2 -0
- package/dist/entries/linalg.js +2 -0
- package/dist/entries/numerics.d.ts +2 -0
- package/dist/entries/numerics.js +1 -0
- package/dist/entries/tests.d.ts +22 -1
- package/dist/entries/tests.js +19 -1
- package/dist/htest/agreement.d.ts +141 -0
- package/dist/htest/agreement.js +274 -0
- package/dist/htest/aov.d.ts +19 -0
- package/dist/htest/aov.js +22 -15
- package/dist/htest/core/simulate.d.ts +2 -0
- package/dist/htest/core/simulate.js +1 -1
- package/dist/htest/dunnett.d.ts +5 -0
- package/dist/htest/dunnett.js +89 -0
- package/dist/htest/effectSize.d.ts +112 -0
- package/dist/htest/effectSize.js +385 -0
- package/dist/htest/leveneTest.d.ts +30 -0
- package/dist/htest/leveneTest.js +41 -0
- package/dist/htest/multipleComparisons.d.ts +147 -0
- package/dist/htest/multipleComparisons.js +369 -0
- package/dist/htest/normalityTests.d.ts +44 -0
- package/dist/htest/normalityTests.js +164 -0
- package/dist/htest/polycor.d.ts +117 -0
- package/dist/htest/polycor.js +468 -0
- package/dist/htest/power.d.ts +132 -0
- package/dist/htest/power.js +227 -0
- package/dist/htest/pwr.d.ts +263 -0
- package/dist/htest/pwr.js +440 -0
- package/dist/htest/rankTests.d.ts +7 -0
- package/dist/htest/rankTests.js +11 -1
- package/dist/htest/trendTests.d.ts +57 -0
- package/dist/htest/trendTests.js +167 -0
- package/dist/linalg/eigen.d.ts +8 -0
- package/dist/linalg/eigen.js +5 -4
- package/dist/linalg/expm.d.ts +48 -0
- package/dist/linalg/expm.js +472 -0
- package/dist/linalg/schur.d.ts +48 -0
- package/dist/linalg/schur.js +225 -0
- package/dist/linalg.js +2 -2
- package/dist/models/anovaSequential.d.ts +58 -0
- package/dist/models/anovaSequential.js +138 -0
- package/dist/models/aovEz.d.ts +64 -0
- package/dist/models/aovEz.js +332 -0
- package/dist/models/aovStrata.d.ts +32 -0
- package/dist/models/aovStrata.js +104 -0
- package/dist/models/carAnova.d.ts +30 -0
- package/dist/models/carAnova.js +121 -0
- package/dist/models/coxph.d.ts +101 -0
- package/dist/models/coxph.js +502 -0
- package/dist/models/ddLeastSquares.d.ts +30 -0
- package/dist/models/ddLeastSquares.js +90 -0
- package/dist/models/ddMatrix.d.ts +10 -0
- package/dist/models/ddMatrix.js +91 -0
- package/dist/models/formula.d.ts +83 -0
- package/dist/models/formula.js +333 -0
- package/dist/models/lm.d.ts +84 -3
- package/dist/models/lm.js +141 -44
- package/dist/models/mauchly.d.ts +48 -0
- package/dist/models/mauchly.js +123 -0
- package/dist/models/modelFrame.d.ts +40 -0
- package/dist/models/modelFrame.js +131 -0
- package/dist/models/modelMatrix.d.ts +88 -0
- package/dist/models/modelMatrix.js +170 -0
- package/dist/models/survival.d.ts +87 -0
- package/dist/models/survival.js +238 -0
- package/dist/numerics.js +2 -2
- package/dist/optim/lbfgsb.d.ts +20 -0
- package/dist/optim/lbfgsb.js +1240 -0
- package/dist/optim/optim.d.ts +85 -0
- package/dist/optim/optim.js +610 -0
- package/dist/rstats.js +19 -4
- package/dist/special.js +2 -2
- package/dist/tests.js +18 -4
- package/llms.txt +102 -0
- package/package.json +3 -2
- package/dist/chunks/chunk-24U4DKRY.js +0 -2
- package/dist/chunks/chunk-IVOBWYLV.js +0 -2
- package/dist/chunks/chunk-JLSTEMSN.js +0 -2
- package/dist/chunks/chunk-MF4VBCHQ.js +0 -2
- package/dist/chunks/chunk-MSAUU6PY.js +0 -2
- package/dist/chunks/chunk-ZRO446BP.js +0 -2
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// Tests for a trend: the chi-squared test for trend in proportions (R's prop.trend.test) and the Jonckheere-Terpstra
|
|
2
|
+
// test for ordered alternatives (DescTools' JonckheereTerpstraTest and clinfun's jonckheere.test).
|
|
3
|
+
//
|
|
4
|
+
// Written for rStats.js from oracle/rm-tests-behaviour.md (no ported code; the source of R, DescTools and clinfun was
|
|
5
|
+
// not read):
|
|
6
|
+
// - prop.trend.test: the weighted regression sum of squares of the proportions on the scores, with weights
|
|
7
|
+
// n_i / (p (1 - p)), chi-squared with 1 degree of freedom.
|
|
8
|
+
// - Jonckheere-Terpstra: JT is the sum over ordered pairs of groups of the Mann-Whitney counts (ties count 1/2). Its
|
|
9
|
+
// exact null distribution is the convolution of the Mann-Whitney distributions of each group against all later
|
|
10
|
+
// groups; the normal approximation uses mean sum n_i m_i / 2 and variance sum n_i m_i (n_i + m_i + 1) / 12 (m_i the
|
|
11
|
+
// number of observations after group i; no tie correction).
|
|
12
|
+
import { pgamma1 } from "../distributions/gamma.js";
|
|
13
|
+
import { pnorm } from "../distributions/normal.js";
|
|
14
|
+
import { dwilcox1 } from "../distributions/wilcox.js";
|
|
15
|
+
import { compareCodePoints } from "../models/modelFrame.js";
|
|
16
|
+
import { matchChoice } from "./power.js";
|
|
17
|
+
/**
|
|
18
|
+
* Chi-squared test for trend in proportions. Equivalent to R's `prop.trend.test(x, n, score)`.
|
|
19
|
+
*
|
|
20
|
+
* @param x Numbers of events.
|
|
21
|
+
* @param n Numbers of trials.
|
|
22
|
+
* @param score Scores of the groups. Default `1, 2, ..., k`.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* propTrendTest([15, 10, 8, 4], [30, 30, 30, 30]).statistic; // 9.573428850537288
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export function propTrendTest(x, n, score) {
|
|
30
|
+
const xs = Array.from(x);
|
|
31
|
+
const ns = Array.from(n);
|
|
32
|
+
const k = xs.length;
|
|
33
|
+
const s = score === undefined ? xs.map((_, i) => i + 1) : Array.from(score);
|
|
34
|
+
if (ns.length !== k || s.length !== k)
|
|
35
|
+
throw new RangeError("'x', 'n' and 'score' must have the same length");
|
|
36
|
+
const p = xs.reduce((a, v) => a + v, 0) / ns.reduce((a, v) => a + v, 0);
|
|
37
|
+
const w = ns.map((v) => v / (p * (1 - p)));
|
|
38
|
+
const f = xs.map((v, i) => v / ns[i]);
|
|
39
|
+
const sw = w.reduce((a, v) => a + v, 0);
|
|
40
|
+
const sBar = w.reduce((a, wi, i) => a + wi * s[i], 0) / sw;
|
|
41
|
+
const fBar = w.reduce((a, wi, i) => a + wi * f[i], 0) / sw;
|
|
42
|
+
let sxy = 0;
|
|
43
|
+
let sxx = 0;
|
|
44
|
+
w.forEach((wi, i) => {
|
|
45
|
+
const ds = s[i] - sBar;
|
|
46
|
+
sxy += wi * ds * (f[i] - fBar);
|
|
47
|
+
sxx += wi * ds * ds;
|
|
48
|
+
});
|
|
49
|
+
const statistic = (sxy * sxy) / sxx;
|
|
50
|
+
return {
|
|
51
|
+
method: "Chi-squared Test for Trend in Proportions",
|
|
52
|
+
statistic,
|
|
53
|
+
statisticName: "X-squared",
|
|
54
|
+
parameter: 1,
|
|
55
|
+
parameterName: "df",
|
|
56
|
+
pValue: pgamma1(statistic, 0.5, 2, false, false),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const NOT_EXACT = "Sample size > 100 or data with ties \n p-value based on normal approximation. Specify nperm for permutation p-value";
|
|
60
|
+
const TIES = "Sample data with ties \n p-value based on normal approximation. Specify nperm for permutation p-value.";
|
|
61
|
+
/** The groups in order: the labels sorted (numbers as numbers, strings by code point) or as `levels` */
|
|
62
|
+
function orderedGroups(x, g, levels) {
|
|
63
|
+
const xs = Array.from(x);
|
|
64
|
+
if (xs.length !== g.length)
|
|
65
|
+
throw new RangeError("'x' and 'g' must have the same length");
|
|
66
|
+
const keep = xs.flatMap((v, i) => (Number.isNaN(v) || (typeof g[i] === "number" && Number.isNaN(g[i])) ? [] : [i]));
|
|
67
|
+
let order;
|
|
68
|
+
if (levels !== undefined)
|
|
69
|
+
order = levels.map(String);
|
|
70
|
+
else {
|
|
71
|
+
const distinct = [...new Set(keep.map((i) => g[i]))];
|
|
72
|
+
order = distinct.every((l) => typeof l === "number")
|
|
73
|
+
? distinct.sort((a, b) => a - b).map(String)
|
|
74
|
+
: [...new Set(distinct.map(String))].sort(compareCodePoints);
|
|
75
|
+
}
|
|
76
|
+
const groups = order.map(() => []);
|
|
77
|
+
const index = new Map(order.map((l, k) => [l, k]));
|
|
78
|
+
for (const i of keep) {
|
|
79
|
+
const k = index.get(String(g[i]));
|
|
80
|
+
if (k === undefined)
|
|
81
|
+
throw new RangeError(`the group '${String(g[i])}' is not among 'levels'`);
|
|
82
|
+
groups[k].push(xs[i]);
|
|
83
|
+
}
|
|
84
|
+
return groups;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Jonckheere-Terpstra test of equal distributions against ordered alternatives. Equivalent to DescTools'
|
|
88
|
+
* `JonckheereTerpstraTest(x, g, alternative, exact)` (with `g` an ordered factor) or, with `variant: "clinfun"`, to
|
|
89
|
+
* clinfun's `jonckheere.test(x, g, alternative)` (whose two-sided p-value is `2 min(p_increasing, p_decreasing,
|
|
90
|
+
* 0.5)`; DescTools caps it at 1 instead of 0.5). Pairs with a missing value are dropped.
|
|
91
|
+
*
|
|
92
|
+
* @param x The values.
|
|
93
|
+
* @param g Group labels, parallel to `x`, in the order of the alternative.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* jonckheereTest([1.1, 2.0, 2.4, 3.5, 3.1, 4.6], [1, 1, 2, 2, 3, 3], { alternative: "increasing" }).statistic; // 11
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export function jonckheereTest(x, g, options = {}) {
|
|
101
|
+
const alternative = matchChoice(options.alternative, ["two.sided", "increasing", "decreasing"]);
|
|
102
|
+
const variant = options.variant ?? "DescTools";
|
|
103
|
+
if (variant !== "DescTools" && variant !== "clinfun")
|
|
104
|
+
throw new RangeError(`invalid variant "${String(variant)}"`);
|
|
105
|
+
if (variant === "clinfun" && options.exact !== undefined)
|
|
106
|
+
throw new TypeError("clinfun's jonckheere.test has no option 'exact'");
|
|
107
|
+
const groups = orderedGroups(x, g, options.levels);
|
|
108
|
+
const all = groups.flat();
|
|
109
|
+
const nTotal = all.length;
|
|
110
|
+
const ties = new Set(all).size < nTotal;
|
|
111
|
+
// JT, and the sizes n_i and m_i (observations after group i)
|
|
112
|
+
let jt = 0;
|
|
113
|
+
const sizes = [];
|
|
114
|
+
let after = nTotal;
|
|
115
|
+
groups.forEach((gi, i) => {
|
|
116
|
+
after -= gi.length;
|
|
117
|
+
sizes.push([gi.length, after]);
|
|
118
|
+
for (let j = i + 1; j < groups.length; j++) {
|
|
119
|
+
for (const a of gi)
|
|
120
|
+
for (const b of groups[j])
|
|
121
|
+
jt += a < b ? 1 : a === b ? 0.5 : 0;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const warnings = [];
|
|
125
|
+
let exact = !ties && nTotal <= 100;
|
|
126
|
+
if (variant === "DescTools" && options.exact !== undefined) {
|
|
127
|
+
exact = options.exact;
|
|
128
|
+
if (exact && ties) {
|
|
129
|
+
exact = false;
|
|
130
|
+
warnings.push(TIES);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else if (!exact)
|
|
134
|
+
warnings.push(NOT_EXACT);
|
|
135
|
+
let lower;
|
|
136
|
+
let upper;
|
|
137
|
+
if (exact) {
|
|
138
|
+
// the convolution of the Mann-Whitney distributions
|
|
139
|
+
let dist = [1];
|
|
140
|
+
for (const [ni, mi] of sizes) {
|
|
141
|
+
if (ni === 0 || mi === 0)
|
|
142
|
+
continue;
|
|
143
|
+
const mw = Array.from({ length: ni * mi + 1 }, (_, v) => dwilcox1(v, ni, mi, false));
|
|
144
|
+
const next = new Array(dist.length + mw.length - 1).fill(0);
|
|
145
|
+
dist.forEach((a, u) => mw.forEach((b, v) => (next[u + v] += a * b)));
|
|
146
|
+
dist = next;
|
|
147
|
+
}
|
|
148
|
+
lower = 0;
|
|
149
|
+
upper = 0;
|
|
150
|
+
dist.forEach((pr, v) => {
|
|
151
|
+
if (v <= jt)
|
|
152
|
+
lower += pr;
|
|
153
|
+
if (v >= jt)
|
|
154
|
+
upper += pr;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
const mean = sizes.reduce((a, [ni, mi]) => a + ni * mi, 0) / 2;
|
|
159
|
+
const variance = sizes.reduce((a, [ni, mi]) => a + (ni * mi * (ni + mi + 1)) / 12, 0);
|
|
160
|
+
const z = (jt - mean) / Math.sqrt(variance);
|
|
161
|
+
lower = pnorm(z);
|
|
162
|
+
upper = 1 - lower;
|
|
163
|
+
}
|
|
164
|
+
const cap = variant === "clinfun" ? 0.5 : 1;
|
|
165
|
+
const pValue = alternative === "increasing" ? upper : alternative === "decreasing" ? lower : 2 * Math.min(upper, lower, cap);
|
|
166
|
+
return { method: "Jonckheere-Terpstra test", alternative, statistic: jt, statisticName: "JT", pValue, warnings };
|
|
167
|
+
}
|
package/dist/linalg/eigen.d.ts
CHANGED
|
@@ -50,3 +50,11 @@ export interface EigenResult {
|
|
|
50
50
|
export declare function eigen(x: MatrixInput, options?: EigenOptions): EigenResult;
|
|
51
51
|
/** Same test as R's isSymmetric (all.equal(A, t(A), tolerance = 100 ε)) */
|
|
52
52
|
export declare function isSymmetric(a: Mat): boolean;
|
|
53
|
+
/** Reduce to Hessenberg form by Householder transformations (orthes). V becomes the product of the transformations */
|
|
54
|
+
export declare function orthes(H: Mat, V: Mat): void;
|
|
55
|
+
/**
|
|
56
|
+
* Reduce a Hessenberg matrix to real Schur form by the double-shift QR method and compute eigenvalues (d + i e) and eigenvectors (columns of V) (hqr2).
|
|
57
|
+
* For a complex pair, the eigenvector of d[j] + i e[j] (e[j] > 0) is V[:, j] + i V[:, j+1].
|
|
58
|
+
* With schurOnly, stops at the real Schur form (H = V' A V up to the negligible subdiagonal elements, V orthogonal; used by schur)
|
|
59
|
+
*/
|
|
60
|
+
export declare function hqr2(Hm: Mat, Vm: Mat, d: Float64Array, e: Float64Array, schurOnly?: boolean): void;
|
package/dist/linalg/eigen.js
CHANGED
|
@@ -348,7 +348,7 @@ function normalizeVectors(re, im) {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
/** Reduce to Hessenberg form by Householder transformations (orthes). V becomes the product of the transformations */
|
|
351
|
-
function orthes(H, V) {
|
|
351
|
+
export function orthes(H, V) {
|
|
352
352
|
const n = H.nrow;
|
|
353
353
|
const h = H.data;
|
|
354
354
|
const v = V.data;
|
|
@@ -425,9 +425,10 @@ function cdiv(xr, xi, yr, yi) {
|
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* Reduce a Hessenberg matrix to real Schur form by the double-shift QR method and compute eigenvalues (d + i e) and eigenvectors (columns of V) (hqr2).
|
|
428
|
-
* For a complex pair, the eigenvector of d[j] + i e[j] (e[j] > 0) is V[:, j] + i V[:, j+1]
|
|
428
|
+
* For a complex pair, the eigenvector of d[j] + i e[j] (e[j] > 0) is V[:, j] + i V[:, j+1].
|
|
429
|
+
* With schurOnly, stops at the real Schur form (H = V' A V up to the negligible subdiagonal elements, V orthogonal; used by schur)
|
|
429
430
|
*/
|
|
430
|
-
function hqr2(Hm, Vm, d, e) {
|
|
431
|
+
export function hqr2(Hm, Vm, d, e, schurOnly = false) {
|
|
431
432
|
const nn = Hm.nrow;
|
|
432
433
|
const H = Hm.data;
|
|
433
434
|
const V = Vm.data;
|
|
@@ -644,7 +645,7 @@ function hqr2(Hm, Vm, d, e) {
|
|
|
644
645
|
}
|
|
645
646
|
}
|
|
646
647
|
// Eigenvectors of the upper triangular (real Schur) form by back substitution
|
|
647
|
-
if (norm === 0)
|
|
648
|
+
if (norm === 0 || schurOnly)
|
|
648
649
|
return;
|
|
649
650
|
for (n = nn - 1; n >= 0; n--) {
|
|
650
651
|
p = d[n];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type Mat, type MatrixInput } from "./matrix.js";
|
|
2
|
+
/** Methods of {@link expm}. */
|
|
3
|
+
export type ExpmMethod = "Higham08.b" | "Higham08" | "Pade" | "Taylor" | "PadeO" | "TaylorO";
|
|
4
|
+
/** Options for {@link expm}. */
|
|
5
|
+
export interface ExpmOptions {
|
|
6
|
+
/**
|
|
7
|
+
* `"Higham08.b"` (default): Higham's scaling and squaring with Padé approximants after balancing (LAPACK's
|
|
8
|
+
* `dgebal`, permutation then scaling). `"Higham08"`: the same without balancing. `"Pade"` and `"Taylor"` (and
|
|
9
|
+
* `"PadeO"`, `"TaylorO"`, which compute the same): scaling and squaring with a diagonal Padé approximant or a
|
|
10
|
+
* Taylor polynomial of degree `order` (Shapira and Firth's code in the expm package).
|
|
11
|
+
*/
|
|
12
|
+
method?: ExpmMethod;
|
|
13
|
+
/**
|
|
14
|
+
* Degree of the Padé approximant or the Taylor polynomial (a positive integer), used only by `"Pade"`, `"Taylor"`,
|
|
15
|
+
* `"PadeO"` and `"TaylorO"`. Default: 8.
|
|
16
|
+
*/
|
|
17
|
+
order?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Matrix exponential. Equivalent to R's `expm::expm(x, method, order)` with methods `"Higham08.b"` (the default),
|
|
21
|
+
* `"Higham08"`, `"Pade"`, `"Taylor"`, `"PadeO"` and `"TaylorO"`.
|
|
22
|
+
*
|
|
23
|
+
* `"Higham08.b"` and `"Higham08"` use the scaling and squaring method with Padé approximants of degree 3, 5, 7, 9 or
|
|
24
|
+
* 13 (Higham 2005), with or without balancing first, and throw if a linear system of the method is computationally
|
|
25
|
+
* singular. The other methods use scaling and squaring with a Taylor polynomial or a diagonal Padé approximant of
|
|
26
|
+
* degree `order` (the Padé quotient by the conjugate gradient squared method, as expm does).
|
|
27
|
+
*
|
|
28
|
+
* @param x A square matrix (array of rows).
|
|
29
|
+
* @param options See {@link ExpmOptions}.
|
|
30
|
+
* @returns `exp(x)` as an array of rows.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* expm([[0, 1], [0, 0]]); // [[1, 1], [0, 1]]
|
|
35
|
+
* expm([[0, -1], [1, 0]]); // [[cos 1, -sin 1], [sin 1, cos 1]] (up to rounding)
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function expm(x: MatrixInput, options?: ExpmOptions): number[][];
|
|
39
|
+
/**
|
|
40
|
+
* Balancing (dgebal) with job "P" (permute only) or "S" (scale only); A is overwritten. Indices are 0-based:
|
|
41
|
+
* scale[i] holds the index of the row and column interchanged with i for i < ilo and i > ihi, and the scaling factor
|
|
42
|
+
* for ilo <= i <= ihi
|
|
43
|
+
*/
|
|
44
|
+
export declare function gebal(job: "P" | "S", A: Mat): {
|
|
45
|
+
ilo: number;
|
|
46
|
+
ihi: number;
|
|
47
|
+
scale: Float64Array;
|
|
48
|
+
};
|