@ac-kit/math-linear 0.2.1 → 0.4.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.
Files changed (178) hide show
  1. package/CHANGELOG.md +337 -0
  2. package/README.md +232 -16
  3. package/dist/_brand.d.ts +14 -0
  4. package/dist/_brand.d.ts.map +1 -0
  5. package/dist/_brand.js +2 -0
  6. package/dist/_brand.js.map +1 -0
  7. package/dist/_invert.d.ts +214 -0
  8. package/dist/_invert.d.ts.map +1 -0
  9. package/dist/_invert.js +884 -0
  10. package/dist/_invert.js.map +1 -0
  11. package/dist/_slerp.d.ts +29 -0
  12. package/dist/_slerp.d.ts.map +1 -1
  13. package/dist/_slerp.js +103 -0
  14. package/dist/_slerp.js.map +1 -1
  15. package/dist/_strided-range.d.ts +23 -0
  16. package/dist/_strided-range.d.ts.map +1 -0
  17. package/dist/_strided-range.js +75 -0
  18. package/dist/_strided-range.js.map +1 -0
  19. package/dist/_trs.d.ts +38 -0
  20. package/dist/_trs.d.ts.map +1 -0
  21. package/dist/_trs.js +132 -0
  22. package/dist/_trs.js.map +1 -0
  23. package/dist/affine2-array.d.ts +53 -0
  24. package/dist/affine2-array.d.ts.map +1 -0
  25. package/dist/affine2-array.js +107 -0
  26. package/dist/affine2-array.js.map +1 -0
  27. package/dist/affine2-componentwise.d.ts +28 -0
  28. package/dist/affine2-componentwise.d.ts.map +1 -0
  29. package/dist/affine2-componentwise.js +66 -0
  30. package/dist/affine2-componentwise.js.map +1 -0
  31. package/dist/affine2.d.ts +156 -0
  32. package/dist/affine2.d.ts.map +1 -0
  33. package/dist/affine2.js +437 -0
  34. package/dist/affine2.js.map +1 -0
  35. package/dist/affine3-array.d.ts +53 -0
  36. package/dist/affine3-array.d.ts.map +1 -0
  37. package/dist/affine3-array.js +137 -0
  38. package/dist/affine3-array.js.map +1 -0
  39. package/dist/affine3-componentwise.d.ts +32 -0
  40. package/dist/affine3-componentwise.d.ts.map +1 -0
  41. package/dist/affine3-componentwise.js +100 -0
  42. package/dist/affine3-componentwise.js.map +1 -0
  43. package/dist/affine3.d.ts +205 -0
  44. package/dist/affine3.d.ts.map +1 -0
  45. package/dist/affine3.js +792 -0
  46. package/dist/affine3.js.map +1 -0
  47. package/dist/checked/index.d.ts +35 -0
  48. package/dist/checked/index.d.ts.map +1 -0
  49. package/dist/checked/index.js +58 -0
  50. package/dist/checked/index.js.map +1 -0
  51. package/dist/euler.d.ts +65 -0
  52. package/dist/euler.d.ts.map +1 -0
  53. package/dist/euler.js +217 -0
  54. package/dist/euler.js.map +1 -0
  55. package/dist/index.d.ts +29 -0
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +29 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/kl-activations.d.ts.map +1 -1
  60. package/dist/kl-activations.js +4 -3
  61. package/dist/kl-activations.js.map +1 -1
  62. package/dist/mat2x2-array.d.ts +36 -0
  63. package/dist/mat2x2-array.d.ts.map +1 -0
  64. package/dist/mat2x2-array.js +71 -0
  65. package/dist/mat2x2-array.js.map +1 -0
  66. package/dist/mat2x2-componentwise.d.ts +86 -0
  67. package/dist/mat2x2-componentwise.d.ts.map +1 -0
  68. package/dist/mat2x2-componentwise.js +199 -0
  69. package/dist/mat2x2-componentwise.js.map +1 -0
  70. package/dist/mat2x2.d.ts +79 -25
  71. package/dist/mat2x2.d.ts.map +1 -1
  72. package/dist/mat2x2.js +192 -93
  73. package/dist/mat2x2.js.map +1 -1
  74. package/dist/mat3x3-array.d.ts +36 -0
  75. package/dist/mat3x3-array.d.ts.map +1 -0
  76. package/dist/mat3x3-array.js +91 -0
  77. package/dist/mat3x3-array.js.map +1 -0
  78. package/dist/mat3x3-componentwise.d.ts +86 -0
  79. package/dist/mat3x3-componentwise.d.ts.map +1 -0
  80. package/dist/mat3x3-componentwise.js +299 -0
  81. package/dist/mat3x3-componentwise.js.map +1 -0
  82. package/dist/mat3x3.d.ts +153 -48
  83. package/dist/mat3x3.d.ts.map +1 -1
  84. package/dist/mat3x3.js +470 -192
  85. package/dist/mat3x3.js.map +1 -1
  86. package/dist/mat4x4-array.d.ts +46 -0
  87. package/dist/mat4x4-array.d.ts.map +1 -0
  88. package/dist/mat4x4-array.js +133 -0
  89. package/dist/mat4x4-array.js.map +1 -0
  90. package/dist/mat4x4-componentwise.d.ts +87 -0
  91. package/dist/mat4x4-componentwise.d.ts.map +1 -0
  92. package/dist/mat4x4-componentwise.js +434 -0
  93. package/dist/mat4x4-componentwise.js.map +1 -0
  94. package/dist/mat4x4.d.ts +221 -67
  95. package/dist/mat4x4.d.ts.map +1 -1
  96. package/dist/mat4x4.js +972 -334
  97. package/dist/mat4x4.js.map +1 -1
  98. package/dist/projection.d.ts +113 -0
  99. package/dist/projection.d.ts.map +1 -0
  100. package/dist/projection.js +418 -0
  101. package/dist/projection.js.map +1 -0
  102. package/dist/quaternion-array.d.ts +47 -0
  103. package/dist/quaternion-array.d.ts.map +1 -0
  104. package/dist/quaternion-array.js +86 -0
  105. package/dist/quaternion-array.js.map +1 -0
  106. package/dist/quaternion.d.ts +106 -22
  107. package/dist/quaternion.d.ts.map +1 -1
  108. package/dist/quaternion.js +253 -182
  109. package/dist/quaternion.js.map +1 -1
  110. package/dist/transform.d.ts +220 -0
  111. package/dist/transform.d.ts.map +1 -0
  112. package/dist/transform.js +412 -0
  113. package/dist/transform.js.map +1 -0
  114. package/dist/tridiagonal.d.ts +52 -0
  115. package/dist/tridiagonal.d.ts.map +1 -0
  116. package/dist/tridiagonal.js +90 -0
  117. package/dist/tridiagonal.js.map +1 -0
  118. package/dist/upload.d.ts +55 -0
  119. package/dist/upload.d.ts.map +1 -0
  120. package/dist/upload.js +129 -0
  121. package/dist/upload.js.map +1 -0
  122. package/dist/vec2-array-componentwise.d.ts +207 -0
  123. package/dist/vec2-array-componentwise.d.ts.map +1 -0
  124. package/dist/vec2-array-componentwise.js +472 -0
  125. package/dist/vec2-array-componentwise.js.map +1 -0
  126. package/dist/vec2-array.d.ts +53 -0
  127. package/dist/vec2-array.d.ts.map +1 -0
  128. package/dist/vec2-array.js +123 -0
  129. package/dist/vec2-array.js.map +1 -0
  130. package/dist/vec2-componentwise.d.ts +311 -0
  131. package/dist/vec2-componentwise.d.ts.map +1 -0
  132. package/dist/vec2-componentwise.js +542 -0
  133. package/dist/vec2-componentwise.js.map +1 -0
  134. package/dist/vec2.d.ts +97 -82
  135. package/dist/vec2.d.ts.map +1 -1
  136. package/dist/vec2.js +121 -216
  137. package/dist/vec2.js.map +1 -1
  138. package/dist/vec3-array-componentwise.d.ts +207 -0
  139. package/dist/vec3-array-componentwise.d.ts.map +1 -0
  140. package/dist/vec3-array-componentwise.js +510 -0
  141. package/dist/vec3-array-componentwise.js.map +1 -0
  142. package/dist/vec3-array.d.ts +102 -0
  143. package/dist/vec3-array.d.ts.map +1 -0
  144. package/dist/vec3-array.js +299 -0
  145. package/dist/vec3-array.js.map +1 -0
  146. package/dist/vec3-componentwise.d.ts +310 -0
  147. package/dist/vec3-componentwise.d.ts.map +1 -0
  148. package/dist/vec3-componentwise.js +594 -0
  149. package/dist/vec3-componentwise.js.map +1 -0
  150. package/dist/vec3.d.ts +177 -87
  151. package/dist/vec3.d.ts.map +1 -1
  152. package/dist/vec3.js +391 -272
  153. package/dist/vec3.js.map +1 -1
  154. package/dist/vec4-array-componentwise.d.ts +198 -0
  155. package/dist/vec4-array-componentwise.d.ts.map +1 -0
  156. package/dist/vec4-array-componentwise.js +521 -0
  157. package/dist/vec4-array-componentwise.js.map +1 -0
  158. package/dist/vec4-array.d.ts +12 -0
  159. package/dist/vec4-array.d.ts.map +1 -0
  160. package/dist/vec4-array.js +43 -0
  161. package/dist/vec4-array.js.map +1 -0
  162. package/dist/vec4-componentwise.d.ts +299 -0
  163. package/dist/vec4-componentwise.d.ts.map +1 -0
  164. package/dist/vec4-componentwise.js +637 -0
  165. package/dist/vec4-componentwise.js.map +1 -0
  166. package/dist/vec4.d.ts +59 -53
  167. package/dist/vec4.d.ts.map +1 -1
  168. package/dist/vec4.js +74 -249
  169. package/dist/vec4.js.map +1 -1
  170. package/dist/view-basis.d.ts +15 -0
  171. package/dist/view-basis.d.ts.map +1 -0
  172. package/dist/view-basis.js +29 -0
  173. package/dist/view-basis.js.map +1 -0
  174. package/dist/viewport.d.ts +114 -0
  175. package/dist/viewport.d.ts.map +1 -0
  176. package/dist/viewport.js +250 -0
  177. package/dist/viewport.js.map +1 -0
  178. package/package.json +19 -9
