@justinelliottcobb/amari-wasm 0.9.7-1 → 0.9.8

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/amari_wasm.d.ts CHANGED
@@ -4,22 +4,22 @@
4
4
  * Initialize the enumerative geometry module
5
5
  */
6
6
  export function initEnumerative(): void;
7
- /**
8
- * Calculate light deflection angle for photon grazing massive object
9
- */
10
- export function light_deflection_angle(impact_parameter: number, mass: number): number;
11
7
  /**
12
8
  * Validate that this module loaded correctly
13
9
  */
14
10
  export function validate_relativistic_module(): boolean;
11
+ /**
12
+ * Convert velocity to Lorentz factor
13
+ */
14
+ export function velocity_to_gamma(velocity_magnitude: number): number;
15
15
  /**
16
16
  * Convert Lorentz factor to velocity
17
17
  */
18
18
  export function gamma_to_velocity(gamma: number): number;
19
19
  /**
20
- * Convert velocity to Lorentz factor
20
+ * Calculate light deflection angle for photon grazing massive object
21
21
  */
22
- export function velocity_to_gamma(velocity_magnitude: number): number;
22
+ export function light_deflection_angle(impact_parameter: number, mass: number): number;
23
23
  /**
24
24
  * Initialize the WASM module
25
25
  */
@@ -2258,16 +2258,16 @@ export interface InitOutput {
2258
2258
  readonly __wbg_wasmrotor_free: (a: number, b: number) => void;
2259
2259
  readonly wasmmultiobjectiveoptimizer_new: () => number;
2260
2260
  readonly wasmsimpleoptimizer_new: () => number;
2261
+ readonly wasm_bindgen__convert__closures_____invoke__hce8272eee2f071c2: (a: number, b: number, c: any) => void;
2262
+ readonly wasm_bindgen__closure__destroy__h2186110628e4ed68: (a: number, b: number) => void;
2263
+ readonly wasm_bindgen__convert__closures_____invoke__h4ca4ba3872354ffe: (a: number, b: number, c: any, d: any) => void;
2264
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
2265
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
2261
2266
  readonly __wbindgen_exn_store: (a: number) => void;
2262
2267
  readonly __externref_table_alloc: () => number;
2263
- readonly __wbindgen_export_2: WebAssembly.Table;
2268
+ readonly __wbindgen_externrefs: WebAssembly.Table;
2264
2269
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
2265
- readonly __wbindgen_malloc: (a: number, b: number) => number;
2266
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
2267
- readonly __wbindgen_export_6: WebAssembly.Table;
2268
2270
  readonly __externref_table_dealloc: (a: number) => void;
2269
- readonly closure38_externref_shim: (a: number, b: number, c: any) => void;
2270
- readonly closure28_externref_shim: (a: number, b: number, c: any, d: any) => void;
2271
2271
  readonly __wbindgen_start: () => void;
2272
2272
  }
2273
2273
 
package/amari_wasm.js CHANGED
@@ -1,20 +1,72 @@
1
1
  let wasm;
2
2
 
