@danielsimonjr/mathts-wasm 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/mathts.d.ts CHANGED
@@ -6,6 +6,10 @@ export declare function __pin(ptr: number): number;
6
6
  export declare function __unpin(ptr: number): void;
7
7
  export declare function __collect(): void;
8
8
  export declare const __rtti_base: number;
9
+ /**
10
+ * src/heap/heap_reset
11
+ */
12
+ export declare function heap_reset(): void;
9
13
  /**
10
14
  * src/types/complex/complex
11
15
  * @param re `f64`
@@ -921,9 +925,10 @@ export declare function matrix_lu_decompose(a: Float64Array, n: number, l_out: F
921
925
  * @param n `i32`
922
926
  * @param q_out `~lib/typedarray/Float64Array`
923
927
  * @param r_out `~lib/typedarray/Float64Array`
928
+ * @param v_work `~lib/typedarray/Float64Array | null`
924
929
  * @returns `i32`
925
930
  */
926
- export declare function matrix_qr_decompose(a: Float64Array, m: number, n: number, q_out: Float64Array, r_out: Float64Array): number;
931
+ export declare function matrix_qr_decompose(a: Float64Array, m: number, n: number, q_out: Float64Array, r_out: Float64Array, v_work: Float64Array | null): number;
927
932
  /**
928
933
  * src/algebra/decomposition/matrix_cholesky
929
934
  * @param a `~lib/typedarray/Float64Array`
package/build/mathts.js CHANGED
@@ -677,16 +677,18 @@ async function instantiate(module, imports = {}) {
677
677
  __release(u_out);
678
678
  }
679
679
  },
680
- matrix_qr_decompose(a, m, n, q_out, r_out) {
681
- // src/algebra/decomposition/matrix_qr_decompose(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => i32
680
+ matrix_qr_decompose(a, m, n, q_out, r_out, v_work) {
681
+ // src/algebra/decomposition/matrix_qr_decompose(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array | null) => i32
682
682
  a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
683
683
  q_out = __retain(__lowerTypedArray(Float64Array, 5, 3, q_out) || __notnull());
684
- r_out = __lowerTypedArray(Float64Array, 5, 3, r_out) || __notnull();
684
+ r_out = __retain(__lowerTypedArray(Float64Array, 5, 3, r_out) || __notnull());
685
+ v_work = __lowerTypedArray(Float64Array, 5, 3, v_work);
685
686
  try {
686
- return exports.matrix_qr_decompose(a, m, n, q_out, r_out);
687
+ return exports.matrix_qr_decompose(a, m, n, q_out, r_out, v_work);
687
688
  } finally {
688
689
  __release(a);
689
690
  __release(q_out);
691
+ __release(r_out);
690
692
  }
691
693
  },
692
694
  matrix_cholesky(a, n, l_out) {
@@ -1904,6 +1906,7 @@ export const {
1904
1906
  __unpin,
1905
1907
  __collect,
1906
1908
  __rtti_base,
1909
+ heap_reset,
1907
1910
  complex,
1908
1911
  complexFromPolar,
1909
1912
  add_f64,
package/build/mathts.wasm CHANGED
Binary file