@@ -0,0 +1,214 @@
1
+ import { type Callable } from "@ac-kit/core";
2
+ /**
3
+ * The second chance of a matrix inversion. A matrix whose entries span a range
4
+ * that the cofactors' products cannot (`diag(1e200, 1e200, 1e200, 1e-200)`: a
5
+ * determinant of `1e400`, an inverse of `1e-200` and `1e200`) is inverted in
6
+ * the scale where they do. Writes `m`, a square matrix of `size` rows in any
7
+ * layout, into `out` as `diag(2^-r) · m · diag(2^-c)` (exact: powers of two,
8
+ * unless an entry lands in or below the subnormal range, see below), where
9
+ * `2^r` of a row is the power of two at or below its largest entry and `2^c` of
10
+ * a column that of the same after the rows, so every row and column has an
11
+ * entry of magnitude in `[1/2, 2)`. The caller inverts `out` and passes the
12
+ * result to {@link unequilibrateInverse_}, which scales each entry of the
13
+ * inverse by its own power of two in one step, so no entry passes through a
14
+ * range its neighbours do not share. Returns `false`, writing nothing, when an
15
+ * entry is not finite or a row or a column is zero, which no scaling helps.
16
+ * When the entries of a column span more than the binary64 range once their
17
+ * rows are scaled (`[[2^900, 2^900, 0], [2^900, 2^900, 2^-200], [0, 2^900,
18
+ * 2^900]]`, whose `2^-200` becomes `2^-1100`), an entry rounds or vanishes, and
19
+ * {@link isEquilibrationLossy_} says so. `out` may be `m`.
20
+ */
21
+ export declare function equilibrateForInversion_(out: number[], m: ArrayLike<number>, size: number): boolean;
22
+ /**
23
+ * Turns the inverse in `out` of the equilibrated matrix of
24
+ * {@link equilibrateForInversion_} into the inverse of the original, in place:
25
+ * its entry at row `i` and column `j` is scaled by `2^(-c_i - r_j)`. `path`,
26
+ * {@link COFACTOR_PATH_} or {@link PIVOTED_PATH_}, says which inversion wrote
27
+ * it, so how far its entries may be from the exact ones, as a fraction of the
28
+ * largest of them ({@link ERROR_SHARES_}). Returns whether every entry, plus
29
+ * its error so scaled, stays within `Number.MAX_VALUE`: only then is the exact
30
+ * inverse sure to round to finite numbers. A rounded entry just below the limit
31
+ * may stand for one past it (`1 / (4237 · 2^-1024)` rounded, times `4237`, is
32
+ * `Number.MAX_VALUE`, where the exact `2^1024` rounds to `Infinity`), and an
33
+ * entry rounded to zero may stand for one the scaling sends past it. `false`
34
+ * leaves `out` partly scaled.
35
+ */
36
+ export declare function unequilibrateInverse_(out: number[], size: number, path: number): boolean;
37
+ /**
38
+ * The largest magnitude the binary64 paths of an inversion accept for an entry
39
+ * of their inverse (or of an affine inverse's translation): their error bounds,
40
+ * at most about `2^-39` of the largest entry, keep the exact entry below
41
+ * `Number.MAX_VALUE`, so that it rounds to a finite number. An entry at or past
42
+ * it is left to {@link invertRescaled_}, whose bound is checked entry by entry
43
+ * and whose overlap with the overflow threshold exact arithmetic settles.
44
+ */
45
+ export declare const INVERSE_LIMIT_: number;
46
+ /**
47
+ * The second chance of a matrix inversion, after its plain cofactor expansion
48
+ * failed. Inverts `m`, a square matrix of `size` rows (at most 4) in any
49
+ * layout, into `out` and returns `true`, or fills `out` with `NaN` and returns
50
+ * `false` exactly when `m` is singular, an entry is not finite, or an entry of
51
+ * the inverse, rounded to the nearest binary64, is beyond `Number.MAX_VALUE`.
52
+ * `out` may be `m`.
53
+ *
54
+ * The rows and columns are scaled by powers of two first
55
+ * ({@link equilibrateForInversion_}), and the inverse scaled back
56
+ * ({@link unequilibrateInverse_}). `invert` (writing only on success, its
57
+ * output may be its input) inverts the equilibrated matrix; when it refuses, LU
58
+ * factorisation with partial pivoting ({@link invertPivoted_}) does, which no
59
+ * cancellation of the cofactors stops. When `decisive`, a refusal of `invert`
60
+ * already means the equilibrated matrix, so `m`, is singular. Otherwise an
61
+ * exact elimination proves it singular or invertible. When the elimination
62
+ * rounded, when the inverse it found leaves the binary64 range once scaled
63
+ * back, or when the scaling itself rounded an entry (an entry far below the
64
+ * others of its column, which it sends below the subnormal range, so that the
65
+ * scaled matrix is no longer exactly `m` scaled, and may be singular when `m`
66
+ * is not), {@link invertExact_} settles `m` itself: `false` is never a rounding
67
+ * artefact. A scaling that rounded skips `invert` and the decisive shortcut,
68
+ * and the elimination counts it in its certificate. A zero row or column, or an
69
+ * entry that is not finite, is refused before any of them.
70
+ *
71
+ * Time complexity: O(size³), with no allocation unless the exact settlement
72
+ * runs: for a matrix whose determinant rounding takes to zero in both its
73
+ * cofactors and its rounded elimination, one with a condition number beyond
74
+ * about `2^52`, singular or not; for an inverse whose scaled-back entries
75
+ * overflow, or come within their error bound of overflowing; and for a matrix
76
+ * whose scaling rounded an entry and whose elimination cannot certify its
77
+ * inverse.
78
+ */
79
+ export declare function invertRescaled_(out: number[], m: ArrayLike<number>, size: number, invert: Callable<[number[], ArrayLike<number>, number], boolean>, decisive: boolean): boolean;
80
+ /**
81
+ * The last chance of a matrix inversion, for a matrix that every binary64
82
+ * elimination declared singular or out of range: `m`, a square matrix of `size`
83
+ * rows (at most 4) in any layout, inverted in exact `bigint` arithmetic and
84
+ * each entry rounded once to the nearest binary64. Writes the inverse into
85
+ * `out` and returns `true`, or returns `false`, writing nothing, exactly when
86
+ * `m` is singular, an entry is not finite, or an entry of the inverse is beyond
87
+ * the range of a binary64 number. `out` may be `m`.
88
+ *
89
+ * A matrix can be invertible with an inverse that fits and still lose its
90
+ * determinant to rounding in any floating-point elimination: rows that differ
91
+ * only in an entry far below their others (`[[1, 1, 0, 0], [1, 1, 2^-600, 0],
92
+ * …]` once its rows and columns are permuted and scaled) cancel to an exact
93
+ * zero. The entries are integers times one common power of two, so the adjugate
94
+ * and the determinant are exact integers (Laplace expansion), and each entry of
95
+ * the inverse is their quotient, rounded once.
96
+ *
97
+ * Allocates (`bigint` values): it runs only after the binary64 paths fail. Time
98
+ * complexity: O(size!) `bigint` products of up to `size` × 2,100 bits.
99
+ */
100
+ export declare function invertExact_(out: number[], m: ArrayLike<number>, size: number): boolean;
101
+ /**
102
+ * Inverts `m`, a column-major square matrix of `size` rows (at most 4), into
103
+ * `out` and returns {@link PIVOTED_INVERTED_}; otherwise writes nothing and
104
+ * returns {@link PIVOTED_SINGULAR_} when an entry of `m` is not finite or its
105
+ * elimination, exact throughout, meets a zero pivot, and
106
+ * {@link PIVOTED_UNSETTLED_} when the elimination rounded or an entry of the
107
+ * inverse is not finite: rounding can make a singular matrix look invertible
108
+ * and an invertible one singular, so neither is then proved. `out` may be `m`.
109
+ * Meant for the matrix {@link equilibrateForInversion_} wrote, whose every row
110
+ * and column has an entry of magnitude in `[1, 2)`, so the partial pivoting
111
+ * compares rows of one scale (Golub and Van Loan, §3.5.2), after a cofactor
112
+ * expansion of it found its determinant lost to rounding.
113
+ *
114
+ * LU factorisation with partial pivoting, `P · m = L · U` (Golub and Van Loan,
115
+ * "Matrix Computations", 4th ed., algorithm 3.4.1), then `L · U · x = P · e_j`
116
+ * solved for every column `e_j` of the identity by forward and back
117
+ * substitution (§3.1). Backward stable whatever the determinant: no product of
118
+ * more than two entries is formed, so a matrix whose cofactors cancel or whose
119
+ * determinant underflows while its inverse fits is inverted all the same. Every
120
+ * division, product and difference of the factorisation is checked for rounding
121
+ * (`twoProductErrorInRange`, `twoSumError`): when none rounds, `L · U` is
122
+ * exactly `P · m`, and its pivots decide whether `m` is singular.
123
+ *
124
+ * Time complexity: O(size³), with no allocation.
125
+ */
126
+ export declare function invertPivoted_(out: number[], m: ArrayLike<number>, size: number): number;
127
+ /** Half a unit in the last place of 1. */
128
+ export declare const UNIT_ROUNDOFF_: number;
129
+ /**
130
+ * The relative error a cofactor expansion's determinant, and its cofactors
131
+ * against the largest of them, may carry for its inverse to be accepted: a
132
+ * normwise backward error of at most about `2^-40`.
133
+ *
134
+ * An error bound `r · u + k · η` (rounding, then `k` products that may fall in
135
+ * the subnormal range, each adding at most `η = 2^-1073`) is accepted against a
136
+ * value `v` when `r · u ≤ ROUNDING_TOLERANCE_ · v` and `k · UNDERFLOW_UNIT_ ≤
137
+ * UNDERFLOW_TOLERANCE_ · v`: the first share is `(1 − 2^-20)` of
138
+ * `INVERSE_TOLERANCE_`, the second `2^-20` of it, both scaled by `2^1000` so
139
+ * that no operand is subnormal. Arithmetic on a subnormal number takes a
140
+ * microcode assist of about a hundred cycles on x86, which on every call would
141
+ * cost the plain path several times its own time.
142
+ */
143
+ export declare const INVERSE_TOLERANCE_: number;
144
+ /** `INVERSE_TOLERANCE_ · (1 − 2^-20)`, the share of the rounding errors. */
145
+ export declare const ROUNDING_TOLERANCE_: number;
146
+ /** `η · 2^1000`, the error of a product in the subnormal range, rounded up. */
147
+ export declare const UNDERFLOW_UNIT_: number;
148
+ /** `INVERSE_TOLERANCE_ · 2^-20 · 2^1000`, the share of the underflows. */
149
+ export declare const UNDERFLOW_TOLERANCE_: number;
150
+ /**
151
+ * The magnitude of the determinant {@link isWithinTolerance3_} judges: through
152
+ * typed storage, as a double passed to a call the engine does not inline is
153
+ * boxed.
154
+ */
155
+ export declare const BOUND_INPUT_: Float64Array<ArrayBuffer>;
156
+ /**
157
+ * Whether the forward error bound of a 3 × 3 cofactor expansion of the
158
+ * column-major `m` (its first nine entries) keeps the determinant, of the
159
+ * magnitude in {@link BOUND_INPUT_}, within `2^-41` of itself and every minor
160
+ * within `2^-41 / 3` of the largest of them (Higham, "Accuracy and Stability of
161
+ * Numerical Algorithms", §3.1): a minor `x·y − z·w` is within `3u·(|x·y| +
162
+ * |z·w|) + η` of its value, the determinant, along a row or a column, within
163
+ * `7u·P + (M₁ + 2)·2η`, `P` the permanent of `|m|` and `M₁` the sum of that row
164
+ * or column, at most the sum of all of `|m|`. The tight bound behind the cheap
165
+ * one of `mat3x3Invert` and `affine3Invert`, whose minors are the same products
166
+ * in either order, so of the same magnitudes.
167
+ *
168
+ * Time complexity: O(1), with no allocation.
169
+ */
170
+ export declare function isWithinTolerance3_(m: ArrayLike<number>): boolean;
171
+ /**
172
+ * Whether the cofactor expansion of `mat3x3Invert` (`size` 3) or `mat4x4Invert`
173
+ * (`size` 4) of the column-major `m` rounds nowhere: every product and sum of
174
+ * its minors, cofactors and determinant recomputed in the same order and
175
+ * checked (`twoProductErrorInRange`, `twoSumError`). Then the cofactors and the
176
+ * determinant are exact, and the inverse is each cofactor over the determinant,
177
+ * rounded at most twice, however they cancel (an integer matrix of determinant
178
+ * 1). The second chance of a cofactor expansion whose error bound refused it.
179
+ *
180
+ * Time complexity: O(1), with no allocation.
181
+ */
182
+ export declare function isCofactorExpansionExact_(m: ArrayLike<number>, size: number): boolean;
183
+ /**
184
+ * Writes the translation of the inverse of an affine transform `a` (its `size ×
185
+ * size` linear part `A`, `size` 2 or 3, column-major from `a[0]`, then its
186
+ * translation `t` from `a[offset]`, `offset` being `size²`), given the inverse
187
+ * `B` of `A`, to `out[offset]` and on, and returns `true`; or returns `false`,
188
+ * writing nothing there, exactly when an entry of the exact `−A⁻¹ · t` rounds
189
+ * past `Number.MAX_VALUE`.
190
+ *
191
+ * Each entry is the correctly rounded value of `−B · t` for the `B` given
192
+ * (`dotExactInto`), however its terms cancel, overflow or underflow. Whether it
193
+ * overflows is never read off that rounded value: a rigorous bound first proves
194
+ * the exact `−A⁻¹ · t` far enough from the threshold
195
+ * ({@link isTranslationCertain_}). When it cannot (a component within the bound
196
+ * of the threshold or past it, or a `B` too far from `A⁻¹`, as for an
197
+ * ill-conditioned `A`), `isHomogeneousInvertible(a)` decides: whether the
198
+ * inverse of the homogeneous matrix of `a`, whose linear block is `A⁻¹` and
199
+ * last column `−A⁻¹ · t`, rounds to finite numbers (`mat3x3Invert` or
200
+ * `mat4x4Invert`, exact about it). A component of `−B · t` that overflowed
201
+ * where the exact one does not is settled from `a` itself in exact arithmetic
202
+ * ({@link settleInverseTranslation_}): every component is then `−A⁻¹ · t`
203
+ * rounded once. So with a scale of `161/256` and a translation of `161 ·
204
+ * 2^1016`, where `−B · t` rounds to `−Number.MAX_VALUE`, the exact `−2^1024` is
205
+ * refused. `a` is read before anything is written, so `out` may be `a`; `B` is
206
+ * the already unscaled inverse, so no entry of it passes through the range of
207
+ * the scaled matrix.
208
+ *
209
+ * Time complexity: O(size³), with no allocation unless the exact settlement, or
210
+ * that of the homogeneous inversion, runs: for a translation near the overflow
211
+ * threshold.
212
+ */
213
+ export declare function writeInverseTranslation_(out: number[], offset: number, inverse: ArrayLike<number>, size: number, a: ArrayLike<number>, isHomogeneousInvertible: Callable<[ArrayLike<number>], boolean>): boolean;
214
+ //# sourceMappingURL=_invert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_invert.d.ts","sourceRoot":"","sources":["../src/_invert.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,QAAQ,EAIb,MAAM,cAAc,CAAC;AAqCtB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CACvC,GAAG,EAAE,MAAM,EAAE,EACb,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EACpB,IAAI,EAAE,MAAM,GACV,OAAO,CA2DT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACpC,GAAG,EAAE,MAAM,EAAE,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACV,OAAO,CAuBT;AAKD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAoC,CAAC;AA0BhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,eAAe,CAC9B,GAAG,EAAE,MAAM,EAAE,EACb,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EACpB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,EAChE,QAAQ,EAAE,OAAO,GACf,OAAO,CAmCT;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAC3B,GAAG,EAAE,MAAM,EAAE,EACb,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EACpB,IAAI,EAAE,MAAM,GACV,OAAO,CA+DT;AA+CD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAC7B,GAAG,EAAE,MAAM,EAAE,EACb,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EACpB,IAAI,EAAE,MAAM,GACV,MAAM,CA4GR;AAmCD,0CAA0C;AAC1C,eAAO,MAAM,cAAc,QAAW,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,QAAW,CAAC;AAE3C,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,QAAsC,CAAC;AAEvE,+EAA+E;AAC/E,eAAO,MAAM,eAAe,QAAW,CAAC;AAExC,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,QAAW,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,YAAY,2BAAsB,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,OAAO,CAsDjE;AA8GD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACxC,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EACpB,IAAI,EAAE,MAAM,GACV,OAAO,CAoDT;AAwCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,wBAAwB,CACvC,GAAG,EAAE,MAAM,EAAE,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,EAC1B,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EACpB,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,GAC7D,OAAO,CA2BT"}