3
- function addToExternrefTable0(obj) {
4
- const idx = wasm.__externref_table_alloc();
5
- wasm.__wbindgen_export_2.set(idx, obj);
6
- return idx;
7
- }
8
-
9
- function handleError(f, args) {
10
- try {
11
- return f.apply(this, args);
12
- } catch (e) {
13
- const idx = addToExternrefTable0(e);
14
- wasm.__wbindgen_exn_store(idx);
3
+ function debugString(val) {
4
+ // primitive types
5
+ const type = typeof val;
6
+ if (type == 'number' || type == 'boolean' || val == null) {
7
+ return `${val}`;
8
+ }
9
+ if (type == 'string') {
10
+ return `"${val}"`;
15
11
  }
12
+ if (type == 'symbol') {
13
+ const description = val.description;
14
+ if (description == null) {
15
+ return 'Symbol';
16
+ } else {
17
+ return `Symbol(${description})`;
18
+ }
19
+ }
20
+ if (type == 'function') {
21
+ const name = val.name;
22
+ if (typeof name == 'string' && name.length > 0) {
23
+ return `Function(${name})`;
24
+ } else {
25
+ return 'Function';
26
+ }
27
+ }
28
+ // objects
29
+ if (Array.isArray(val)) {
30
+ const length = val.length;
31
+ let debug = '[';
32
+ if (length > 0) {
33
+ debug += debugString(val[0]);
34
+ }
35
+ for(let i = 1; i < length; i++) {
36
+ debug += ', ' + debugString(val[i]);
37
+ }
38
+ debug += ']';
39
+ return debug;
40
+ }
41
+ // Test for built-in
42
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
43
+ let className;
44
+ if (builtInMatches && builtInMatches.length > 1) {
45
+ className = builtInMatches[1];
46
+ } else {
47
+ // Failed to match the standard '[object ClassName]'
48
+ return toString.call(val);
49
+ }
50
+ if (className == 'Object') {
51
+ // we're a user defined class or Object
52
+ // JSON.stringify avoids problems with cycles, and is generally much
53
+ // easier than looping through ownProperties of `val`.
54
+ try {
55
+ return 'Object(' + JSON.stringify(val) + ')';
56
+ } catch (_) {
57
+ return 'Object';
58
+ }
59
+ }
60
+ // errors
61
+ if (val instanceof Error) {
62
+ return `${val.name}: ${val.message}\n${val.stack}`;
63
+ }
64
+ // TODO we could test for more things here, like `Set`s and `Map`s.
65
+ return className;
16
66
  }
17
67
 
68
+ let WASM_VECTOR_LEN = 0;
69
+
18
70
  let cachedUint8ArrayMemory0 = null;
19
71
 
20
72
  function getUint8ArrayMemory0() {
@@ -24,29 +76,6 @@ function getUint8ArrayMemory0() {
24
76
  return cachedUint8ArrayMemory0;
25
77
  }
26
78
 
27
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
28
-
29
- cachedTextDecoder.decode();
30
-
31
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
32
- let numBytesDecoded = 0;
33
- function decodeText(ptr, len) {
34
- numBytesDecoded += len;
35
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
36
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
37
- cachedTextDecoder.decode();
38
- numBytesDecoded = len;
39
- }
40
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
41
- }
42
-
43
- function getStringFromWasm0(ptr, len) {
44
- ptr = ptr >>> 0;
45
- return decodeText(ptr, len);
46
- }
47
-
48
- let WASM_VECTOR_LEN = 0;
49
-
50
79
  const cachedTextEncoder = new TextEncoder();
51
80
 
52
81
  if (!('encodeInto' in cachedTextEncoder)) {
@@ -112,78 +141,45 @@ function isLikeNone(x) {
112
141
  return x === undefined || x === null;
113
142
  }
114
143
 
115
- function debugString(val) {
116
- // primitive types
117
- const type = typeof val;
118
- if (type == 'number' || type == 'boolean' || val == null) {
119
- return `${val}`;
120
- }
121
- if (type == 'string') {
122
- return `"${val}"`;
123
- }
124
- if (type == 'symbol') {
125
- const description = val.description;
126
- if (description == null) {
127
- return 'Symbol';
128
- } else {
129
- return `Symbol(${description})`;
130
- }
131
- }
132
- if (type == 'function') {
133
- const name = val.name;
134
- if (typeof name == 'string' && name.length > 0) {
135
- return `Function(${name})`;
136
- } else {
137
- return 'Function';
138
- }
139
- }
140
- // objects
141
- if (Array.isArray(val)) {
142
- const length = val.length;
143
- let debug = '[';
144
- if (length > 0) {
145
- debug += debugString(val[0]);
146
- }
147
- for(let i = 1; i < length; i++) {
148
- debug += ', ' + debugString(val[i]);
149
- }
150
- debug += ']';
151
- return debug;
152
- }
153
- // Test for built-in
154
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
155
- let className;
156
- if (builtInMatches && builtInMatches.length > 1) {
157
- className = builtInMatches[1];
158
- } else {
159
- // Failed to match the standard '[object ClassName]'
160
- return toString.call(val);
161
- }
162
- if (className == 'Object') {
163
- // we're a user defined class or Object
164
- // JSON.stringify avoids problems with cycles, and is generally much
165
- // easier than looping through ownProperties of `val`.
166
- try {
167
- return 'Object(' + JSON.stringify(val) + ')';
168
- } catch (_) {
169
- return 'Object';
170
- }
144
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
145
+
146
+ cachedTextDecoder.decode();
147
+
148
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
149
+ let numBytesDecoded = 0;
150
+ function decodeText(ptr, len) {
151
+ numBytesDecoded += len;
152
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
153
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
154
+ cachedTextDecoder.decode();
155
+ numBytesDecoded = len;
171
156
  }
172
- // errors
173
- if (val instanceof Error) {
174
- return `${val.name}: ${val.message}\n${val.stack}`;
157
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
158
+ }
159
+
160
+ function getStringFromWasm0(ptr, len) {
161
+ ptr = ptr >>> 0;
162
+ return decodeText(ptr, len);
163
+ }
164
+
165
+ function addToExternrefTable0(obj) {
166
+ const idx = wasm.__externref_table_alloc();
167
+ wasm.__wbindgen_externrefs.set(idx, obj);
168
+ return idx;
169
+ }
170
+
171
+ function handleError(f, args) {
172
+ try {
173
+ return f.apply(this, args);
174
+ } catch (e) {
175
+ const idx = addToExternrefTable0(e);
176
+ wasm.__wbindgen_exn_store(idx);
175
177
  }
176
- // TODO we could test for more things here, like `Set`s and `Map`s.
177
- return className;
178
178
  }
179
179
 
180
180
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
181
181
  ? { register: () => {}, unregister: () => {} }
182
- : new FinalizationRegistry(
183
- state => {
184
- wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
185
- }
186
- );
182
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
187
183
 
188
184
  function makeMutClosure(arg0, arg1, dtor, f) {
189
185
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
@@ -198,15 +194,17 @@ function makeMutClosure(arg0, arg1, dtor, f) {
198
194
  try {
199
195
  return f(a, state.b, ...args);
200
196
  } finally {
201
- if (--state.cnt === 0) {
202
- wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
203
- CLOSURE_DTORS.unregister(state);
204
- } else {
205
- state.a = a;
206
- }
197
+ state.a = a;
198
+ real._wbg_cb_unref();
199
+ }
200
+ };
201
+ real._wbg_cb_unref = () => {
202
+ if (--state.cnt === 0) {
203
+ state.dtor(state.a, state.b);
204
+ state.a = 0;
205
+ CLOSURE_DTORS.unregister(state);
207
206
  }
208
207
  };
209
- real.original = state;
210
208
  CLOSURE_DTORS.register(real, state, state);
211
209
  return real;
212
210
  }
@@ -248,7 +246,7 @@ function passArray32ToWasm0(arg, malloc) {
248
246
  }
249
247
 
250
248
  function takeFromExternrefTable0(idx) {
251
- const value = wasm.__wbindgen_export_2.get(idx);
249
+ const value = wasm.__wbindgen_externrefs.get(idx);
252
250
  wasm.__externref_table_dealloc(idx);
253
251
  return value;
254
252
  }
@@ -270,17 +268,6 @@ function passArrayF64ToWasm0(arg, malloc) {
270
268
  WASM_VECTOR_LEN = arg.length;
271
269
  return ptr;
272
270
  }
273
- /**
274
- * Calculate light deflection angle for photon grazing massive object
275
- * @param {number} impact_parameter
276
- * @param {number} mass
277
- * @returns {number}
278
- */
279
- export function light_deflection_angle(impact_parameter, mass) {
280
- const ret = wasm.light_deflection_angle(impact_parameter, mass);
281
- return ret;
282
- }
283
-
284
271
  /**
285
272
  * Validate that this module loaded correctly
286
273
  * @returns {boolean}
@@ -291,12 +278,12 @@ export function validate_relativistic_module() {
291
278
  }
292
279
 
293
280
  /**
294
- * Convert Lorentz factor to velocity
295
- * @param {number} gamma
281
+ * Convert velocity to Lorentz factor
282
+ * @param {number} velocity_magnitude
296
283
  * @returns {number}
297
284
  */
298
- export function gamma_to_velocity(gamma) {
299
- const ret = wasm.gamma_to_velocity(gamma);
285
+ export function velocity_to_gamma(velocity_magnitude) {
286
+ const ret = wasm.velocity_to_gamma(velocity_magnitude);
300
287
  if (ret[2]) {
301
288
  throw takeFromExternrefTable0(ret[1]);
302
289
  }
@@ -304,18 +291,29 @@ export function gamma_to_velocity(gamma) {
304
291
  }
305
292
 
306
293
  /**
307
- * Convert velocity to Lorentz factor
308
- * @param {number} velocity_magnitude
294
+ * Convert Lorentz factor to velocity
295
+ * @param {number} gamma
309
296
  * @returns {number}
310
297
  */
311
- export function velocity_to_gamma(velocity_magnitude) {
312
- const ret = wasm.velocity_to_gamma(velocity_magnitude);
298
+ export function gamma_to_velocity(gamma) {
299
+ const ret = wasm.gamma_to_velocity(gamma);
313
300
  if (ret[2]) {
314
301
  throw takeFromExternrefTable0(ret[1]);
315
302
  }
316
303
  return ret[0];
317
304
  }
318
305
 
306
+ /**
307
+ * Calculate light deflection angle for photon grazing massive object
308
+ * @param {number} impact_parameter
309
+ * @param {number} mass
310
+ * @returns {number}
311
+ */
312
+ export function light_deflection_angle(impact_parameter, mass) {
313
+ const ret = wasm.light_deflection_angle(impact_parameter, mass);
314
+ return ret;
315
+ }
316
+
319
317
  /**
320
318
  * Initialize the WASM module
321
319
  */
@@ -341,12 +339,12 @@ function getArrayU8FromWasm0(ptr, len) {
341
339
  ptr = ptr >>> 0;
342
340
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
343
341
  }
344
- function __wbg_adapter_8(arg0, arg1, arg2) {
345
- wasm.closure38_externref_shim(arg0, arg1, arg2);
342
+ function wasm_bindgen__convert__closures_____invoke__hce8272eee2f071c2(arg0, arg1, arg2) {
343
+ wasm.wasm_bindgen__convert__closures_____invoke__hce8272eee2f071c2(arg0, arg1, arg2);
346
344
  }
347
345
 
348
- function __wbg_adapter_387(arg0, arg1, arg2, arg3) {
349
- wasm.closure28_externref_shim(arg0, arg1, arg2, arg3);
346
+ function wasm_bindgen__convert__closures_____invoke__h4ca4ba3872354ffe(arg0, arg1, arg2, arg3) {
347
+ wasm.wasm_bindgen__convert__closures_____invoke__h4ca4ba3872354ffe(arg0, arg1, arg2, arg3);
350
348
  }
351
349
 
352
350
  const AutoDiffFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -5620,16 +5618,43 @@ async function __wbg_load(module, imports) {
5620
5618
  function __wbg_get_imports() {
5621
5619
  const imports = {};
5622
5620
  imports.wbg = {};
5623
- imports.wbg.__wbg_apply_dc50eb58583d2a57 = function() { return handleError(function (arg0, arg1, arg2) {
5621
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
5622
+ const ret = debugString(arg1);
5623
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5624
+ const len1 = WASM_VECTOR_LEN;
5625
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5626
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5627
+ };
5628
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
5629
+ const ret = typeof(arg0) === 'function';
5630
+ return ret;
5631
+ };
5632
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
5633
+ const ret = arg0 === undefined;
5634
+ return ret;
5635
+ };
5636
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
5637
+ const obj = arg1;
5638
+ const ret = typeof(obj) === 'number' ? obj : undefined;
5639
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
5640
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
5641
+ };
5642
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
5643
+ throw new Error(getStringFromWasm0(arg0, arg1));
5644
+ };
5645
+ imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
5646
+ arg0._wbg_cb_unref();
5647
+ };
5648
+ imports.wbg.__wbg_apply_04097a755e1e4a1e = function() { return handleError(function (arg0, arg1, arg2) {
5624
5649
  const ret = arg0.apply(arg1, arg2);
5625
5650
  return ret;
5626
5651
  }, arguments) };
5627
- imports.wbg.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
5628
- const ret = arg0.call(arg1);
5652
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
5653
+ const ret = arg0.call(arg1, arg2);
5629
5654
  return ret;
5630
5655
  }, arguments) };
5631
- imports.wbg.__wbg_call_a5400b25a865cfd8 = function() { return handleError(function (arg0, arg1, arg2) {
5632
- const ret = arg0.call(arg1, arg2);
5656
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
5657
+ const ret = arg0.call(arg1);
5633
5658
  return ret;
5634
5659
  }, arguments) };
5635
5660
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
@@ -5643,40 +5668,36 @@ function __wbg_get_imports() {
5643
5668
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5644
5669
  }
5645
5670
  };
5646
- imports.wbg.__wbg_from_88bc52ce20ba6318 = function(arg0) {
5671
+ imports.wbg.__wbg_from_a4ad7cbddd0d7135 = function(arg0) {
5647
5672
  const ret = Array.from(arg0);
5648
5673
  return ret;
5649
5674
  };
5650
- imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
5675
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5651
5676
  const ret = arg0[arg1 >>> 0];
5652
5677
  return ret;
5653
5678
  };
5654
- imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
5679
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
5655
5680
  const ret = arg0.length;
5656
5681
  return ret;
5657
5682
  };
5658
- imports.wbg.__wbg_log_6c7b5f4f00b8ce3f = function(arg0) {
5683
+ imports.wbg.__wbg_log_8cec76766b8c0e33 = function(arg0) {
5659
5684
  console.log(arg0);
5660
5685
  };
5661
- imports.wbg.__wbg_log_a7603c93036d4d3e = function(arg0, arg1) {
5686
+ imports.wbg.__wbg_log_bc75dce15192515f = function(arg0, arg1) {
5662
5687
  console.log(getStringFromWasm0(arg0, arg1));
5663
5688
  };
5664
- imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
5689
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
5665
5690
  const ret = new Object();
5666
5691
  return ret;
5667
5692
  };
5668
- imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
5669
- const ret = new Array();
5670
- return ret;
5671
- };
5672
- imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
5693
+ imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
5673
5694
  try {
5674
5695
  var state0 = {a: arg0, b: arg1};
5675
5696
  var cb0 = (arg0, arg1) => {
5676
5697
  const a = state0.a;
5677
5698
  state0.a = 0;
5678
5699
  try {
5679
- return __wbg_adapter_387(a, state0.b, arg0, arg1);
5700
+ return wasm_bindgen__convert__closures_____invoke__h4ca4ba3872354ffe(a, state0.b, arg0, arg1);
5680
5701
  } finally {
5681
5702
  state0.a = a;
5682
5703
  }
@@ -5691,35 +5712,39 @@ function __wbg_get_imports() {
5691
5712
  const ret = new Error();
5692
5713
  return ret;
5693
5714
  };
5694
- imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
5715
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
5716
+ const ret = new Array();
5717
+ return ret;
5718
+ };
5719
+ imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
5695
5720
  const ret = new Function(getStringFromWasm0(arg0, arg1));
5696
5721
  return ret;
5697
5722
  };
5698
- imports.wbg.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
5723
+ imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
5699
5724
  const ret = arg0.push(arg1);
5700
5725
  return ret;
5701
5726
  };
5702
- imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
5703
- queueMicrotask(arg0);
5704
- };
5705
- imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
5727
+ imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
5706
5728
  const ret = arg0.queueMicrotask;
5707
5729
  return ret;
5708
5730
  };
5709
- imports.wbg.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
5731
+ imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
5732
+ queueMicrotask(arg0);
5733
+ };
5734
+ imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
5710
5735
  const ret = Promise.resolve(arg0);
