rf-touchstone 0.0.0 → 0.0.1
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/coverage/coverage-badge.svg +4 -4
- package/development.md +49 -25
- package/dist/Touchstone.cjs.js +7 -7
- package/dist/Touchstone.es.js +238 -168
- package/dist/Touchstone.umd.js +7 -7
- package/dist/touchstone.d.ts +125 -19
- package/package.json +23 -21
- package/readme.md +16 -4
package/dist/Touchstone.es.js
CHANGED
|
@@ -159,13 +159,13 @@ function Wu(e) {
|
|
|
159
159
|
function Vu(e) {
|
|
160
160
|
return e instanceof Date;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Gu(e) {
|
|
163
163
|
return e instanceof RegExp;
|
|
164
164
|
}
|
|
165
165
|
function Kt(e) {
|
|
166
166
|
return !!(e && typeof e == "object" && e.constructor === Object && !ii(e) && !ui(e));
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function Ju(e) {
|
|
169
169
|
return e ? e instanceof Map || e instanceof $u || typeof e.set == "function" && typeof e.get == "function" && typeof e.keys == "function" && typeof e.has == "function" : !1;
|
|
170
170
|
}
|
|
171
171
|
function Yu(e) {
|
|
@@ -781,7 +781,7 @@ function si() {
|
|
|
781
781
|
function Y(F, _) {
|
|
782
782
|
let N = _;
|
|
783
783
|
if (F.some(($) => $.hasConversion)) {
|
|
784
|
-
const $ = y(F), I = F.map(
|
|
784
|
+
const $ = y(F), I = F.map(J);
|
|
785
785
|
N = function() {
|
|
786
786
|
const U = [], Z = $ ? arguments.length - 1 : arguments.length;
|
|
787
787
|
for (let P = 0; P < Z; P++)
|
|
@@ -798,7 +798,7 @@ function si() {
|
|
|
798
798
|
}
|
|
799
799
|
return T;
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function J(F) {
|
|
802
802
|
let _, N, T, $;
|
|
803
803
|
const I = [], H = [];
|
|
804
804
|
switch (F.types.forEach(function(U) {
|
|
@@ -874,7 +874,7 @@ function si() {
|
|
|
874
874
|
return I ? H ? T === $ : $ >= T : H ? T >= $ : T === $;
|
|
875
875
|
}
|
|
876
876
|
function ie(F) {
|
|
877
|
-
return F.map((_) => sr(_) ?
|
|
877
|
+
return F.map((_) => sr(_) ? Je(_.referToSelf.callback) : ar(_) ? Me(_.referTo.references, _.referTo.callback) : _);
|
|
878
878
|
}
|
|
879
879
|
function fe(F, _, N) {
|
|
880
880
|
const T = [];
|
|
@@ -992,7 +992,7 @@ function si() {
|
|
|
992
992
|
function ae(F, _, N) {
|
|
993
993
|
return Array.prototype.slice.call(F, _, N);
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function Ge(F, _) {
|
|
996
996
|
for (let N = 0; N < F.length; N++)
|
|
997
997
|
if (_(F[N]))
|
|
998
998
|
return F[N];
|
|
@@ -1014,7 +1014,7 @@ function si() {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1017
|
+
function Je(F) {
|
|
1018
1018
|
if (typeof F != "function")
|
|
1019
1019
|
throw new TypeError("Callback function expected as first argument");
|
|
1020
1020
|
return {
|
|
@@ -1080,7 +1080,7 @@ function si() {
|
|
|
1080
1080
|
_ || (T = Ar(T, Z)), zt($, U);
|
|
1081
1081
|
}
|
|
1082
1082
|
return Ae(T || "", $);
|
|
1083
|
-
}, o.create = si, o.createCount = ru.createCount, o.onMismatch = we, o.throwMismatchError = we, o.createError = R, o.clear = l, o.clearConversions = f, o.addTypes = c, o._findType = a, o.referTo = le, o.referToSelf =
|
|
1083
|
+
}, o.create = si, o.createCount = ru.createCount, o.onMismatch = we, o.throwMismatchError = we, o.createError = R, o.clear = l, o.clearConversions = f, o.addTypes = c, o._findType = a, o.referTo = le, o.referToSelf = Je, o.convert = s, o.findSignature = p, o.find = m, o.isTypedFunction = D, o.warnAgainstDeprecatedThis = !0, o.addType = function(F, _) {
|
|
1084
1084
|
let N = "any";
|
|
1085
1085
|
_ !== !1 && n.has("Object") && (N = "Object"), o.addTypes([F], N);
|
|
1086
1086
|
};
|
|
@@ -1114,7 +1114,7 @@ function si() {
|
|
|
1114
1114
|
F.forEach((N) => o.addConversion(N, _));
|
|
1115
1115
|
}, o.removeConversion = function(F) {
|
|
1116
1116
|
on(F);
|
|
1117
|
-
const _ = a(F.to), N =
|
|
1117
|
+
const _ = a(F.to), N = Ge(_.conversionsTo, ($) => $.from === F.from);
|
|
1118
1118
|
if (!N)
|
|
1119
1119
|
throw new Error("Attempt to remove nonexistent conversion from " + F.from + " to " + F.to);
|
|
1120
1120
|
if (N.convert !== F.convert)
|
|
@@ -1132,7 +1132,7 @@ function si() {
|
|
|
1132
1132
|
}, o;
|
|
1133
1133
|
}
|
|
1134
1134
|
const ot = si();
|
|
1135
|
-
function
|
|
1135
|
+
function G(e, r, t, n) {
|
|
1136
1136
|
function i(u) {
|
|
1137
1137
|
var o = mo(u, r.map(Fo));
|
|
1138
1138
|
return wo(e, r, u), t(o);
|
|
@@ -1337,7 +1337,7 @@ function cn(e, r) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
var hi = function() {
|
|
1339
1339
|
return hi = ot.create, ot;
|
|
1340
|
-
}, _o = ["?BigNumber", "?Complex", "?DenseMatrix", "?Fraction"], Bo = /* @__PURE__ */
|
|
1340
|
+
}, _o = ["?BigNumber", "?Complex", "?DenseMatrix", "?Fraction"], Bo = /* @__PURE__ */ G("typed", _o, function(r) {
|
|
1341
1341
|
var {
|
|
1342
1342
|
BigNumber: t,
|
|
1343
1343
|
Complex: n,
|
|
@@ -1432,7 +1432,7 @@ var hi = function() {
|
|
|
1432
1432
|
},
|
|
1433
1433
|
{
|
|
1434
1434
|
name: "RegExp",
|
|
1435
|
-
test:
|
|
1435
|
+
test: Gu
|
|
1436
1436
|
},
|
|
1437
1437
|
{
|
|
1438
1438
|
name: "null",
|
|
@@ -1508,7 +1508,7 @@ var hi = function() {
|
|
|
1508
1508
|
},
|
|
1509
1509
|
{
|
|
1510
1510
|
name: "Map",
|
|
1511
|
-
test:
|
|
1511
|
+
test: Ju
|
|
1512
1512
|
},
|
|
1513
1513
|
{
|
|
1514
1514
|
name: "Object",
|
|
@@ -1773,7 +1773,7 @@ var Sr = 9e15, vr = 1e9, Wt = "0123456789abcdef", at = "2.3025850929940456840179
|
|
|
1773
1773
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
1774
1774
|
crypto: !1
|
|
1775
1775
|
// true/false
|
|
1776
|
-
}, pi, cr, j = !0, Et = "[DecimalError] ", dr = Et + "Invalid argument: ", Di = Et + "Precision limit exceeded", mi = Et + "crypto unavailable", di = "[object Decimal]", $e = Math.floor, Ne = Math.pow, Mo = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, So = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, xo = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, gi = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, rr = 1e7, K = 7, To = 9007199254740991, Io = at.length - 1,
|
|
1776
|
+
}, pi, cr, j = !0, Et = "[DecimalError] ", dr = Et + "Invalid argument: ", Di = Et + "Precision limit exceeded", mi = Et + "crypto unavailable", di = "[object Decimal]", $e = Math.floor, Ne = Math.pow, Mo = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, So = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, xo = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, gi = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, rr = 1e7, K = 7, To = 9007199254740991, Io = at.length - 1, Gt = st.length - 1, z = { toStringTag: di };
|
|
1777
1777
|
z.absoluteValue = z.abs = function() {
|
|
1778
1778
|
var e = new this.constructor(this);
|
|
1779
1779
|
return e.s < 0 && (e.s = 1), X(e);
|
|
@@ -1897,11 +1897,11 @@ z.inverseTangent = z.atan = function() {
|
|
|
1897
1897
|
if (l.isFinite()) {
|
|
1898
1898
|
if (l.isZero())
|
|
1899
1899
|
return new f(l);
|
|
1900
|
-
if (l.abs().eq(1) && h + 4 <=
|
|
1900
|
+
if (l.abs().eq(1) && h + 4 <= Gt)
|
|
1901
1901
|
return o = nr(f, h + 4, D).times(0.25), o.s = l.s, o;
|
|
1902
1902
|
} else {
|
|
1903
1903
|
if (!l.s) return new f(NaN);
|
|
1904
|
-
if (h + 4 <=
|
|
1904
|
+
if (h + 4 <= Gt)
|
|
1905
1905
|
return o = nr(f, h + 4, D).times(0.5), o.s = l.s, o;
|
|
1906
1906
|
}
|
|
1907
1907
|
for (f.precision = a = h + 10, f.rounding = 1, t = Math.min(28, a / K + 2 | 0), e = t; e; --e) l = l.div(l.times(l).plus(1).sqrt().plus(1));
|
|
@@ -1999,7 +1999,7 @@ z.modulo = z.mod = function(e) {
|
|
|
1999
1999
|
return e = new n(e), !t.d || !e.s || e.d && !e.d[0] ? new n(NaN) : !e.d || t.d && !t.d[0] ? X(new n(t), n.precision, n.rounding) : (j = !1, n.modulo == 9 ? (r = he(t, e.abs(), 0, 3, 1), r.s *= e.s) : r = he(t, e, 0, n.modulo, 1), r = r.times(e), j = !0, t.minus(r));
|
|
2000
2000
|
};
|
|
2001
2001
|
z.naturalExponential = z.exp = function() {
|
|
2002
|
-
return
|
|
2002
|
+
return Jt(this);
|
|
2003
2003
|
};
|
|
2004
2004
|
z.naturalLogarithm = z.ln = function() {
|
|
2005
2005
|
return Dr(this);
|
|
@@ -2134,7 +2134,7 @@ z.toPower = z.pow = function(e) {
|
|
|
2134
2134
|
if ((e.d[r] & 1) == 0 && (o = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)
|
|
2135
2135
|
return a.s = o, a;
|
|
2136
2136
|
}
|
|
2137
|
-
return t = Ne(+a, l), r = t == 0 || !isFinite(t) ? $e(l * (Math.log("0." + Ie(a.d)) / Math.LN10 + a.e + 1)) : new c(t + "").e, r > c.maxE + 1 || r < c.minE - 1 ? new c(r > 0 ? o / 0 : 0) : (j = !1, c.rounding = a.s = 1, t = Math.min(12, (r + "").length), i =
|
|
2137
|
+
return t = Ne(+a, l), r = t == 0 || !isFinite(t) ? $e(l * (Math.log("0." + Ie(a.d)) / Math.LN10 + a.e + 1)) : new c(t + "").e, r > c.maxE + 1 || r < c.minE - 1 ? new c(r > 0 ? o / 0 : 0) : (j = !1, c.rounding = a.s = 1, t = Math.min(12, (r + "").length), i = Jt(e.times(Dr(a, n + t)), n), i.d && (i = X(i, n + 5, 1), Lr(i.d, n, u) && (r = n + 10, i = X(Jt(e.times(Dr(a, r + t)), r), r + 5, 1), +Ie(i.d).slice(n + 1, n + 15) + 1 == 1e14 && (i = X(i, n + 1, 0)))), i.s = o, j = !0, c.rounding = u, X(i, n, u));
|
|
2138
2138
|
};
|
|
2139
2139
|
z.toPrecision = function(e, r) {
|
|
2140
2140
|
var t, n = this, i = n.constructor;
|
|
@@ -2305,7 +2305,7 @@ function ft(e, r, t) {
|
|
|
2305
2305
|
return X(new e(at), r, 1, !0);
|
|
2306
2306
|
}
|
|
2307
2307
|
function nr(e, r, t) {
|
|
2308
|
-
if (r >
|
|
2308
|
+
if (r > Gt) throw Error(Di);
|
|
2309
2309
|
return X(new e(st), r, t, !0);
|
|
2310
2310
|
}
|
|
2311
2311
|
function vi(e) {
|
|
@@ -2344,7 +2344,7 @@ function yi(e, r, t) {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
return u;
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function Jt(e, r) {
|
|
2348
2348
|
var t, n, i, u, o, a, c, l = 0, f = 0, h = 0, D = e.constructor, p = D.rounding, m = D.precision;
|
|
2349
2349
|
if (!e.d || !e.d[0] || e.e > 17)
|
|
2350
2350
|
return new D(e.d ? e.d[0] ? e.s < 0 ? 0 : 1 / 0 : 1 : e.s ? e.s < 0 ? 0 : e : NaN);
|
|
@@ -2525,10 +2525,10 @@ function Vo(e, r) {
|
|
|
2525
2525
|
var t, n = this.precision, i = this.rounding, u = n + 4;
|
|
2526
2526
|
return !e.s || !r.s ? t = new this(NaN) : !e.d && !r.d ? (t = nr(this, u, 1).times(r.s > 0 ? 0.25 : 0.75), t.s = e.s) : !r.d || e.isZero() ? (t = r.s < 0 ? nr(this, n, i) : new this(0), t.s = e.s) : !e.d || r.isZero() ? (t = nr(this, u, 1).times(0.5), t.s = e.s) : r.s < 0 ? (this.precision = u, this.rounding = 1, t = this.atan(he(e, r, u, 1)), r = nr(this, u, 1), this.precision = n, this.rounding = i, t = e.s < 0 ? t.minus(r) : t.plus(r)) : t = this.atan(he(e, r, u, 1)), t;
|
|
2527
2527
|
}
|
|
2528
|
-
function
|
|
2528
|
+
function Go(e) {
|
|
2529
2529
|
return new this(e).cbrt();
|
|
2530
2530
|
}
|
|
2531
|
-
function
|
|
2531
|
+
function Jo(e) {
|
|
2532
2532
|
return X(e = new this(e), e.e + 1, 2);
|
|
2533
2533
|
}
|
|
2534
2534
|
function Yo(e, r, t) {
|
|
@@ -2613,7 +2613,7 @@ function Ai(e) {
|
|
|
2613
2613
|
return u < 0 ? (u = -u, l.s = -1) : l.s = 1, tt(l, u.toString());
|
|
2614
2614
|
throw Error(dr + u);
|
|
2615
2615
|
}
|
|
2616
|
-
if (i.prototype = z, i.ROUND_UP = 0, i.ROUND_DOWN = 1, i.ROUND_CEIL = 2, i.ROUND_FLOOR = 3, i.ROUND_HALF_UP = 4, i.ROUND_HALF_DOWN = 5, i.ROUND_HALF_EVEN = 6, i.ROUND_HALF_CEIL = 7, i.ROUND_HALF_FLOOR = 8, i.EUCLID = 9, i.config = i.set = ko, i.clone = Ai, i.isDecimal = pn, i.abs = Po, i.acos = Uo, i.acosh = qo, i.add = Ro, i.asin = Lo, i.asinh = Ho, i.atan = Zo, i.atanh = Wo, i.atan2 = Vo, i.cbrt =
|
|
2616
|
+
if (i.prototype = z, i.ROUND_UP = 0, i.ROUND_DOWN = 1, i.ROUND_CEIL = 2, i.ROUND_FLOOR = 3, i.ROUND_HALF_UP = 4, i.ROUND_HALF_DOWN = 5, i.ROUND_HALF_EVEN = 6, i.ROUND_HALF_CEIL = 7, i.ROUND_HALF_FLOOR = 8, i.EUCLID = 9, i.config = i.set = ko, i.clone = Ai, i.isDecimal = pn, i.abs = Po, i.acos = Uo, i.acosh = qo, i.add = Ro, i.asin = Lo, i.asinh = Ho, i.atan = Zo, i.atanh = Wo, i.atan2 = Vo, i.cbrt = Go, i.ceil = Jo, i.clamp = Yo, i.cos = Xo, i.cosh = Qo, i.div = Ko, i.exp = jo, i.floor = ea, i.hypot = ra, i.ln = ta, i.log = na, i.log10 = ua, i.log2 = ia, i.max = oa, i.min = aa, i.mod = sa, i.mul = fa, i.pow = ca, i.random = la, i.round = ha, i.sign = pa, i.sin = Da, i.sinh = ma, i.sqrt = da, i.sub = ga, i.sum = va, i.tan = wa, i.tanh = ya, i.trunc = Fa, e === void 0 && (e = {}), e && e.defaults !== !0)
|
|
2617
2617
|
for (n = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], r = 0; r < n.length; ) e.hasOwnProperty(t = n[r++]) || (e[t] = this[t]);
|
|
2618
2618
|
return i.config(e), i;
|
|
2619
2619
|
}
|
|
@@ -2728,7 +2728,7 @@ z[Symbol.toStringTag] = "Decimal";
|
|
|
2728
2728
|
var zr = z.constructor = Ai(Vt);
|
|
2729
2729
|
at = new zr(at);
|
|
2730
2730
|
st = new zr(st);
|
|
2731
|
-
var Ea = "BigNumber", Aa = ["?on", "config"], ba = /* @__PURE__ */
|
|
2731
|
+
var Ea = "BigNumber", Aa = ["?on", "config"], ba = /* @__PURE__ */ G(Ea, Aa, (e) => {
|
|
2732
2732
|
var {
|
|
2733
2733
|
on: r,
|
|
2734
2734
|
config: t
|
|
@@ -3495,7 +3495,7 @@ x.E = new x(Math.E, 0);
|
|
|
3495
3495
|
x.INFINITY = new x(1 / 0, 1 / 0);
|
|
3496
3496
|
x.NAN = new x(NaN, NaN);
|
|
3497
3497
|
x.EPSILON = 1e-15;
|
|
3498
|
-
var Ba = "Complex", Na = [], Ma = /* @__PURE__ */
|
|
3498
|
+
var Ba = "Complex", Na = [], Ma = /* @__PURE__ */ G(Ba, Na, () => (Object.defineProperty(x, "name", {
|
|
3499
3499
|
value: "Complex"
|
|
3500
3500
|
}), x.prototype.constructor = x, x.prototype.type = "Complex", x.prototype.isComplex = !0, x.prototype.toJSON = function() {
|
|
3501
3501
|
return {
|
|
@@ -4068,7 +4068,7 @@ Xe.prototype = {
|
|
|
4068
4068
|
return this;
|
|
4069
4069
|
}
|
|
4070
4070
|
};
|
|
4071
|
-
var za = "Fraction", Oa = [], $a = /* @__PURE__ */
|
|
4071
|
+
var za = "Fraction", Oa = [], $a = /* @__PURE__ */ G(za, Oa, () => (Object.defineProperty(Xe, "name", {
|
|
4072
4072
|
value: "Fraction"
|
|
4073
4073
|
}), Xe.prototype.constructor = Xe, Xe.prototype.type = "Fraction", Xe.prototype.isFraction = !0, Xe.prototype.toJSON = function() {
|
|
4074
4074
|
return {
|
|
@@ -4080,7 +4080,7 @@ var za = "Fraction", Oa = [], $a = /* @__PURE__ */ J(za, Oa, () => (Object.defin
|
|
|
4080
4080
|
return new Xe(e);
|
|
4081
4081
|
}, Xe), {
|
|
4082
4082
|
isClass: !0
|
|
4083
|
-
}), Pa = "Matrix", Ua = [], qa = /* @__PURE__ */
|
|
4083
|
+
}), Pa = "Matrix", Ua = [], qa = /* @__PURE__ */ G(Pa, Ua, () => {
|
|
4084
4084
|
function e() {
|
|
4085
4085
|
if (!(this instanceof e))
|
|
4086
4086
|
throw new SyntaxError("Constructor must be called with the new operator");
|
|
@@ -4360,7 +4360,7 @@ function kt(e, r, t, n) {
|
|
|
4360
4360
|
}
|
|
4361
4361
|
}
|
|
4362
4362
|
function _i(e, r) {
|
|
4363
|
-
var t =
|
|
4363
|
+
var t = Ga(e, !0), n = t.length;
|
|
4364
4364
|
if (!Array.isArray(e) || !Array.isArray(r))
|
|
4365
4365
|
throw new TypeError("Array expected");
|
|
4366
4366
|
if (r.length === 0)
|
|
@@ -4420,7 +4420,7 @@ function Mi(e, r, t) {
|
|
|
4420
4420
|
e = [e];
|
|
4421
4421
|
return e;
|
|
4422
4422
|
}
|
|
4423
|
-
function
|
|
4423
|
+
function Ga(e) {
|
|
4424
4424
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
4425
4425
|
if (!Array.isArray(e))
|
|
4426
4426
|
return e;
|
|
@@ -4503,10 +4503,10 @@ function Xt(e, r) {
|
|
|
4503
4503
|
var n = Ti(t, r), i = n.length, u = [...Array(i - t.length).fill(1), ...t], o = Ya(e);
|
|
4504
4504
|
t.length < i && (o = _i(o, u), t = ze(o));
|
|
4505
4505
|
for (var a = 0; a < i; a++)
|
|
4506
|
-
t[a] < n[a] && (o =
|
|
4506
|
+
t[a] < n[a] && (o = Ja(o, n[a], a), t = ze(o));
|
|
4507
4507
|
return o;
|
|
4508
4508
|
}
|
|
4509
|
-
function
|
|
4509
|
+
function Ja(e, r, t) {
|
|
4510
4510
|
return xi(...Array(r).fill(e), t);
|
|
4511
4511
|
}
|
|
4512
4512
|
function zi(e, r) {
|
|
@@ -4624,7 +4624,7 @@ function Ka(e, r, t, n) {
|
|
|
4624
4624
|
} else
|
|
4625
4625
|
throw new TypeError("Function ".concat(t, " cannot apply callback arguments ") + "to function ".concat(n, ": ").concat(e.message));
|
|
4626
4626
|
}
|
|
4627
|
-
var ja = "DenseMatrix", es = ["Matrix"], rs = /* @__PURE__ */
|
|
4627
|
+
var ja = "DenseMatrix", es = ["Matrix"], rs = /* @__PURE__ */ G(ja, es, (e) => {
|
|
4628
4628
|
var {
|
|
4629
4629
|
Matrix: r
|
|
4630
4630
|
} = e;
|
|
@@ -4993,7 +4993,7 @@ function Ve(e, r, t) {
|
|
|
4993
4993
|
var n = (i) => i === 0 ? i : r(i);
|
|
4994
4994
|
return ve(e) ? e.map((i) => n(i), !1, !0) : yn(e, n, !0);
|
|
4995
4995
|
}
|
|
4996
|
-
var En = "isInteger", ts = ["typed"], ns = /* @__PURE__ */
|
|
4996
|
+
var En = "isInteger", ts = ["typed"], ns = /* @__PURE__ */ G(En, ts, (e) => {
|
|
4997
4997
|
var {
|
|
4998
4998
|
typed: r
|
|
4999
4999
|
} = e;
|
|
@@ -5059,7 +5059,7 @@ function gr(e, r) {
|
|
|
5059
5059
|
throw new Error("Absolute tolerance must be at least 0");
|
|
5060
5060
|
return e.isNaN() || r.isNaN() ? !1 : !e.isFinite() || !r.isFinite() ? e.eq(r) : e.eq(r) ? !0 : e.minus(r).abs().lte(e.constructor.max(e.constructor.max(e.abs(), r.abs()).mul(t), n));
|
|
5061
5061
|
}
|
|
5062
|
-
var An = "isPositive", os = ["typed", "config"], as = /* @__PURE__ */
|
|
5062
|
+
var An = "isPositive", os = ["typed", "config"], as = /* @__PURE__ */ G(An, os, (e) => {
|
|
5063
5063
|
var {
|
|
5064
5064
|
typed: r,
|
|
5065
5065
|
config: t
|
|
@@ -5072,7 +5072,7 @@ var An = "isPositive", os = ["typed", "config"], as = /* @__PURE__ */ J(An, os,
|
|
|
5072
5072
|
Unit: r.referToSelf((n) => (i) => r.find(n, i.valueType())(i.value)),
|
|
5073
5073
|
"Array | Matrix": r.referToSelf((n) => (i) => Ve(i, n))
|
|
5074
5074
|
});
|
|
5075
|
-
}), bn = "isZero", ss = ["typed", "equalScalar"], fs = /* @__PURE__ */
|
|
5075
|
+
}), bn = "isZero", ss = ["typed", "equalScalar"], fs = /* @__PURE__ */ G(bn, ss, (e) => {
|
|
5076
5076
|
var {
|
|
5077
5077
|
typed: r,
|
|
5078
5078
|
equalScalar: t
|
|
@@ -5087,7 +5087,7 @@ var An = "isPositive", os = ["typed", "config"], as = /* @__PURE__ */ J(An, os,
|
|
|
5087
5087
|
function cs(e, r, t, n) {
|
|
5088
5088
|
return tr(e.re, r.re, t, n) && tr(e.im, r.im, t, n);
|
|
5089
5089
|
}
|
|
5090
|
-
var Wr = /* @__PURE__ */
|
|
5090
|
+
var Wr = /* @__PURE__ */ G("compareUnits", ["typed"], (e) => {
|
|
5091
5091
|
var {
|
|
5092
5092
|
typed: r
|
|
5093
5093
|
} = e;
|
|
@@ -5098,7 +5098,7 @@ var Wr = /* @__PURE__ */ J("compareUnits", ["typed"], (e) => {
|
|
|
5098
5098
|
return r.find(t, [n.valueType(), i.valueType()])(n.value, i.value);
|
|
5099
5099
|
})
|
|
5100
5100
|
};
|
|
5101
|
-
}), Dt = "equalScalar", ls = ["typed", "config"], hs = /* @__PURE__ */
|
|
5101
|
+
}), Dt = "equalScalar", ls = ["typed", "config"], hs = /* @__PURE__ */ G(Dt, ls, (e) => {
|
|
5102
5102
|
var {
|
|
5103
5103
|
typed: r,
|
|
5104
5104
|
config: t
|
|
@@ -5126,7 +5126,7 @@ var Wr = /* @__PURE__ */ J("compareUnits", ["typed"], (e) => {
|
|
|
5126
5126
|
}
|
|
5127
5127
|
}, n);
|
|
5128
5128
|
});
|
|
5129
|
-
|
|
5129
|
+
G(Dt, ["typed", "config"], (e) => {
|
|
5130
5130
|
var {
|
|
5131
5131
|
typed: r,
|
|
5132
5132
|
config: t
|
|
@@ -5137,7 +5137,7 @@ J(Dt, ["typed", "config"], (e) => {
|
|
|
5137
5137
|
}
|
|
5138
5138
|
});
|
|
5139
5139
|
});
|
|
5140
|
-
var ps = "SparseMatrix", Ds = ["typed", "equalScalar", "Matrix"], ms = /* @__PURE__ */
|
|
5140
|
+
var ps = "SparseMatrix", Ds = ["typed", "equalScalar", "Matrix"], ms = /* @__PURE__ */ G(ps, Ds, (e) => {
|
|
5141
5141
|
var {
|
|
5142
5142
|
typed: r,
|
|
5143
5143
|
equalScalar: t,
|
|
@@ -5227,12 +5227,12 @@ var ps = "SparseMatrix", Ds = ["typed", "equalScalar", "Matrix"], ms = /* @__PUR
|
|
|
5227
5227
|
for (v = 0, A = s._size.length; v < A; v++)
|
|
5228
5228
|
De(C[v], s._size[v]), De(b[v], s._size[v]);
|
|
5229
5229
|
var B = s._values, M = s._index, S = s._ptr, R = d.dimension(0), V = d.dimension(1), q = [], W = [];
|
|
5230
|
-
R.forEach(function(
|
|
5231
|
-
W[
|
|
5230
|
+
R.forEach(function(J, ee) {
|
|
5231
|
+
W[J] = ee[0], q[J] = !0;
|
|
5232
5232
|
});
|
|
5233
5233
|
var O = B ? [] : void 0, Q = [], Y = [];
|
|
5234
|
-
return V.forEach(function(
|
|
5235
|
-
for (Y.push(Q.length), y = S[
|
|
5234
|
+
return V.forEach(function(J) {
|
|
5235
|
+
for (Y.push(Q.length), y = S[J], w = S[J + 1]; y < w; y++)
|
|
5236
5236
|
v = M[y], q[v] === !0 && (Q.push(W[v]), O && O.push(B[y]));
|
|
5237
5237
|
}), Y.push(Q.length), new i({
|
|
5238
5238
|
values: O,
|
|
@@ -5371,8 +5371,8 @@ var ps = "SparseMatrix", Ds = ["typed", "equalScalar", "Matrix"], ms = /* @__PUR
|
|
|
5371
5371
|
throw new TypeError("Array expected");
|
|
5372
5372
|
if (s.length !== 2)
|
|
5373
5373
|
throw new Error("Sparse matrices can only be reshaped in two dimensions");
|
|
5374
|
-
s.forEach(function(
|
|
5375
|
-
if (!de(
|
|
5374
|
+
s.forEach(function(J) {
|
|
5375
|
+
if (!de(J) || !ge(J) || J <= -2 || J === 0)
|
|
5376
5376
|
throw new TypeError("Invalid size, must contain positive integers or -1 (size: " + Be(s) + ")");
|
|
5377
5377
|
});
|
|
5378
5378
|
var g = this._size[0] * this._size[1];
|
|
@@ -5433,8 +5433,8 @@ var ps = "SparseMatrix", Ds = ["typed", "equalScalar", "Matrix"], ms = /* @__PUR
|
|
|
5433
5433
|
}
|
|
5434
5434
|
else {
|
|
5435
5435
|
for (var Q = {}, Y = V; Y < q; Y++) {
|
|
5436
|
-
var
|
|
5437
|
-
Q[
|
|
5436
|
+
var J = s._index[Y];
|
|
5437
|
+
Q[J] = s._values[Y];
|
|
5438
5438
|
}
|
|
5439
5439
|
for (var ee = d; ee <= g; ee++) {
|
|
5440
5440
|
var oe = ee in Q ? Q[ee] : 0;
|
|
@@ -5545,10 +5545,10 @@ var ps = "SparseMatrix", Ds = ["typed", "equalScalar", "Matrix"], ms = /* @__PUR
|
|
|
5545
5545
|
throw new TypeError("Array expected, size parameter");
|
|
5546
5546
|
if (s.length !== 2)
|
|
5547
5547
|
throw new Error("Only two dimensions matrix are supported");
|
|
5548
|
-
if (s = s.map(function(
|
|
5549
|
-
if (Ee(
|
|
5548
|
+
if (s = s.map(function(J) {
|
|
5549
|
+
if (Ee(J) && (J = J.toNumber()), !de(J) || !ge(J) || J < 1)
|
|
5550
5550
|
throw new Error("Size values must be positive integers");
|
|
5551
|
-
return
|
|
5551
|
+
return J;
|
|
5552
5552
|
}), g) {
|
|
5553
5553
|
if (Ee(g) && (g = g.toNumber()), !de(g) || !ge(g))
|
|
5554
5554
|
throw new TypeError("The parameter k must be an integer number");
|
|
@@ -5648,7 +5648,7 @@ function ws(e) {
|
|
|
5648
5648
|
throw new SyntaxError('String "' + e.input + '" is not a valid number');
|
|
5649
5649
|
return u;
|
|
5650
5650
|
}
|
|
5651
|
-
var ys = /* @__PURE__ */
|
|
5651
|
+
var ys = /* @__PURE__ */ G(ds, gs, (e) => {
|
|
5652
5652
|
var {
|
|
5653
5653
|
typed: r
|
|
5654
5654
|
} = e, t = r("number", {
|
|
@@ -5699,7 +5699,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5699
5699
|
return t.fromJSON = function(n) {
|
|
5700
5700
|
return parseFloat(n.value);
|
|
5701
5701
|
}, t;
|
|
5702
|
-
}), Fs = "bignumber", Es = ["typed", "BigNumber"], As = /* @__PURE__ */
|
|
5702
|
+
}), Fs = "bignumber", Es = ["typed", "BigNumber"], As = /* @__PURE__ */ G(Fs, Es, (e) => {
|
|
5703
5703
|
var {
|
|
5704
5704
|
typed: r,
|
|
5705
5705
|
BigNumber: t
|
|
@@ -5740,7 +5740,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5740
5740
|
},
|
|
5741
5741
|
"Array | Matrix": r.referToSelf((n) => (i) => Ve(i, n))
|
|
5742
5742
|
});
|
|
5743
|
-
}), bs = "complex", Cs = ["typed", "Complex"], _s = /* @__PURE__ */
|
|
5743
|
+
}), bs = "complex", Cs = ["typed", "Complex"], _s = /* @__PURE__ */ G(bs, Cs, (e) => {
|
|
5744
5744
|
var {
|
|
5745
5745
|
typed: r,
|
|
5746
5746
|
Complex: t
|
|
@@ -5780,7 +5780,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5780
5780
|
},
|
|
5781
5781
|
"Array | Matrix": r.referToSelf((n) => (i) => Ve(i, n))
|
|
5782
5782
|
});
|
|
5783
|
-
}), Bs = "fraction", Ns = ["typed", "Fraction"], Ms = /* @__PURE__ */
|
|
5783
|
+
}), Bs = "fraction", Ns = ["typed", "Fraction"], Ms = /* @__PURE__ */ G(Bs, Ns, (e) => {
|
|
5784
5784
|
var {
|
|
5785
5785
|
typed: r,
|
|
5786
5786
|
Fraction: t
|
|
@@ -5821,7 +5821,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5821
5821
|
},
|
|
5822
5822
|
"Array | Matrix": r.referToSelf((n) => (i) => Ve(i, n))
|
|
5823
5823
|
});
|
|
5824
|
-
}), Cn = "matrix", Ss = ["typed", "Matrix", "DenseMatrix", "SparseMatrix"], xs = /* @__PURE__ */
|
|
5824
|
+
}), Cn = "matrix", Ss = ["typed", "Matrix", "DenseMatrix", "SparseMatrix"], xs = /* @__PURE__ */ G(Cn, Ss, (e) => {
|
|
5825
5825
|
var {
|
|
5826
5826
|
typed: r,
|
|
5827
5827
|
Matrix: t,
|
|
@@ -5854,7 +5854,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5854
5854
|
return new i(o, c);
|
|
5855
5855
|
throw new TypeError("Unknown matrix type " + JSON.stringify(a) + ".");
|
|
5856
5856
|
}
|
|
5857
|
-
}), _n = "unaryMinus", Ts = ["typed"], Is = /* @__PURE__ */
|
|
5857
|
+
}), _n = "unaryMinus", Ts = ["typed"], Is = /* @__PURE__ */ G(_n, Ts, (e) => {
|
|
5858
5858
|
var {
|
|
5859
5859
|
typed: r
|
|
5860
5860
|
} = e;
|
|
@@ -5870,7 +5870,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5870
5870
|
"Array | Matrix": r.referToSelf((t) => (n) => Ve(n, t, !0))
|
|
5871
5871
|
// TODO: add support for string
|
|
5872
5872
|
});
|
|
5873
|
-
}), Bn = "abs", zs = ["typed"], Os = /* @__PURE__ */
|
|
5873
|
+
}), Bn = "abs", zs = ["typed"], Os = /* @__PURE__ */ G(Bn, zs, (e) => {
|
|
5874
5874
|
var {
|
|
5875
5875
|
typed: r
|
|
5876
5876
|
} = e;
|
|
@@ -5881,7 +5881,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5881
5881
|
// deep map collection, skip zeros since abs(0) = 0
|
|
5882
5882
|
"Array | Matrix": r.referToSelf((t) => (n) => Ve(n, t, !0))
|
|
5883
5883
|
});
|
|
5884
|
-
}), Nn = "addScalar", $s = ["typed"], Ps = /* @__PURE__ */
|
|
5884
|
+
}), Nn = "addScalar", $s = ["typed"], Ps = /* @__PURE__ */ G(Nn, $s, (e) => {
|
|
5885
5885
|
var {
|
|
5886
5886
|
typed: r
|
|
5887
5887
|
} = e;
|
|
@@ -5909,7 +5909,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5909
5909
|
return u.value = r.find(t, [u.valueType(), i.valueType()])(u.value, i.value), u.fixPrefix = !1, u;
|
|
5910
5910
|
})
|
|
5911
5911
|
});
|
|
5912
|
-
}), Mn = "subtractScalar", Us = ["typed"], qs = /* @__PURE__ */
|
|
5912
|
+
}), Mn = "subtractScalar", Us = ["typed"], qs = /* @__PURE__ */ G(Mn, Us, (e) => {
|
|
5913
5913
|
var {
|
|
5914
5914
|
typed: r
|
|
5915
5915
|
} = e;
|
|
@@ -5937,7 +5937,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5937
5937
|
return u.value = r.find(t, [u.valueType(), i.valueType()])(u.value, i.value), u.fixPrefix = !1, u;
|
|
5938
5938
|
})
|
|
5939
5939
|
});
|
|
5940
|
-
}), Rs = "matAlgo11xS0s", Ls = ["typed", "equalScalar"], Hi = /* @__PURE__ */
|
|
5940
|
+
}), Rs = "matAlgo11xS0s", Ls = ["typed", "equalScalar"], Hi = /* @__PURE__ */ G(Rs, Ls, (e) => {
|
|
5941
5941
|
var {
|
|
5942
5942
|
typed: r,
|
|
5943
5943
|
equalScalar: t
|
|
@@ -5963,7 +5963,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5963
5963
|
datatype: s
|
|
5964
5964
|
});
|
|
5965
5965
|
};
|
|
5966
|
-
}), Hs = "matAlgo12xSfs", Zs = ["typed", "DenseMatrix"], Vr = /* @__PURE__ */
|
|
5966
|
+
}), Hs = "matAlgo12xSfs", Zs = ["typed", "DenseMatrix"], Vr = /* @__PURE__ */ G(Hs, Zs, (e) => {
|
|
5967
5967
|
var {
|
|
5968
5968
|
typed: r,
|
|
5969
5969
|
DenseMatrix: t
|
|
@@ -5988,7 +5988,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
5988
5988
|
datatype: s
|
|
5989
5989
|
});
|
|
5990
5990
|
};
|
|
5991
|
-
}), Ws = "matAlgo14xDs", Vs = ["typed"], nn = /* @__PURE__ */
|
|
5991
|
+
}), Ws = "matAlgo14xDs", Vs = ["typed"], nn = /* @__PURE__ */ G(Ws, Vs, (e) => {
|
|
5992
5992
|
var {
|
|
5993
5993
|
typed: r
|
|
5994
5994
|
} = e;
|
|
@@ -6012,7 +6012,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
6012
6012
|
f[D] = t(n, i + 1, u, u[i + 1], a[D], c, l);
|
|
6013
6013
|
return f;
|
|
6014
6014
|
}
|
|
6015
|
-
}),
|
|
6015
|
+
}), Gs = "matAlgo03xDSf", Js = ["typed"], Bt = /* @__PURE__ */ G(Gs, Js, (e) => {
|
|
6016
6016
|
var {
|
|
6017
6017
|
typed: r
|
|
6018
6018
|
} = e;
|
|
@@ -6042,7 +6042,7 @@ var ys = /* @__PURE__ */ J(ds, gs, (e) => {
|
|
|
6042
6042
|
datatype: l === n._datatype && m === i._datatype ? g : void 0
|
|
6043
6043
|
});
|
|
6044
6044
|
};
|
|
6045
|
-
}), Ys = "matAlgo13xDD", ks = ["typed"], Xs = /* @__PURE__ */
|
|
6045
|
+
}), Ys = "matAlgo13xDD", ks = ["typed"], Xs = /* @__PURE__ */ G(Ys, ks, (e) => {
|
|
6046
6046
|
var {
|
|
6047
6047
|
typed: r
|
|
6048
6048
|
} = e;
|
|
@@ -6084,7 +6084,7 @@ function Se(e, r) {
|
|
|
6084
6084
|
function Qs(e, r) {
|
|
6085
6085
|
return mr(e.size(), r) ? e : e.create(Xt(e.valueOf(), r), e.datatype());
|
|
6086
6086
|
}
|
|
6087
|
-
var Ks = "matrixAlgorithmSuite", js = ["typed", "matrix"],
|
|
6087
|
+
var Ks = "matrixAlgorithmSuite", js = ["typed", "matrix"], Gr = /* @__PURE__ */ G(Ks, js, (e) => {
|
|
6088
6088
|
var {
|
|
6089
6089
|
typed: r,
|
|
6090
6090
|
matrix: t
|
|
@@ -6111,7 +6111,7 @@ var Ks = "matrixAlgorithmSuite", js = ["typed", "matrix"], Jr = /* @__PURE__ */
|
|
|
6111
6111
|
var D = o.sS !== void 0 ? o.sS : o.Ss;
|
|
6112
6112
|
return a ? (o.Ss && (l["SparseMatrix," + f] = (p, m) => o.Ss(p, m, a, !1)), D && (l[f + ", SparseMatrix"] = (p, m) => D(m, p, a, !0))) : (o.Ss && (l["SparseMatrix," + f] = r.referToSelf((p) => (m, s) => o.Ss(m, s, p, !1))), D && (l[f + ", SparseMatrix"] = r.referToSelf((p) => (m, s) => D(s, m, p, !0)))), a && a.signatures && Do(l, a.signatures), l;
|
|
6113
6113
|
};
|
|
6114
|
-
}), ef = "matAlgo01xDSid", rf = ["typed"], tf = /* @__PURE__ */
|
|
6114
|
+
}), ef = "matAlgo01xDSid", rf = ["typed"], tf = /* @__PURE__ */ G(ef, rf, (e) => {
|
|
6115
6115
|
var {
|
|
6116
6116
|
typed: r
|
|
6117
6117
|
} = e;
|
|
@@ -6139,7 +6139,7 @@ var Ks = "matrixAlgorithmSuite", js = ["typed", "matrix"], Jr = /* @__PURE__ */
|
|
|
6139
6139
|
datatype: l === n._datatype && m === i._datatype ? g : void 0
|
|
6140
6140
|
});
|
|
6141
6141
|
};
|
|
6142
|
-
}), nf = "matAlgo04xSidSid", uf = ["typed", "equalScalar"], of = /* @__PURE__ */
|
|
6142
|
+
}), nf = "matAlgo04xSidSid", uf = ["typed", "equalScalar"], of = /* @__PURE__ */ G(nf, uf, (e) => {
|
|
6143
6143
|
var {
|
|
6144
6144
|
typed: r,
|
|
6145
6145
|
equalScalar: t
|
|
@@ -6155,20 +6155,20 @@ var Ks = "matrixAlgorithmSuite", js = ["typed", "matrix"], Jr = /* @__PURE__ */
|
|
|
6155
6155
|
var C = a && D ? [] : void 0, b = [], B = [], M = a && D ? [] : void 0, S = a && D ? [] : void 0, R = [], V = [], q, W, O, Q, Y;
|
|
6156
6156
|
for (W = 0; W < E; W++) {
|
|
6157
6157
|
B[W] = b.length;
|
|
6158
|
-
var
|
|
6158
|
+
var J = W + 1;
|
|
6159
6159
|
for (Q = l[W], Y = l[W + 1], O = Q; O < Y; O++)
|
|
6160
|
-
q = c[O], b.push(q), R[q] =
|
|
6160
|
+
q = c[O], b.push(q), R[q] = J, M && (M[q] = a[O]);
|
|
6161
6161
|
for (Q = m[W], Y = m[W + 1], O = Q; O < Y; O++)
|
|
6162
|
-
if (q = p[O], R[q] ===
|
|
6162
|
+
if (q = p[O], R[q] === J) {
|
|
6163
6163
|
if (M) {
|
|
6164
6164
|
var ee = w(M[q], D[O]);
|
|
6165
6165
|
A(ee, y) ? R[q] = null : M[q] = ee;
|
|
6166
6166
|
}
|
|
6167
6167
|
} else
|
|
6168
|
-
b.push(q), V[q] =
|
|
6168
|
+
b.push(q), V[q] = J, S && (S[q] = D[O]);
|
|
6169
6169
|
if (M && S)
|
|
6170
6170
|
for (O = B[W]; O < b.length; )
|
|
6171
|
-
q = b[O], R[q] ===
|
|
6171
|
+
q = b[O], R[q] === J ? (C[O] = M[q], O++) : V[q] === J ? (C[O] = S[q], O++) : b.splice(O, 1);
|
|
6172
6172
|
}
|
|
6173
6173
|
return B[E] = b.length, i.createSparseMatrix({
|
|
6174
6174
|
values: C,
|
|
@@ -6178,7 +6178,7 @@ var Ks = "matrixAlgorithmSuite", js = ["typed", "matrix"], Jr = /* @__PURE__ */
|
|
|
6178
6178
|
datatype: h === i._datatype && d === u._datatype ? v : void 0
|
|
6179
6179
|
});
|
|
6180
6180
|
};
|
|
6181
|
-
}), af = "matAlgo10xSids", sf = ["typed", "DenseMatrix"], ff = /* @__PURE__ */
|
|
6181
|
+
}), af = "matAlgo10xSids", sf = ["typed", "DenseMatrix"], ff = /* @__PURE__ */ G(af, sf, (e) => {
|
|
6182
6182
|
var {
|
|
6183
6183
|
typed: r,
|
|
6184
6184
|
DenseMatrix: t
|
|
@@ -6214,7 +6214,7 @@ function cf(e, r, t, n) {
|
|
|
6214
6214
|
return n(i.toNumber());
|
|
6215
6215
|
};
|
|
6216
6216
|
}
|
|
6217
|
-
var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__PURE__ */
|
|
6217
|
+
var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__PURE__ */ G(Sn, lf, (e) => {
|
|
6218
6218
|
var {
|
|
6219
6219
|
typed: r,
|
|
6220
6220
|
config: t,
|
|
@@ -6237,7 +6237,7 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6237
6237
|
},
|
|
6238
6238
|
"Array | Matrix": r.referToSelf((o) => (a) => Ve(a, o))
|
|
6239
6239
|
});
|
|
6240
|
-
}), Df = "multiplyScalar", mf = ["typed"], df = /* @__PURE__ */
|
|
6240
|
+
}), Df = "multiplyScalar", mf = ["typed"], df = /* @__PURE__ */ G(Df, mf, (e) => {
|
|
6241
6241
|
var {
|
|
6242
6242
|
typed: r
|
|
6243
6243
|
} = e;
|
|
@@ -6258,7 +6258,7 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6258
6258
|
"number | Fraction | BigNumber | Complex, Unit": (t, n) => n.multiply(t),
|
|
6259
6259
|
"Unit, number | Fraction | BigNumber | Complex | Unit": (t, n) => t.multiply(n)
|
|
6260
6260
|
});
|
|
6261
|
-
}), xn = "multiply", gf = ["typed", "matrix", "addScalar", "multiplyScalar", "equalScalar", "dot"], vf = /* @__PURE__ */
|
|
6261
|
+
}), xn = "multiply", gf = ["typed", "matrix", "addScalar", "multiplyScalar", "equalScalar", "dot"], vf = /* @__PURE__ */ G(xn, gf, (e) => {
|
|
6262
6262
|
var {
|
|
6263
6263
|
typed: r,
|
|
6264
6264
|
matrix: t,
|
|
@@ -6319,10 +6319,10 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6319
6319
|
function D(y, w) {
|
|
6320
6320
|
var C = y._data, b = y._size, B = y._datatype || y.getDataType(), M = w._data, S = w._size, R = w._datatype || w.getDataType(), V = b[0], q = S[1], W, O = n, Q = i;
|
|
6321
6321
|
B && R && B === R && typeof B == "string" && B !== "mixed" && (W = B, O = r.find(n, [W, W]), Q = r.find(i, [W, W]));
|
|
6322
|
-
for (var Y = [],
|
|
6323
|
-
for (var ee = Q(C[0], M[0][
|
|
6324
|
-
ee = O(ee, Q(C[oe], M[oe][
|
|
6325
|
-
Y[
|
|
6322
|
+
for (var Y = [], J = 0; J < q; J++) {
|
|
6323
|
+
for (var ee = Q(C[0], M[0][J]), oe = 1; oe < V; oe++)
|
|
6324
|
+
ee = O(ee, Q(C[oe], M[oe][J]));
|
|
6325
|
+
Y[J] = ee;
|
|
6326
6326
|
}
|
|
6327
6327
|
return y.createDenseMatrix({
|
|
6328
6328
|
data: Y,
|
|
@@ -6343,8 +6343,8 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6343
6343
|
var C = y._data, b = y._size, B = y._datatype || y.getDataType(), M = w._data, S = w._datatype || w.getDataType(), R = b[0], V = b[1], q, W = n, O = i;
|
|
6344
6344
|
B && S && B === S && typeof B == "string" && B !== "mixed" && (q = B, W = r.find(n, [q, q]), O = r.find(i, [q, q]));
|
|
6345
6345
|
for (var Q = [], Y = 0; Y < R; Y++) {
|
|
6346
|
-
for (var
|
|
6347
|
-
ee = W(ee, O(
|
|
6346
|
+
for (var J = C[Y], ee = O(J[0], M[0]), oe = 1; oe < V; oe++)
|
|
6347
|
+
ee = W(ee, O(J[oe], M[oe]));
|
|
6348
6348
|
Q[Y] = ee;
|
|
6349
6349
|
}
|
|
6350
6350
|
return y.createDenseMatrix({
|
|
@@ -6356,17 +6356,17 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6356
6356
|
function d(y, w) {
|
|
6357
6357
|
var C = y._data, b = y._size, B = y._datatype || y.getDataType(), M = w._data, S = w._size, R = w._datatype || w.getDataType(), V = b[0], q = b[1], W = S[1], O, Q = n, Y = i;
|
|
6358
6358
|
B && R && B === R && typeof B == "string" && B !== "mixed" && B !== "mixed" && (O = B, Q = r.find(n, [O, O]), Y = r.find(i, [O, O]));
|
|
6359
|
-
for (var
|
|
6359
|
+
for (var J = [], ee = 0; ee < V; ee++) {
|
|
6360
6360
|
var oe = C[ee];
|
|
6361
|
-
|
|
6361
|
+
J[ee] = [];
|
|
6362
6362
|
for (var ie = 0; ie < W; ie++) {
|
|
6363
6363
|
for (var fe = Y(oe[0], M[0][ie]), Ce = 1; Ce < q; Ce++)
|
|
6364
6364
|
fe = Q(fe, Y(oe[Ce], M[Ce][ie]));
|
|
6365
|
-
|
|
6365
|
+
J[ee][ie] = fe;
|
|
6366
6366
|
}
|
|
6367
6367
|
}
|
|
6368
6368
|
return y.createDenseMatrix({
|
|
6369
|
-
data:
|
|
6369
|
+
data: J,
|
|
6370
6370
|
size: [V, W],
|
|
6371
6371
|
datatype: B === y._datatype && R === w._datatype ? O : void 0
|
|
6372
6372
|
});
|
|
@@ -6375,8 +6375,8 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6375
6375
|
var C = y._data, b = y._size, B = y._datatype || y.getDataType(), M = w._values, S = w._index, R = w._ptr, V = w._size, q = w._datatype || w._data === void 0 ? w._datatype : w.getDataType();
|
|
6376
6376
|
if (!M)
|
|
6377
6377
|
throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");
|
|
6378
|
-
var W = b[0], O = V[1], Q, Y = n,
|
|
6379
|
-
B && q && B === q && typeof B == "string" && B !== "mixed" && (Q = B, Y = r.find(n, [Q, Q]),
|
|
6378
|
+
var W = b[0], O = V[1], Q, Y = n, J = i, ee = u, oe = 0;
|
|
6379
|
+
B && q && B === q && typeof B == "string" && B !== "mixed" && (Q = B, Y = r.find(n, [Q, Q]), J = r.find(i, [Q, Q]), ee = r.find(u, [Q, Q]), oe = r.convert(0, Q));
|
|
6380
6380
|
for (var ie = [], fe = [], Ce = [], be = w.createSparseMatrix({
|
|
6381
6381
|
values: ie,
|
|
6382
6382
|
index: fe,
|
|
@@ -6388,11 +6388,11 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6388
6388
|
var we = R[Ae], qe = R[Ae + 1];
|
|
6389
6389
|
if (qe > we)
|
|
6390
6390
|
for (var ce = 0, ae = 0; ae < W; ae++) {
|
|
6391
|
-
for (var
|
|
6391
|
+
for (var Ge = ae + 1, Te = void 0, le = we; le < qe; le++) {
|
|
6392
6392
|
var Me = S[le];
|
|
6393
|
-
ce !==
|
|
6393
|
+
ce !== Ge ? (Te = J(C[ae][Me], M[le]), ce = Ge) : Te = Y(Te, J(C[ae][Me], M[le]));
|
|
6394
6394
|
}
|
|
6395
|
-
ce ===
|
|
6395
|
+
ce === Ge && !ee(Te, oe) && (fe.push(ae), ie.push(Te));
|
|
6396
6396
|
}
|
|
6397
6397
|
}
|
|
6398
6398
|
return Ce[O] = fe.length, be;
|
|
@@ -6401,8 +6401,8 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6401
6401
|
var C = y._values, b = y._index, B = y._ptr, M = y._datatype || y._data === void 0 ? y._datatype : y.getDataType();
|
|
6402
6402
|
if (!C)
|
|
6403
6403
|
throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");
|
|
6404
|
-
var S = w._data, R = w._datatype || w.getDataType(), V = y._size[0], q = w._size[0], W = [], O = [], Q = [], Y,
|
|
6405
|
-
M && R && M === R && typeof M == "string" && M !== "mixed" && (Y = M,
|
|
6404
|
+
var S = w._data, R = w._datatype || w.getDataType(), V = y._size[0], q = w._size[0], W = [], O = [], Q = [], Y, J = n, ee = i, oe = u, ie = 0;
|
|
6405
|
+
M && R && M === R && typeof M == "string" && M !== "mixed" && (Y = M, J = r.find(n, [Y, Y]), ee = r.find(i, [Y, Y]), oe = r.find(u, [Y, Y]), ie = r.convert(0, Y));
|
|
6406
6406
|
var fe = [], Ce = [];
|
|
6407
6407
|
Q[0] = 0;
|
|
6408
6408
|
for (var be = 0; be < q; be++) {
|
|
@@ -6410,10 +6410,10 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6410
6410
|
if (!oe(Ae, ie))
|
|
6411
6411
|
for (var we = B[be], qe = B[be + 1], ce = we; ce < qe; ce++) {
|
|
6412
6412
|
var ae = b[ce];
|
|
6413
|
-
Ce[ae] ? fe[ae] =
|
|
6413
|
+
Ce[ae] ? fe[ae] = J(fe[ae], ee(Ae, C[ce])) : (Ce[ae] = !0, O.push(ae), fe[ae] = ee(Ae, C[ce]));
|
|
6414
6414
|
}
|
|
6415
6415
|
}
|
|
6416
|
-
for (var
|
|
6416
|
+
for (var Ge = O.length, Te = 0; Te < Ge; Te++) {
|
|
6417
6417
|
var le = O[Te];
|
|
6418
6418
|
W[Te] = fe[le];
|
|
6419
6419
|
}
|
|
@@ -6429,8 +6429,8 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6429
6429
|
var C = y._values, b = y._index, B = y._ptr, M = y._datatype || y._data === void 0 ? y._datatype : y.getDataType();
|
|
6430
6430
|
if (!C)
|
|
6431
6431
|
throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");
|
|
6432
|
-
var S = w._data, R = w._datatype || w.getDataType(), V = y._size[0], q = w._size[0], W = w._size[1], O, Q = n, Y = i,
|
|
6433
|
-
M && R && M === R && typeof M == "string" && M !== "mixed" && (O = M, Q = r.find(n, [O, O]), Y = r.find(i, [O, O]),
|
|
6432
|
+
var S = w._data, R = w._datatype || w.getDataType(), V = y._size[0], q = w._size[0], W = w._size[1], O, Q = n, Y = i, J = u, ee = 0;
|
|
6433
|
+
M && R && M === R && typeof M == "string" && M !== "mixed" && (O = M, Q = r.find(n, [O, O]), Y = r.find(i, [O, O]), J = r.find(u, [O, O]), ee = r.convert(0, O));
|
|
6434
6434
|
for (var oe = [], ie = [], fe = [], Ce = y.createSparseMatrix({
|
|
6435
6435
|
values: oe,
|
|
6436
6436
|
index: ie,
|
|
@@ -6441,13 +6441,13 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6441
6441
|
fe[we] = ie.length;
|
|
6442
6442
|
for (var qe = we + 1, ce = 0; ce < q; ce++) {
|
|
6443
6443
|
var ae = S[ce][we];
|
|
6444
|
-
if (!
|
|
6445
|
-
for (var
|
|
6444
|
+
if (!J(ae, ee))
|
|
6445
|
+
for (var Ge = B[ce], Te = B[ce + 1], le = Ge; le < Te; le++) {
|
|
6446
6446
|
var Me = b[le];
|
|
6447
6447
|
Ae[Me] !== qe ? (Ae[Me] = qe, ie.push(Me), be[Me] = Y(ae, C[le])) : be[Me] = Q(be[Me], Y(ae, C[le]));
|
|
6448
6448
|
}
|
|
6449
6449
|
}
|
|
6450
|
-
for (var
|
|
6450
|
+
for (var Je = fe[we], ar = ie.length, sr = Je; sr < ar; sr++) {
|
|
6451
6451
|
var Ar = ie[sr];
|
|
6452
6452
|
oe[sr] = be[Ar];
|
|
6453
6453
|
}
|
|
@@ -6455,26 +6455,26 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6455
6455
|
return fe[W] = ie.length, Ce;
|
|
6456
6456
|
}
|
|
6457
6457
|
function A(y, w) {
|
|
6458
|
-
var C = y._values, b = y._index, B = y._ptr, M = y._datatype || y._data === void 0 ? y._datatype : y.getDataType(), S = w._values, R = w._index, V = w._ptr, q = w._datatype || w._data === void 0 ? w._datatype : w.getDataType(), W = y._size[0], O = w._size[1], Q = C && S, Y,
|
|
6459
|
-
M && q && M === q && typeof M == "string" && M !== "mixed" && (Y = M,
|
|
6458
|
+
var C = y._values, b = y._index, B = y._ptr, M = y._datatype || y._data === void 0 ? y._datatype : y.getDataType(), S = w._values, R = w._index, V = w._ptr, q = w._datatype || w._data === void 0 ? w._datatype : w.getDataType(), W = y._size[0], O = w._size[1], Q = C && S, Y, J = n, ee = i;
|
|
6459
|
+
M && q && M === q && typeof M == "string" && M !== "mixed" && (Y = M, J = r.find(n, [Y, Y]), ee = r.find(i, [Y, Y]));
|
|
6460
6460
|
for (var oe = Q ? [] : void 0, ie = [], fe = [], Ce = y.createSparseMatrix({
|
|
6461
6461
|
values: oe,
|
|
6462
6462
|
index: ie,
|
|
6463
6463
|
ptr: fe,
|
|
6464
6464
|
size: [W, O],
|
|
6465
6465
|
datatype: M === y._datatype && q === w._datatype ? Y : void 0
|
|
6466
|
-
}), be = Q ? [] : void 0, Ae = [], we, qe, ce, ae,
|
|
6467
|
-
fe[
|
|
6468
|
-
var ar =
|
|
6469
|
-
for (
|
|
6466
|
+
}), be = Q ? [] : void 0, Ae = [], we, qe, ce, ae, Ge, Te, le, Me, Je = 0; Je < O; Je++) {
|
|
6467
|
+
fe[Je] = ie.length;
|
|
6468
|
+
var ar = Je + 1;
|
|
6469
|
+
for (Ge = V[Je], Te = V[Je + 1], ae = Ge; ae < Te; ae++)
|
|
6470
6470
|
if (Me = R[ae], Q)
|
|
6471
6471
|
for (qe = B[Me], ce = B[Me + 1], we = qe; we < ce; we++)
|
|
6472
|
-
le = b[we], Ae[le] !== ar ? (Ae[le] = ar, ie.push(le), be[le] = ee(S[ae], C[we])) : be[le] =
|
|
6472
|
+
le = b[we], Ae[le] !== ar ? (Ae[le] = ar, ie.push(le), be[le] = ee(S[ae], C[we])) : be[le] = J(be[le], ee(S[ae], C[we]));
|
|
6473
6473
|
else
|
|
6474
6474
|
for (qe = B[Me], ce = B[Me + 1], we = qe; we < ce; we++)
|
|
6475
6475
|
le = b[we], Ae[le] !== ar && (Ae[le] = ar, ie.push(le));
|
|
6476
6476
|
if (Q)
|
|
6477
|
-
for (var sr = fe[
|
|
6477
|
+
for (var sr = fe[Je], Ar = ie.length, br = sr; br < Ar; br++) {
|
|
6478
6478
|
var zt = ie[br];
|
|
6479
6479
|
oe[br] = be[zt];
|
|
6480
6480
|
}
|
|
@@ -6519,7 +6519,7 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6519
6519
|
return B;
|
|
6520
6520
|
})
|
|
6521
6521
|
});
|
|
6522
|
-
}), wf = "matAlgo07xSSf", yf = ["typed", "SparseMatrix"], Nt = /* @__PURE__ */
|
|
6522
|
+
}), wf = "matAlgo07xSSf", yf = ["typed", "SparseMatrix"], Nt = /* @__PURE__ */ G(wf, yf, (e) => {
|
|
6523
6523
|
var {
|
|
6524
6524
|
typed: r,
|
|
6525
6525
|
SparseMatrix: t
|
|
@@ -6555,7 +6555,7 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6555
6555
|
o[m] = c, a[m] = l[D];
|
|
6556
6556
|
}
|
|
6557
6557
|
}
|
|
6558
|
-
}), Tn = "arg", Ff = ["typed"], Ef = /* @__PURE__ */
|
|
6558
|
+
}), Tn = "arg", Ff = ["typed"], Ef = /* @__PURE__ */ G(Tn, Ff, (e) => {
|
|
6559
6559
|
var {
|
|
6560
6560
|
typed: r
|
|
6561
6561
|
} = e;
|
|
@@ -6572,7 +6572,7 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6572
6572
|
// TODO: implement BigNumber support for function arg
|
|
6573
6573
|
"Array | Matrix": r.referToSelf((t) => (n) => Ve(n, t))
|
|
6574
6574
|
});
|
|
6575
|
-
}), In = "conj", Af = ["typed"], bf = /* @__PURE__ */
|
|
6575
|
+
}), In = "conj", Af = ["typed"], bf = /* @__PURE__ */ G(In, Af, (e) => {
|
|
6576
6576
|
var {
|
|
6577
6577
|
typed: r
|
|
6578
6578
|
} = e;
|
|
@@ -6582,7 +6582,7 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6582
6582
|
Unit: r.referToSelf((t) => (n) => new n.constructor(t(n.toNumeric()), n.formatUnits())),
|
|
6583
6583
|
"Array | Matrix": r.referToSelf((t) => (n) => Ve(n, t))
|
|
6584
6584
|
});
|
|
6585
|
-
}), zn = "concat", Cf = ["typed", "matrix", "isInteger"], _f = /* @__PURE__ */
|
|
6585
|
+
}), zn = "concat", Cf = ["typed", "matrix", "isInteger"], _f = /* @__PURE__ */ G(zn, Cf, (e) => {
|
|
6586
6586
|
var {
|
|
6587
6587
|
typed: r,
|
|
6588
6588
|
matrix: t,
|
|
@@ -6617,7 +6617,7 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6617
6617
|
return u.join("");
|
|
6618
6618
|
}
|
|
6619
6619
|
});
|
|
6620
|
-
}), On = "getMatrixDataType", Bf = ["typed"], Nf = /* @__PURE__ */
|
|
6620
|
+
}), On = "getMatrixDataType", Bf = ["typed"], Nf = /* @__PURE__ */ G(On, Bf, (e) => {
|
|
6621
6621
|
var {
|
|
6622
6622
|
typed: r
|
|
6623
6623
|
} = e;
|
|
@@ -6629,7 +6629,7 @@ var Sn = "log10", lf = ["typed", "config", "Complex"], hf = pt(16), pf = /* @__P
|
|
|
6629
6629
|
return n.getDataType();
|
|
6630
6630
|
}
|
|
6631
6631
|
});
|
|
6632
|
-
}), $n = "identity", Mf = ["typed", "config", "matrix", "BigNumber", "DenseMatrix", "SparseMatrix"], Sf = /* @__PURE__ */
|
|
6632
|
+
}), $n = "identity", Mf = ["typed", "config", "matrix", "BigNumber", "DenseMatrix", "SparseMatrix"], Sf = /* @__PURE__ */ G($n, Mf, (e) => {
|
|
6633
6633
|
var {
|
|
6634
6634
|
typed: r,
|
|
6635
6635
|
config: t,
|
|
@@ -6710,7 +6710,7 @@ function xf() {
|
|
|
6710
6710
|
function Wi() {
|
|
6711
6711
|
throw new Error('No "matrix" implementation available');
|
|
6712
6712
|
}
|
|
6713
|
-
var Pn = "range", Tf = ["typed", "config", "?matrix", "?bignumber", "smaller", "smallerEq", "larger", "largerEq", "add", "isPositive"], If = /* @__PURE__ */
|
|
6713
|
+
var Pn = "range", Tf = ["typed", "config", "?matrix", "?bignumber", "smaller", "smallerEq", "larger", "largerEq", "add", "isPositive"], If = /* @__PURE__ */ G(Pn, Tf, (e) => {
|
|
6714
6714
|
var {
|
|
6715
6715
|
typed: r,
|
|
6716
6716
|
config: t,
|
|
@@ -6842,7 +6842,7 @@ var Pn = "range", Tf = ["typed", "config", "?matrix", "?bignumber", "smaller", "
|
|
|
6842
6842
|
return null;
|
|
6843
6843
|
}
|
|
6844
6844
|
}
|
|
6845
|
-
}), Un = "size", zf = ["typed", "config", "?matrix"], Of = /* @__PURE__ */
|
|
6845
|
+
}), Un = "size", zf = ["typed", "config", "?matrix"], Of = /* @__PURE__ */ G(Un, zf, (e) => {
|
|
6846
6846
|
var {
|
|
6847
6847
|
typed: r,
|
|
6848
6848
|
config: t,
|
|
@@ -6860,7 +6860,7 @@ var Pn = "range", Tf = ["typed", "config", "?matrix", "?bignumber", "smaller", "
|
|
|
6860
6860
|
return t.matrix === "Array" ? [] : n ? n([], "dense", "number") : Wi();
|
|
6861
6861
|
}
|
|
6862
6862
|
});
|
|
6863
|
-
}), qn = "subset", $f = ["typed", "matrix", "zeros", "add"], Pf = /* @__PURE__ */
|
|
6863
|
+
}), qn = "subset", $f = ["typed", "matrix", "zeros", "add"], Pf = /* @__PURE__ */ G(qn, $f, (e) => {
|
|
6864
6864
|
var {
|
|
6865
6865
|
typed: r,
|
|
6866
6866
|
matrix: t,
|
|
@@ -6981,7 +6981,7 @@ function Rf(e, r, t) {
|
|
|
6981
6981
|
var i = me(e);
|
|
6982
6982
|
return ni(i, n, t), i;
|
|
6983
6983
|
}
|
|
6984
|
-
var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PURE__ */
|
|
6984
|
+
var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PURE__ */ G(Ln, Lf, (e) => {
|
|
6985
6985
|
var {
|
|
6986
6986
|
typed: r,
|
|
6987
6987
|
config: t,
|
|
@@ -7032,7 +7032,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7032
7032
|
throw new Error("Parameters in function zeros must be positive integers");
|
|
7033
7033
|
});
|
|
7034
7034
|
}
|
|
7035
|
-
}), Zf = "numeric", Wf = ["number", "?bignumber", "?fraction"], Vf = /* @__PURE__ */
|
|
7035
|
+
}), Zf = "numeric", Wf = ["number", "?bignumber", "?fraction"], Vf = /* @__PURE__ */ G(Zf, Wf, (e) => {
|
|
7036
7036
|
var {
|
|
7037
7037
|
number: r,
|
|
7038
7038
|
bignumber: t,
|
|
@@ -7059,7 +7059,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7059
7059
|
throw new TypeError("Cannot convert " + a + ' to type "' + c + '"; valid output types are ' + Object.keys(u).join(", "));
|
|
7060
7060
|
return c === f ? a : u[c](a);
|
|
7061
7061
|
};
|
|
7062
|
-
}), Hn = "divideScalar",
|
|
7062
|
+
}), Hn = "divideScalar", Gf = ["typed", "numeric"], Jf = /* @__PURE__ */ G(Hn, Gf, (e) => {
|
|
7063
7063
|
var {
|
|
7064
7064
|
typed: r,
|
|
7065
7065
|
numeric: t
|
|
@@ -7083,7 +7083,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7083
7083
|
"Unit, number | Complex | Fraction | BigNumber | Unit": (n, i) => n.divide(i),
|
|
7084
7084
|
"number | Fraction | Complex | BigNumber, Unit": (n, i) => i.divideInto(n)
|
|
7085
7085
|
});
|
|
7086
|
-
}), Zn = "pow", Yf = ["typed", "config", "identity", "multiply", "matrix", "inv", "fraction", "number", "Complex"], kf = /* @__PURE__ */
|
|
7086
|
+
}), Zn = "pow", Yf = ["typed", "config", "identity", "multiply", "matrix", "inv", "fraction", "number", "Complex"], kf = /* @__PURE__ */ G(Zn, Yf, (e) => {
|
|
7087
7087
|
var {
|
|
7088
7088
|
typed: r,
|
|
7089
7089
|
config: t,
|
|
@@ -7155,7 +7155,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7155
7155
|
function D(p, m) {
|
|
7156
7156
|
return u(h(p.valueOf(), m));
|
|
7157
7157
|
}
|
|
7158
|
-
}), Mr = "Number of decimals in function round must be an integer", Wn = "round", Xf = ["typed", "config", "matrix", "equalScalar", "zeros", "BigNumber", "DenseMatrix"], Qf = /* @__PURE__ */
|
|
7158
|
+
}), Mr = "Number of decimals in function round must be an integer", Wn = "round", Xf = ["typed", "config", "matrix", "equalScalar", "zeros", "BigNumber", "DenseMatrix"], Qf = /* @__PURE__ */ G(Wn, Xf, (e) => {
|
|
7159
7159
|
var {
|
|
7160
7160
|
typed: r,
|
|
7161
7161
|
config: t,
|
|
@@ -7252,7 +7252,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7252
7252
|
"number | Complex | BigNumber | Fraction, DenseMatrix": r.referToSelf((D) => (p, m) => i(p, 0) ? u(m.size(), m.storage()) : f(m, p, D, !0)),
|
|
7253
7253
|
"number | Complex | BigNumber | Fraction, Array": r.referToSelf((D) => (p, m) => f(n(m), p, D, !0).valueOf())
|
|
7254
7254
|
});
|
|
7255
|
-
}), mt = "smaller", Kf = ["typed", "config", "bignumber", "matrix", "DenseMatrix", "concat", "SparseMatrix"], jf = /* @__PURE__ */
|
|
7255
|
+
}), mt = "smaller", Kf = ["typed", "config", "bignumber", "matrix", "DenseMatrix", "concat", "SparseMatrix"], jf = /* @__PURE__ */ G(mt, Kf, (e) => {
|
|
7256
7256
|
var {
|
|
7257
7257
|
typed: r,
|
|
7258
7258
|
config: t,
|
|
@@ -7269,7 +7269,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7269
7269
|
}), f = Vr({
|
|
7270
7270
|
typed: r,
|
|
7271
7271
|
DenseMatrix: u
|
|
7272
|
-
}), h =
|
|
7272
|
+
}), h = Gr({
|
|
7273
7273
|
typed: r,
|
|
7274
7274
|
matrix: i,
|
|
7275
7275
|
concat: o
|
|
@@ -7301,7 +7301,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7301
7301
|
DS: c,
|
|
7302
7302
|
Ss: f
|
|
7303
7303
|
}));
|
|
7304
|
-
}), ec = /* @__PURE__ */
|
|
7304
|
+
}), ec = /* @__PURE__ */ G(mt, ["typed", "config"], (e) => {
|
|
7305
7305
|
var {
|
|
7306
7306
|
typed: r,
|
|
7307
7307
|
config: t
|
|
@@ -7311,7 +7311,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7311
7311
|
return i < u && !tr(i, u, t.relTol, t.absTol);
|
|
7312
7312
|
}
|
|
7313
7313
|
});
|
|
7314
|
-
}), dt = "smallerEq", rc = ["typed", "config", "matrix", "DenseMatrix", "concat", "SparseMatrix"], tc = /* @__PURE__ */
|
|
7314
|
+
}), dt = "smallerEq", rc = ["typed", "config", "matrix", "DenseMatrix", "concat", "SparseMatrix"], tc = /* @__PURE__ */ G(dt, rc, (e) => {
|
|
7315
7315
|
var {
|
|
7316
7316
|
typed: r,
|
|
7317
7317
|
config: t,
|
|
@@ -7327,7 +7327,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7327
7327
|
}), l = Vr({
|
|
7328
7328
|
typed: r,
|
|
7329
7329
|
DenseMatrix: i
|
|
7330
|
-
}), f =
|
|
7330
|
+
}), f = Gr({
|
|
7331
7331
|
typed: r,
|
|
7332
7332
|
matrix: n,
|
|
7333
7333
|
concat: u
|
|
@@ -7352,7 +7352,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7352
7352
|
DS: a,
|
|
7353
7353
|
Ss: l
|
|
7354
7354
|
}));
|
|
7355
|
-
}), nc = /* @__PURE__ */
|
|
7355
|
+
}), nc = /* @__PURE__ */ G(dt, ["typed", "config"], (e) => {
|
|
7356
7356
|
var {
|
|
7357
7357
|
typed: r,
|
|
7358
7358
|
config: t
|
|
@@ -7362,7 +7362,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7362
7362
|
return i <= u || tr(i, u, t.relTol, t.absTol);
|
|
7363
7363
|
}
|
|
7364
7364
|
});
|
|
7365
|
-
}), gt = "larger", ic = ["typed", "config", "bignumber", "matrix", "DenseMatrix", "concat", "SparseMatrix"], uc = /* @__PURE__ */
|
|
7365
|
+
}), gt = "larger", ic = ["typed", "config", "bignumber", "matrix", "DenseMatrix", "concat", "SparseMatrix"], uc = /* @__PURE__ */ G(gt, ic, (e) => {
|
|
7366
7366
|
var {
|
|
7367
7367
|
typed: r,
|
|
7368
7368
|
config: t,
|
|
@@ -7379,7 +7379,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7379
7379
|
}), f = Vr({
|
|
7380
7380
|
typed: r,
|
|
7381
7381
|
DenseMatrix: u
|
|
7382
|
-
}), h =
|
|
7382
|
+
}), h = Gr({
|
|
7383
7383
|
typed: r,
|
|
7384
7384
|
matrix: i,
|
|
7385
7385
|
concat: o
|
|
@@ -7411,7 +7411,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7411
7411
|
DS: c,
|
|
7412
7412
|
Ss: f
|
|
7413
7413
|
}));
|
|
7414
|
-
}), oc = /* @__PURE__ */
|
|
7414
|
+
}), oc = /* @__PURE__ */ G(gt, ["typed", "config"], (e) => {
|
|
7415
7415
|
var {
|
|
7416
7416
|
typed: r,
|
|
7417
7417
|
config: t
|
|
@@ -7421,7 +7421,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7421
7421
|
return i > u && !tr(i, u, t.relTol, t.absTol);
|
|
7422
7422
|
}
|
|
7423
7423
|
});
|
|
7424
|
-
}), vt = "largerEq", ac = ["typed", "config", "matrix", "DenseMatrix", "concat", "SparseMatrix"], sc = /* @__PURE__ */
|
|
7424
|
+
}), vt = "largerEq", ac = ["typed", "config", "matrix", "DenseMatrix", "concat", "SparseMatrix"], sc = /* @__PURE__ */ G(vt, ac, (e) => {
|
|
7425
7425
|
var {
|
|
7426
7426
|
typed: r,
|
|
7427
7427
|
config: t,
|
|
@@ -7437,7 +7437,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7437
7437
|
}), l = Vr({
|
|
7438
7438
|
typed: r,
|
|
7439
7439
|
DenseMatrix: i
|
|
7440
|
-
}), f =
|
|
7440
|
+
}), f = Gr({
|
|
7441
7441
|
typed: r,
|
|
7442
7442
|
matrix: n,
|
|
7443
7443
|
concat: u
|
|
@@ -7464,7 +7464,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7464
7464
|
DS: a,
|
|
7465
7465
|
Ss: l
|
|
7466
7466
|
}));
|
|
7467
|
-
}), fc = /* @__PURE__ */
|
|
7467
|
+
}), fc = /* @__PURE__ */ G(vt, ["typed", "config"], (e) => {
|
|
7468
7468
|
var {
|
|
7469
7469
|
typed: r,
|
|
7470
7470
|
config: t
|
|
@@ -7474,7 +7474,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7474
7474
|
return i >= u || tr(i, u, t.relTol, t.absTol);
|
|
7475
7475
|
}
|
|
7476
7476
|
});
|
|
7477
|
-
}), cc = "ImmutableDenseMatrix", lc = ["smaller", "DenseMatrix"], hc = /* @__PURE__ */
|
|
7477
|
+
}), cc = "ImmutableDenseMatrix", lc = ["smaller", "DenseMatrix"], hc = /* @__PURE__ */ G(cc, lc, (e) => {
|
|
7478
7478
|
var {
|
|
7479
7479
|
smaller: r,
|
|
7480
7480
|
DenseMatrix: t
|
|
@@ -7554,7 +7554,7 @@ var Ln = "zeros", Lf = ["typed", "config", "matrix", "BigNumber"], Hf = /* @__PU
|
|
|
7554
7554
|
}, n;
|
|
7555
7555
|
}, {
|
|
7556
7556
|
isClass: !0
|
|
7557
|
-
}), pc = "Index", Dc = ["ImmutableDenseMatrix", "getMatrixDataType"], mc = /* @__PURE__ */
|
|
7557
|
+
}), pc = "Index", Dc = ["ImmutableDenseMatrix", "getMatrixDataType"], mc = /* @__PURE__ */ G(pc, Dc, (e) => {
|
|
7558
7558
|
var {
|
|
7559
7559
|
ImmutableDenseMatrix: r,
|
|
7560
7560
|
getMatrixDataType: t
|
|
@@ -7723,7 +7723,7 @@ Mt(function(e) {
|
|
|
7723
7723
|
function St(e) {
|
|
7724
7724
|
return e[0].precision;
|
|
7725
7725
|
}
|
|
7726
|
-
var
|
|
7726
|
+
var Gn = "add", gc = ["typed", "matrix", "addScalar", "equalScalar", "DenseMatrix", "SparseMatrix", "concat"], vc = /* @__PURE__ */ G(Gn, gc, (e) => {
|
|
7727
7727
|
var {
|
|
7728
7728
|
typed: r,
|
|
7729
7729
|
matrix: t,
|
|
@@ -7740,12 +7740,12 @@ var Jn = "add", gc = ["typed", "matrix", "addScalar", "equalScalar", "DenseMatri
|
|
|
7740
7740
|
}), f = ff({
|
|
7741
7741
|
typed: r,
|
|
7742
7742
|
DenseMatrix: u
|
|
7743
|
-
}), h =
|
|
7743
|
+
}), h = Gr({
|
|
7744
7744
|
typed: r,
|
|
7745
7745
|
matrix: t,
|
|
7746
7746
|
concat: a
|
|
7747
7747
|
});
|
|
7748
|
-
return r(
|
|
7748
|
+
return r(Gn, {
|
|
7749
7749
|
"any, any": n,
|
|
7750
7750
|
"any, any, ...any": r.referToSelf((D) => (p, m, s) => {
|
|
7751
7751
|
for (var d = D(p, m), g = 0; g < s.length; g++)
|
|
@@ -7758,7 +7758,7 @@ var Jn = "add", gc = ["typed", "matrix", "addScalar", "equalScalar", "DenseMatri
|
|
|
7758
7758
|
SS: l,
|
|
7759
7759
|
Ss: f
|
|
7760
7760
|
}));
|
|
7761
|
-
}),
|
|
7761
|
+
}), Jn = "dot", wc = ["typed", "addScalar", "multiplyScalar", "conj", "size"], yc = /* @__PURE__ */ G(Jn, wc, (e) => {
|
|
7762
7762
|
var {
|
|
7763
7763
|
typed: r,
|
|
7764
7764
|
addScalar: t,
|
|
@@ -7766,7 +7766,7 @@ var Jn = "add", gc = ["typed", "matrix", "addScalar", "equalScalar", "DenseMatri
|
|
|
7766
7766
|
conj: i,
|
|
7767
7767
|
size: u
|
|
7768
7768
|
} = e;
|
|
7769
|
-
return r(
|
|
7769
|
+
return r(Jn, {
|
|
7770
7770
|
"Array | DenseMatrix, Array | DenseMatrix": a,
|
|
7771
7771
|
"SparseMatrix, SparseMatrix": c
|
|
7772
7772
|
});
|
|
@@ -7834,7 +7834,7 @@ var Jn = "add", gc = ["typed", "matrix", "addScalar", "equalScalar", "DenseMatri
|
|
|
7834
7834
|
function l(f) {
|
|
7835
7835
|
return ve(f) ? f.size() : u(f);
|
|
7836
7836
|
}
|
|
7837
|
-
}), Yn = "index", Fc = ["typed", "Index"], Ec = /* @__PURE__ */
|
|
7837
|
+
}), Yn = "index", Fc = ["typed", "Index"], Ec = /* @__PURE__ */ G(Yn, Fc, (e) => {
|
|
7838
7838
|
var {
|
|
7839
7839
|
typed: r,
|
|
7840
7840
|
Index: t
|
|
@@ -7849,7 +7849,7 @@ var Jn = "add", gc = ["typed", "matrix", "addScalar", "equalScalar", "DenseMatri
|
|
|
7849
7849
|
return t.apply(o, u), o;
|
|
7850
7850
|
}
|
|
7851
7851
|
});
|
|
7852
|
-
}), kn = "det", Ac = ["typed", "matrix", "subtractScalar", "multiply", "divideScalar", "isZero", "unaryMinus"], bc = /* @__PURE__ */
|
|
7852
|
+
}), kn = "det", Ac = ["typed", "matrix", "subtractScalar", "multiply", "divideScalar", "isZero", "unaryMinus"], bc = /* @__PURE__ */ G(kn, Ac, (e) => {
|
|
7853
7853
|
var {
|
|
7854
7854
|
typed: r,
|
|
7855
7855
|
matrix: t,
|
|
@@ -7910,7 +7910,7 @@ var Jn = "add", gc = ["typed", "matrix", "addScalar", "equalScalar", "DenseMatri
|
|
|
7910
7910
|
var w = l[p[f - 1]][f - 1];
|
|
7911
7911
|
return D ? a(w) : w;
|
|
7912
7912
|
}
|
|
7913
|
-
}), Xn = "inv", Cc = ["typed", "matrix", "divideScalar", "addScalar", "multiply", "unaryMinus", "det", "identity", "abs"], _c = /* @__PURE__ */
|
|
7913
|
+
}), Xn = "inv", Cc = ["typed", "matrix", "divideScalar", "addScalar", "multiply", "unaryMinus", "det", "identity", "abs"], _c = /* @__PURE__ */ G(Xn, Cc, (e) => {
|
|
7914
7914
|
var {
|
|
7915
7915
|
typed: r,
|
|
7916
7916
|
matrix: t,
|
|
@@ -7995,13 +7995,13 @@ var Jn = "add", gc = ["typed", "matrix", "addScalar", "equalScalar", "DenseMatri
|
|
|
7995
7995
|
return r.number === "BigNumber" ? Vi(t) : is;
|
|
7996
7996
|
});
|
|
7997
7997
|
function Nc(e, r, t) {
|
|
7998
|
-
return
|
|
7998
|
+
return G(e, r, t, {
|
|
7999
7999
|
recreateOnConfigChange: !0
|
|
8000
8000
|
});
|
|
8001
8001
|
}
|
|
8002
8002
|
var $r = /* @__PURE__ */ ba({
|
|
8003
8003
|
config: Pe
|
|
8004
|
-
}), xt = /* @__PURE__ */ Ma({}),
|
|
8004
|
+
}), xt = /* @__PURE__ */ Ma({}), Gi = /* @__PURE__ */ $a({}), un = /* @__PURE__ */ qa({}), or = /* @__PURE__ */ rs({
|
|
8005
8005
|
Matrix: un
|
|
8006
8006
|
}), et = /* @__PURE__ */ Bc({
|
|
8007
8007
|
BigNumber: $r,
|
|
@@ -8010,7 +8010,7 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8010
8010
|
BigNumber: $r,
|
|
8011
8011
|
Complex: xt,
|
|
8012
8012
|
DenseMatrix: or,
|
|
8013
|
-
Fraction:
|
|
8013
|
+
Fraction: Gi
|
|
8014
8014
|
}), Qt = /* @__PURE__ */ Os({
|
|
8015
8015
|
typed: te
|
|
8016
8016
|
}), Tt = /* @__PURE__ */ Ps({
|
|
@@ -8022,7 +8022,7 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8022
8022
|
typed: te
|
|
8023
8023
|
}), Mc = /* @__PURE__ */ bf({
|
|
8024
8024
|
typed: te
|
|
8025
|
-
}),
|
|
8025
|
+
}), Jr = /* @__PURE__ */ hs({
|
|
8026
8026
|
config: Pe,
|
|
8027
8027
|
typed: te
|
|
8028
8028
|
}), Sc = /* @__PURE__ */ Nf({
|
|
@@ -8033,19 +8033,19 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8033
8033
|
config: Pe,
|
|
8034
8034
|
typed: te
|
|
8035
8035
|
}), Ic = /* @__PURE__ */ fs({
|
|
8036
|
-
equalScalar:
|
|
8036
|
+
equalScalar: Jr,
|
|
8037
8037
|
typed: te
|
|
8038
8038
|
}), zc = /* @__PURE__ */ pf({
|
|
8039
8039
|
Complex: xt,
|
|
8040
8040
|
config: Pe,
|
|
8041
8041
|
typed: te
|
|
8042
|
-
}),
|
|
8042
|
+
}), Ji = /* @__PURE__ */ df({
|
|
8043
8043
|
typed: te
|
|
8044
8044
|
}), Yi = /* @__PURE__ */ ys({
|
|
8045
8045
|
typed: te
|
|
8046
8046
|
}), Er = /* @__PURE__ */ ms({
|
|
8047
8047
|
Matrix: un,
|
|
8048
|
-
equalScalar:
|
|
8048
|
+
equalScalar: Jr,
|
|
8049
8049
|
typed: te
|
|
8050
8050
|
}), Oc = /* @__PURE__ */ qs({
|
|
8051
8051
|
typed: te
|
|
@@ -8067,7 +8067,7 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8067
8067
|
matrix: Ue,
|
|
8068
8068
|
typed: te
|
|
8069
8069
|
}), Xi = /* @__PURE__ */ Ms({
|
|
8070
|
-
Fraction:
|
|
8070
|
+
Fraction: Gi,
|
|
8071
8071
|
typed: te
|
|
8072
8072
|
}), Qi = /* @__PURE__ */ Sf({
|
|
8073
8073
|
BigNumber: $r,
|
|
@@ -8091,7 +8091,7 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8091
8091
|
BigNumber: $r,
|
|
8092
8092
|
DenseMatrix: or,
|
|
8093
8093
|
config: Pe,
|
|
8094
|
-
equalScalar:
|
|
8094
|
+
equalScalar: Jr,
|
|
8095
8095
|
matrix: Ue,
|
|
8096
8096
|
typed: te,
|
|
8097
8097
|
zeros: ki
|
|
@@ -8114,10 +8114,10 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8114
8114
|
SparseMatrix: Er,
|
|
8115
8115
|
addScalar: Tt,
|
|
8116
8116
|
concat: Yr,
|
|
8117
|
-
equalScalar:
|
|
8117
|
+
equalScalar: Jr,
|
|
8118
8118
|
matrix: Ue,
|
|
8119
8119
|
typed: te
|
|
8120
|
-
}), eu = /* @__PURE__ */
|
|
8120
|
+
}), eu = /* @__PURE__ */ Jf({
|
|
8121
8121
|
numeric: Pc,
|
|
8122
8122
|
typed: te
|
|
8123
8123
|
}), qc = /* @__PURE__ */ hc({
|
|
@@ -8149,7 +8149,7 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8149
8149
|
}), Zc = /* @__PURE__ */ yc({
|
|
8150
8150
|
addScalar: Tt,
|
|
8151
8151
|
conj: Mc,
|
|
8152
|
-
multiplyScalar:
|
|
8152
|
+
multiplyScalar: Ji,
|
|
8153
8153
|
size: Uc,
|
|
8154
8154
|
typed: te
|
|
8155
8155
|
}), Lt = /* @__PURE__ */ Ec({
|
|
@@ -8158,9 +8158,9 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8158
8158
|
}), Tr = /* @__PURE__ */ vf({
|
|
8159
8159
|
addScalar: Tt,
|
|
8160
8160
|
dot: Zc,
|
|
8161
|
-
equalScalar:
|
|
8161
|
+
equalScalar: Jr,
|
|
8162
8162
|
matrix: Ue,
|
|
8163
|
-
multiplyScalar:
|
|
8163
|
+
multiplyScalar: Ji,
|
|
8164
8164
|
typed: te
|
|
8165
8165
|
}), Ht = /* @__PURE__ */ If({
|
|
8166
8166
|
bignumber: It,
|
|
@@ -8191,7 +8191,7 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8191
8191
|
multiply: Tr,
|
|
8192
8192
|
typed: te,
|
|
8193
8193
|
unaryMinus: ji
|
|
8194
|
-
}),
|
|
8194
|
+
}), Gc = /* @__PURE__ */ kf({
|
|
8195
8195
|
Complex: xt,
|
|
8196
8196
|
config: Pe,
|
|
8197
8197
|
fraction: Xi,
|
|
@@ -8202,7 +8202,7 @@ var $r = /* @__PURE__ */ ba({
|
|
|
8202
8202
|
number: Yi,
|
|
8203
8203
|
typed: te
|
|
8204
8204
|
});
|
|
8205
|
-
const jn = 299792458, lr = {
|
|
8205
|
+
const Yc = ["Hz", "kHz", "MHz", "GHz"], jn = 299792458, lr = {
|
|
8206
8206
|
Hz: 1,
|
|
8207
8207
|
kHz: 1e3,
|
|
8208
8208
|
MHz: 1e6,
|
|
@@ -8215,7 +8215,7 @@ const jn = 299792458, lr = {
|
|
|
8215
8215
|
um: 1e-6,
|
|
8216
8216
|
nm: 1e-9
|
|
8217
8217
|
};
|
|
8218
|
-
class
|
|
8218
|
+
class Jc {
|
|
8219
8219
|
/**
|
|
8220
8220
|
* Internal storage for frequency unit
|
|
8221
8221
|
* Defaults to 'Hz' as the base SI unit for frequency
|
|
@@ -8734,8 +8734,8 @@ class Gc {
|
|
|
8734
8734
|
this._setWavelengthFromTargetUnit(r, "nm");
|
|
8735
8735
|
}
|
|
8736
8736
|
}
|
|
8737
|
-
const
|
|
8738
|
-
class
|
|
8737
|
+
const kc = ["RI", "MA", "DB"], Xc = ["S", "Y", "Z", "G", "H"];
|
|
8738
|
+
class Qc {
|
|
8739
8739
|
/**
|
|
8740
8740
|
* Comments in the file header with "!" symbol at the beginning of each row
|
|
8741
8741
|
*/
|
|
@@ -8957,12 +8957,36 @@ class Xc {
|
|
|
8957
8957
|
* 2. Extracts frequency points
|
|
8958
8958
|
* 3. Converts raw data into complex numbers based on format
|
|
8959
8959
|
* 4. Stores the results in the matrix property
|
|
8960
|
+
*
|
|
8961
|
+
* @example
|
|
8962
|
+
* ```typescript
|
|
8963
|
+
* import { Touchstone, Frequency } from 'rf-touchstone';
|
|
8964
|
+
*
|
|
8965
|
+
* const s1pString = `
|
|
8966
|
+
* ! This is a 1-port S-parameter file
|
|
8967
|
+
* # MHz S MA R 50
|
|
8968
|
+
* 100 0.99 -4
|
|
8969
|
+
* 200 0.80 -22
|
|
8970
|
+
* 300 0.707 -45
|
|
8971
|
+
* `;
|
|
8972
|
+
*
|
|
8973
|
+
* const touchstone = new Touchstone();
|
|
8974
|
+
* touchstone.readContent(s1pString, 1);
|
|
8975
|
+
*
|
|
8976
|
+
* console.log(touchstone.comments); // Outputs: [ 'This is a 1-port S-parameter file' ]
|
|
8977
|
+
* console.log(touchstone.format); // Outputs: 'MA'
|
|
8978
|
+
* console.log(touchstone.parameter); // Outputs: 'S'
|
|
8979
|
+
* console.log(touchstone.impedance); // Outputs: 50
|
|
8980
|
+
* console.log(touchstone.nports); // Outputs: 1
|
|
8981
|
+
* console.log(touchstone.frequency?.f_scaled); // Outputs: [ 100, 200, 300 ]
|
|
8982
|
+
* console.log(touchstone.matrix); // Outputs: the parsed matrix data
|
|
8983
|
+
* ```
|
|
8960
8984
|
*/
|
|
8961
8985
|
readContent(r, t) {
|
|
8962
8986
|
this.nports = t;
|
|
8963
8987
|
const n = r.split(`
|
|
8964
8988
|
`).map((f) => f.trim()).filter((f) => f !== "");
|
|
8965
|
-
this.comments = n.filter((f) => f.startsWith("!")).map((f) => f.slice(1).trim()), this.frequency = new
|
|
8989
|
+
this.comments = n.filter((f) => f.startsWith("!")).map((f) => f.slice(1).trim()), this.frequency = new Jc();
|
|
8966
8990
|
const i = n.filter((f) => f.startsWith("#"));
|
|
8967
8991
|
if (i.length === 0)
|
|
8968
8992
|
throw new Error('Unable to find the option line starting with "#"');
|
|
@@ -9041,7 +9065,7 @@ class Xc {
|
|
|
9041
9065
|
break;
|
|
9042
9066
|
case "DB":
|
|
9043
9067
|
s = qt({
|
|
9044
|
-
r:
|
|
9068
|
+
r: Gc(10, D[m] / 20),
|
|
9045
9069
|
phi: p[m] / 180 * et
|
|
9046
9070
|
});
|
|
9047
9071
|
break;
|
|
@@ -9120,6 +9144,37 @@ class Xc {
|
|
|
9120
9144
|
* 1. Comments (if any)
|
|
9121
9145
|
* 2. Option line with format, parameter type, and impedance
|
|
9122
9146
|
* 3. Network parameter data in the specified format
|
|
9147
|
+
*
|
|
9148
|
+
* @example
|
|
9149
|
+
* ```typescript
|
|
9150
|
+
* import { Touchstone, Frequency } from 'rf-touchstone';
|
|
9151
|
+
* import { complex } from 'mathjs';
|
|
9152
|
+
*
|
|
9153
|
+
* const touchstone = new Touchstone();
|
|
9154
|
+
*
|
|
9155
|
+
* // Set properties and matrix data (using simplified complex number representation for example)
|
|
9156
|
+
* touchstone.comments = ['Generated by rf-touchstone'];
|
|
9157
|
+
* touchstone.nports = 1;
|
|
9158
|
+
* touchstone.frequency = new Frequency();
|
|
9159
|
+
* touchstone.frequency.unit = 'GHz';
|
|
9160
|
+
* touchstone.frequency.f_scaled = [1.0, 2.0];
|
|
9161
|
+
* touchstone.parameter = 'S';
|
|
9162
|
+
* touchstone.format = 'MA';
|
|
9163
|
+
* touchstone.impedance = 50;
|
|
9164
|
+
* touchstone.matrix = [
|
|
9165
|
+
* [ // Output port 1
|
|
9166
|
+
* [complex(0.5, 0.1), complex(0.4, 0.2)] // S11 at each frequency
|
|
9167
|
+
* ]
|
|
9168
|
+
* ];
|
|
9169
|
+
*
|
|
9170
|
+
* const s1pString = touchstone.writeContent();
|
|
9171
|
+
* console.log(s1pString);
|
|
9172
|
+
* // Expected output (approximately, due to floating point precision):
|
|
9173
|
+
* // ! Generated by rf-touchstone
|
|
9174
|
+
* // # GHz S MA R 50
|
|
9175
|
+
* // 1 0.5099 11.3099
|
|
9176
|
+
* // 2 0.4472 26.5651
|
|
9177
|
+
* ```
|
|
9123
9178
|
*/
|
|
9124
9179
|
writeContent() {
|
|
9125
9180
|
this.validate();
|
|
@@ -9155,7 +9210,22 @@ class Xc {
|
|
|
9155
9210
|
}
|
|
9156
9211
|
}
|
|
9157
9212
|
export {
|
|
9158
|
-
|
|
9159
|
-
Yc as
|
|
9160
|
-
|
|
9213
|
+
Jc as Frequency,
|
|
9214
|
+
Yc as FrequencyUnits,
|
|
9215
|
+
jn as SPEED_OF_LIGHT,
|
|
9216
|
+
Qc as Touchstone,
|
|
9217
|
+
kc as TouchstoneFormats,
|
|
9218
|
+
Xc as TouchstoneParameters,
|
|
9219
|
+
Qt as abs,
|
|
9220
|
+
wt as add,
|
|
9221
|
+
Qn as arg,
|
|
9222
|
+
qt as complex,
|
|
9223
|
+
Lt as index,
|
|
9224
|
+
zc as log10,
|
|
9225
|
+
Tr as multiply,
|
|
9226
|
+
et as pi,
|
|
9227
|
+
Gc as pow,
|
|
9228
|
+
Ht as range,
|
|
9229
|
+
Kn as round,
|
|
9230
|
+
Rt as subset
|
|
9161
9231
|
};
|