5711
5736
  return ret;
5712
5737
  };
5713
5738
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5714
5739
  arg0[arg1] = arg2;
5715
5740
  };
5716
- imports.wbg.__wbg_set_453345bcda80b89a = function() { return handleError(function (arg0, arg1, arg2) {
5741
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
5742
+ arg0[arg1 >>> 0] = arg2;
5743
+ };
5744
+ imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
5717
5745
  const ret = Reflect.set(arg0, arg1, arg2);
5718
5746
  return ret;
5719
5747
  }, arguments) };
5720
- imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
5721
- arg0[arg1 >>> 0] = arg2;
5722
- };
5723
5748
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
5724
5749
  const ret = arg1.stack;
5725
5750
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -5727,23 +5752,23 @@ function __wbg_get_imports() {
5727
5752
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5728
5753
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5729
5754
  };
5730
- imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
5755
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
5731
5756
  const ret = typeof global === 'undefined' ? null : global;
5732
5757
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5733
5758
  };
5734
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
5759
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
5735
5760
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
5736
5761
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5737
5762
  };
5738
- imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
5763
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
5739
5764
  const ret = typeof self === 'undefined' ? null : self;
5740
5765
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5741
5766
  };
5742
- imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
5767
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
5743
5768
  const ret = typeof window === 'undefined' ? null : window;
5744
5769
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5745
5770
  };
5746
- imports.wbg.__wbg_then_e22500defe16819f = function(arg0, arg1) {
5771
+ imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
5747
5772
  const ret = arg0.then(arg1);
5748
5773
  return ret;
5749
5774
  };
@@ -5763,39 +5788,6 @@ function __wbg_get_imports() {
5763
5788
  const ret = WasmTropicalNumber.__wrap(arg0);
5764
5789
  return ret;
5765
5790
  };
5766
- imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
5767
- const obj = arg0.original;
5768
- if (obj.cnt-- == 1) {
5769
- obj.a = 0;
5770
- return true;
5771
- }
5772
- const ret = false;
5773
- return ret;
5774
- };
5775
- imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
5776
- const ret = debugString(arg1);
5777
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5778
- const len1 = WASM_VECTOR_LEN;
5779
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5780
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5781
- };
5782
- imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
5783
- const ret = typeof(arg0) === 'function';
5784
- return ret;
5785
- };
5786
- imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
5787
- const ret = arg0 === undefined;
5788
- return ret;
5789
- };
5790
- imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
5791
- const obj = arg1;
5792
- const ret = typeof(obj) === 'number' ? obj : undefined;
5793
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
5794
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
5795
- };
5796
- imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
5797
- throw new Error(getStringFromWasm0(arg0, arg1));
5798
- };
5799
5791
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
5800
5792
  // Cast intrinsic for `Ref(String) -> Externref`.
5801
5793
  const ret = getStringFromWasm0(arg0, arg1);
@@ -5808,7 +5800,7 @@ function __wbg_get_imports() {
5808
5800
  };
5809
5801
  imports.wbg.__wbindgen_cast_69f35aa0fcaecc47 = function(arg0, arg1) {
5810
5802
  // Cast intrinsic for `Closure(Closure { dtor_idx: 37, function: Function { arguments: [Externref], shim_idx: 38, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5811
- const ret = makeMutClosure(arg0, arg1, 37, __wbg_adapter_8);
5803
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2186110628e4ed68, wasm_bindgen__convert__closures_____invoke__hce8272eee2f071c2);
5812
5804
  return ret;
5813
5805
  };
5814
5806
  imports.wbg.__wbindgen_cast_b63aeb0d85365734 = function(arg0, arg1) {
@@ -5824,7 +5816,7 @@ function __wbg_get_imports() {
5824
5816
  return ret;
5825
5817
  };
5826
5818
  imports.wbg.__wbindgen_init_externref_table = function() {
5827
- const table = wasm.__wbindgen_export_2;
5819
+ const table = wasm.__wbindgen_externrefs;
5828
5820
  const offset = table.grow(4);
5829
5821
  table.set(0, undefined);
5830
5822
  table.set(offset + 0, undefined);
@@ -5837,10 +5829,6 @@ function __wbg_get_imports() {
5837
5829
  return imports;
5838
5830
  }
5839
5831
 
5840
- function __wbg_init_memory(imports, memory) {
5841
-
5842
- }
5843
-
5844
5832
  function __wbg_finalize_init(instance, module) {
5845
5833
  wasm = instance.exports;
5846
5834
  __wbg_init.__wbindgen_wasm_module = module;
@@ -5868,8 +5856,6 @@ function initSync(module) {
5868
5856
 
5869
5857
  const imports = __wbg_get_imports();
5870
5858
 
5871
- __wbg_init_memory(imports);
5872
-
5873
5859
  if (!(module instanceof WebAssembly.Module)) {
5874
5860
  module = new WebAssembly.Module(module);
5875
5861
  }
@@ -5900,8 +5886,6 @@ async function __wbg_init(module_or_path) {
5900
5886
  module_or_path = fetch(module_or_path);
5901
5887
  }
5902
5888
 
5903
- __wbg_init_memory(imports);
5904
-
5905
5889
  const { instance, module } = await __wbg_load(await module_or_path, imports);
5906
5890
 
5907
5891
  return __wbg_finalize_init(instance, module);
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Amari Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings for Amari mathematical computing library - geometric algebra, tropical algebra, automatic differentiation, fusion systems, and information geometry",
8
- "version": "0.9.7-1",
8
+ "version": "0.9.8",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",