@justinelliottcobb/amari-wasm 0.9.7 → 0.9.9

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.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}"`;
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);
15
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)) {
@@ -108,73 +137,90 @@ function getDataViewMemory0() {
108
137
  return cachedDataViewMemory0;
109
138
  }
110
139
 
111
- function debugString(val) {
112
- // primitive types
113
- const type = typeof val;
114
- if (type == 'number' || type == 'boolean' || val == null) {
115
- return `${val}`;
116
- }
117
- if (type == 'string') {
118
- return `"${val}"`;
119
- }
120
- if (type == 'symbol') {
121
- const description = val.description;
122
- if (description == null) {
123
- return 'Symbol';
124
- } else {
125
- return `Symbol(${description})`;
126
- }
127
- }
128
- if (type == 'function') {
129
- const name = val.name;
130
- if (typeof name == 'string' && name.length > 0) {
131
- return `Function(${name})`;
132
- } else {
133
- return 'Function';
134
- }
135
- }
136
- // objects
137
- if (Array.isArray(val)) {
138
- const length = val.length;
139
- let debug = '[';
140
- if (length > 0) {
141
- debug += debugString(val[0]);
142
- }
143
- for(let i = 1; i < length; i++) {
144
- debug += ', ' + debugString(val[i]);
145
- }
146
- debug += ']';
147
- return debug;
140
+ function isLikeNone(x) {
141
+ return x === undefined || x === null;
142
+ }
143
+
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;
148
156
  }
149
- // Test for built-in
150
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
151
- let className;
152
- if (builtInMatches && builtInMatches.length > 1) {
153
- className = builtInMatches[1];
154
- } else {
155
- // Failed to match the standard '[object ClassName]'
156
- return toString.call(val);
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);
157
177
  }
158
- if (className == 'Object') {
159
- // we're a user defined class or Object
160
- // JSON.stringify avoids problems with cycles, and is generally much
161
- // easier than looping through ownProperties of `val`.
178
+ }
179
+
180
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
181
+ ? { register: () => {}, unregister: () => {} }
182
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
183
+
184
+ function makeMutClosure(arg0, arg1, dtor, f) {
185
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
186
+ const real = (...args) => {
187
+
188
+ // First up with a closure we increment the internal reference
189
+ // count. This ensures that the Rust closure environment won't
190
+ // be deallocated while we're invoking it.
191
+ state.cnt++;
192
+ const a = state.a;
193
+ state.a = 0;
162
194
  try {
163
- return 'Object(' + JSON.stringify(val) + ')';
164
- } catch (_) {
165
- return 'Object';
195
+ return f(a, state.b, ...args);
196
+ } finally {
197
+ state.a = a;
198
+ real._wbg_cb_unref();
166
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);
206
+ }
207
+ };
208
+ CLOSURE_DTORS.register(real, state, state);
209
+ return real;
210
+ }
211
+
212
+ let cachedFloat64ArrayMemory0 = null;
213
+
214
+ function getFloat64ArrayMemory0() {
215
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
216
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
167
217
  }
168
- // errors
169
- if (val instanceof Error) {
170
- return `${val.name}: ${val.message}\n${val.stack}`;
171
- }
172
- // TODO we could test for more things here, like `Set`s and `Map`s.
173
- return className;
218
+ return cachedFloat64ArrayMemory0;
174
219
  }
175
220
 
176
- function isLikeNone(x) {
177
- return x === undefined || x === null;
221
+ function getArrayF64FromWasm0(ptr, len) {
222
+ ptr = ptr >>> 0;
223
+ return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
178
224
  }
179
225
 
180
226
  function _assertClass(instance, klass) {
@@ -200,25 +246,11 @@ function passArray32ToWasm0(arg, malloc) {
200
246
  }
201
247
 
202
248
  function takeFromExternrefTable0(idx) {
203
- const value = wasm.__wbindgen_export_2.get(idx);
249
+ const value = wasm.__wbindgen_externrefs.get(idx);
204
250
  wasm.__externref_table_dealloc(idx);
205
251
  return value;
206
252
  }
207
253
 
208
- let cachedFloat64ArrayMemory0 = null;
209
-
210
- function getFloat64ArrayMemory0() {
211
- if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
212
- cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
213
- }
214
- return cachedFloat64ArrayMemory0;
215
- }
216
-
217
- function getArrayF64FromWasm0(ptr, len) {
218
- ptr = ptr >>> 0;
219
- return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
220
- }
221
-
222
254
  function getArrayU32FromWasm0(ptr, len) {
223
255
  ptr = ptr >>> 0;
224
256
  return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
@@ -230,6 +262,12 @@ export function initEnumerative() {
230
262
  wasm.initEnumerative();
231
263
  }
232
264
 
265
+ function passArrayF64ToWasm0(arg, malloc) {
266
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
267
+ getFloat64ArrayMemory0().set(arg, ptr / 8);
268
+ WASM_VECTOR_LEN = arg.length;
269
+ return ptr;
270
+ }
233
271
  /**
234
272
  * Validate that this module loaded correctly
235
273
  * @returns {boolean}
@@ -239,17 +277,6 @@ export function validate_relativistic_module() {
239
277
  return ret !== 0;
240
278
  }
241
279
 
242
- /**
243
- * Calculate light deflection angle for photon grazing massive object
244
- * @param {number} impact_parameter
245
- * @param {number} mass
246
- * @returns {number}
247
- */
248
- export function light_deflection_angle(impact_parameter, mass) {
249
- const ret = wasm.light_deflection_angle(impact_parameter, mass);
250
- return ret;
251
- }
252
-
253
280
  /**
254
281
  * Convert velocity to Lorentz factor
255
282
  * @param {number} velocity_magnitude
@@ -263,6 +290,17 @@ export function velocity_to_gamma(velocity_magnitude) {
263
290
  return ret[0];
264
291
  }
265
292
 
293
+ /**
294
+ * Calculate light deflection angle for photon grazing massive object
295
+ * @param {number} impact_parameter
296
+ * @param {number} mass
297
+ * @returns {number}
298
+ */
299
+ export function light_deflection_angle(impact_parameter, mass) {
300
+ const ret = wasm.light_deflection_angle(impact_parameter, mass);
301
+ return ret;
302
+ }
303
+
266
304
  /**
267
305
  * Convert Lorentz factor to velocity
268
306
  * @param {number} gamma
@@ -276,12 +314,6 @@ export function gamma_to_velocity(gamma) {
276
314
  return ret[0];
277
315
  }
278
316
 
279
- function passArrayF64ToWasm0(arg, malloc) {
280
- const ptr = malloc(arg.length * 8, 8) >>> 0;
281
- getFloat64ArrayMemory0().set(arg, ptr / 8);
282
- WASM_VECTOR_LEN = arg.length;
283
- return ptr;
284
- }
285
317
  /**
286
318
  * Initialize the WASM module
287
319
  */
@@ -307,6 +339,13 @@ function getArrayU8FromWasm0(ptr, len) {
307
339
  ptr = ptr >>> 0;
308
340
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
309
341
  }
342
+ function wasm_bindgen__convert__closures_____invoke__h79d0d9c6410c14e7(arg0, arg1, arg2) {
343
+ wasm.wasm_bindgen__convert__closures_____invoke__h79d0d9c6410c14e7(arg0, arg1, arg2);
344
+ }
345
+
346
+ function wasm_bindgen__convert__closures_____invoke__h0bb870c532b1b216(arg0, arg1, arg2, arg3) {
347
+ wasm.wasm_bindgen__convert__closures_____invoke__h0bb870c532b1b216(arg0, arg1, arg2, arg3);
348
+ }
310
349
 
311
350
  const AutoDiffFinalization = (typeof FinalizationRegistry === 'undefined')
312
351
  ? { register: () => {}, unregister: () => {} }
@@ -2948,7 +2987,85 @@ export class WasmGeometricNetwork {
2948
2987
  return ret >>> 0;
2949
2988
  }
2950
2989
  }
2951
- if (Symbol.dispose) WasmGeometricNetwork.prototype[Symbol.dispose] = WasmGeometricNetwork.prototype.free;
2990
+ if (Symbol.dispose) WasmGeometricNetwork.prototype[Symbol.dispose] = WasmGeometricNetwork.prototype.free;
2991
+
2992
+ const WasmGpuOptimizerFinalization = (typeof FinalizationRegistry === 'undefined')
2993
+ ? { register: () => {}, unregister: () => {} }
2994
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmgpuoptimizer_free(ptr >>> 0, 1));
2995
+ /**
2996
+ * GPU-accelerated optimization wrapper for WASM
2997
+ */
2998
+ export class WasmGpuOptimizer {
2999
+
3000
+ __destroy_into_raw() {
3001
+ const ptr = this.__wbg_ptr;
3002
+ this.__wbg_ptr = 0;
3003
+ WasmGpuOptimizerFinalization.unregister(this);
3004
+ return ptr;
3005
+ }
3006
+
3007
+ free() {
3008
+ const ptr = this.__destroy_into_raw();
3009
+ wasm.__wbg_wasmgpuoptimizer_free(ptr, 0);
3010
+ }
3011
+ /**
3012
+ * Initialize GPU context for optimization
3013
+ * @returns {Promise<boolean>}
3014
+ */
3015
+ initializeGpu() {
3016
+ const ret = wasm.wasmgpuoptimizer_initializeGpu(this.__wbg_ptr);
3017
+ return ret;
3018
+ }
3019
+ /**
3020
+ * Batch optimization with parallel processing simulation
3021
+ * @param {Float64Array} problems_data
3022
+ * @param {number} problem_size
3023
+ * @param {number} num_problems
3024
+ * @param {number} max_iterations
3025
+ * @param {number} tolerance
3026
+ * @returns {Promise<Float64Array>}
3027
+ */
3028
+ optimizeBatch(problems_data, problem_size, num_problems, max_iterations, tolerance) {
3029
+ const ptr0 = passArrayF64ToWasm0(problems_data, wasm.__wbindgen_malloc);
3030
+ const len0 = WASM_VECTOR_LEN;
3031
+ const ret = wasm.wasmgpuoptimizer_optimizeBatch(this.__wbg_ptr, ptr0, len0, problem_size, num_problems, max_iterations, tolerance);
3032
+ return ret;
3033
+ }
3034
+ /**
3035
+ * Check if GPU acceleration is available
3036
+ * @returns {boolean}
3037
+ */
3038
+ isGpuAvailable() {
3039
+ const ret = wasm.wasmgpuoptimizer_isGpuAvailable(this.__wbg_ptr);
3040
+ return ret !== 0;
3041
+ }
3042
+ /**
3043
+ * Optimize a quadratic function with GPU acceleration
3044
+ * @param {Float64Array} coefficients
3045
+ * @param {Float64Array} initial_point
3046
+ * @param {number} max_iterations
3047
+ * @param {number} tolerance
3048
+ * @returns {Promise<WasmOptimizationResult>}
3049
+ */
3050
+ optimizeQuadraticGpu(coefficients, initial_point, max_iterations, tolerance) {
3051
+ const ptr0 = passArrayF64ToWasm0(coefficients, wasm.__wbindgen_malloc);
3052
+ const len0 = WASM_VECTOR_LEN;
3053
+ const ptr1 = passArrayF64ToWasm0(initial_point, wasm.__wbindgen_malloc);
3054
+ const len1 = WASM_VECTOR_LEN;
3055
+ const ret = wasm.wasmgpuoptimizer_optimizeQuadraticGpu(this.__wbg_ptr, ptr0, len0, ptr1, len1, max_iterations, tolerance);
3056
+ return ret;
3057
+ }
3058
+ /**
3059
+ * Create a new GPU optimizer
3060
+ */
3061
+ constructor() {
3062
+ const ret = wasm.wasmgpuoptimizer_new();
3063
+ this.__wbg_ptr = ret >>> 0;
3064
+ WasmGpuOptimizerFinalization.register(this, this.__wbg_ptr, this);
3065
+ return this;
3066
+ }
3067
+ }
3068
+ if (Symbol.dispose) WasmGpuOptimizer.prototype[Symbol.dispose] = WasmGpuOptimizer.prototype.free;
2952
3069
 
2953
3070
  const WasmGrassmannianFinalization = (typeof FinalizationRegistry === 'undefined')
2954
3071
  ? { register: () => {}, unregister: () => {} }
@@ -3299,6 +3416,108 @@ export class WasmMultiDualNumber {
3299
3416
  }
3300
3417
  if (Symbol.dispose) WasmMultiDualNumber.prototype[Symbol.dispose] = WasmMultiDualNumber.prototype.free;
3301
3418
 
3419
+ const WasmMultiObjectiveOptimizerFinalization = (typeof FinalizationRegistry === 'undefined')
3420
+ ? { register: () => {}, unregister: () => {} }
3421
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmmultiobjectiveoptimizer_free(ptr >>> 0, 1));
3422
+ /**
3423
+ * Simple multi-objective optimizer for WASM
3424
+ */
3425
+ export class WasmMultiObjectiveOptimizer {
3426
+
3427
+ __destroy_into_raw() {
3428
+ const ptr = this.__wbg_ptr;
3429
+ this.__wbg_ptr = 0;
3430
+ WasmMultiObjectiveOptimizerFinalization.unregister(this);
3431
+ return ptr;
3432
+ }
3433
+
3434
+ free() {
3435
+ const ptr = this.__destroy_into_raw();
3436
+ wasm.__wbg_wasmmultiobjectiveoptimizer_free(ptr, 0);
3437
+ }
3438
+ /**
3439
+ * Optimize a simple bi-objective problem
3440
+ * f1 = sum(x_i^2), f2 = sum((x_i - 1)^2)
3441
+ * @param {number} dimension
3442
+ * @param {number} population_size
3443
+ * @param {number} generations
3444
+ * @returns {WasmMultiObjectiveResult}
3445
+ */
3446
+ optimizeBiObjective(dimension, population_size, generations) {
3447
+ const ret = wasm.wasmmultiobjectiveoptimizer_optimizeBiObjective(this.__wbg_ptr, dimension, population_size, generations);
3448
+ if (ret[2]) {
3449
+ throw takeFromExternrefTable0(ret[1]);
3450
+ }
3451
+ return WasmMultiObjectiveResult.__wrap(ret[0]);
3452
+ }
3453
+ /**
3454
+ * Create a new multi-objective optimizer
3455
+ */
3456
+ constructor() {
3457
+ const ret = wasm.wasmgpuoptimizer_new();
3458
+ this.__wbg_ptr = ret >>> 0;
3459
+ WasmMultiObjectiveOptimizerFinalization.register(this, this.__wbg_ptr, this);
3460
+ return this;
3461
+ }
3462
+ }
3463
+ if (Symbol.dispose) WasmMultiObjectiveOptimizer.prototype[Symbol.dispose] = WasmMultiObjectiveOptimizer.prototype.free;
3464
+
3465
+ const WasmMultiObjectiveResultFinalization = (typeof FinalizationRegistry === 'undefined')
3466
+ ? { register: () => {}, unregister: () => {} }
3467
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmmultiobjectiveresult_free(ptr >>> 0, 1));
3468
+ /**
3469
+ * Multi-objective optimization result
3470
+ */
3471
+ export class WasmMultiObjectiveResult {
3472
+
3473
+ static __wrap(ptr) {
3474
+ ptr = ptr >>> 0;
3475
+ const obj = Object.create(WasmMultiObjectiveResult.prototype);
3476
+ obj.__wbg_ptr = ptr;
3477
+ WasmMultiObjectiveResultFinalization.register(obj, obj.__wbg_ptr, obj);
3478
+ return obj;
3479
+ }
3480
+
3481
+ __destroy_into_raw() {
3482
+ const ptr = this.__wbg_ptr;
3483
+ this.__wbg_ptr = 0;
3484
+ WasmMultiObjectiveResultFinalization.unregister(this);
3485
+ return ptr;
3486
+ }
3487
+
3488
+ free() {
3489
+ const ptr = this.__destroy_into_raw();
3490
+ wasm.__wbg_wasmmultiobjectiveresult_free(ptr, 0);
3491
+ }
3492
+ /**
3493
+ * Get number of generations
3494
+ * @returns {number}
3495
+ */
3496
+ get generations() {
3497
+ const ret = wasm.wasmmultiobjectiveresult_generations(this.__wbg_ptr);
3498
+ return ret >>> 0;
3499
+ }
3500
+ /**
3501
+ * Get Pareto front as flattened array
3502
+ * @returns {Float64Array}
3503
+ */
3504
+ get pareto_front() {
3505
+ const ret = wasm.wasmmultiobjectiveresult_pareto_front(this.__wbg_ptr);
3506
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
3507
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
3508
+ return v1;
3509
+ }
3510
+ /**
3511
+ * Check if optimization converged
3512
+ * @returns {boolean}
3513
+ */
3514
+ get converged() {
3515
+ const ret = wasm.wasmmultiobjectiveresult_converged(this.__wbg_ptr);
3516
+ return ret !== 0;
3517
+ }
3518
+ }
3519
+ if (Symbol.dispose) WasmMultiObjectiveResult.prototype[Symbol.dispose] = WasmMultiObjectiveResult.prototype.free;
3520
+
3302
3521
  const WasmMultivectorFinalization = (typeof FinalizationRegistry === 'undefined')
3303
3522
  ? { register: () => {}, unregister: () => {} }
3304
3523
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmmultivector_free(ptr >>> 0, 1));
@@ -3625,6 +3844,126 @@ export class WasmNodeMetadata {
3625
3844
  }
3626
3845
  if (Symbol.dispose) WasmNodeMetadata.prototype[Symbol.dispose] = WasmNodeMetadata.prototype.free;
3627
3846
 
3847
+ const WasmOptimizationResultFinalization = (typeof FinalizationRegistry === 'undefined')
3848
+ ? { register: () => {}, unregister: () => {} }
3849
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmoptimizationresult_free(ptr >>> 0, 1));
3850
+ /**
3851
+ * WASM wrapper for optimization results
3852
+ */
3853
+ export class WasmOptimizationResult {
3854
+
3855
+ static __wrap(ptr) {
3856
+ ptr = ptr >>> 0;
3857
+ const obj = Object.create(WasmOptimizationResult.prototype);
3858
+ obj.__wbg_ptr = ptr;
3859
+ WasmOptimizationResultFinalization.register(obj, obj.__wbg_ptr, obj);
3860
+ return obj;
3861
+ }
3862
+
3863
+ __destroy_into_raw() {
3864
+ const ptr = this.__wbg_ptr;
3865
+ this.__wbg_ptr = 0;
3866
+ WasmOptimizationResultFinalization.unregister(this);
3867
+ return ptr;
3868
+ }
3869
+
3870
+ free() {
3871
+ const ptr = this.__destroy_into_raw();
3872
+ wasm.__wbg_wasmoptimizationresult_free(ptr, 0);
3873
+ }
3874
+ /**
3875
+ * Get number of iterations
3876
+ * @returns {number}
3877
+ */
3878
+ get iterations() {
3879
+ const ret = wasm.wasmoptimizationresult_iterations(this.__wbg_ptr);
3880
+ return ret >>> 0;
3881
+ }
3882
+ /**
3883
+ * Get final objective value
3884
+ * @returns {number}
3885
+ */
3886
+ get objective_value() {
3887
+ const ret = wasm.wasmalphaconnection_getAlpha(this.__wbg_ptr);
3888
+ return ret;
3889
+ }
3890
+ /**
3891
+ * Get solution vector
3892
+ * @returns {Float64Array}
3893
+ */
3894
+ get solution() {
3895
+ const ret = wasm.wasmoptimizationresult_solution(this.__wbg_ptr);
3896
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
3897
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
3898
+ return v1;
3899
+ }
3900
+ /**
3901
+ * Check if optimization converged
3902
+ * @returns {boolean}
3903
+ */
3904
+ get converged() {
3905
+ const ret = wasm.wasmoptimizationresult_converged(this.__wbg_ptr);
3906
+ return ret !== 0;
3907
+ }
3908
+ }
3909
+ if (Symbol.dispose) WasmOptimizationResult.prototype[Symbol.dispose] = WasmOptimizationResult.prototype.free;
3910
+
3911
+ const WasmOptimizationUtilsFinalization = (typeof FinalizationRegistry === 'undefined')
3912
+ ? { register: () => {}, unregister: () => {} }
3913
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmoptimizationutils_free(ptr >>> 0, 1));
3914
+ /**
3915
+ * Utility functions for optimization
3916
+ */
3917
+ export class WasmOptimizationUtils {
3918
+
3919
+ __destroy_into_raw() {
3920
+ const ptr = this.__wbg_ptr;
3921
+ this.__wbg_ptr = 0;
3922
+ WasmOptimizationUtilsFinalization.unregister(this);
3923
+ return ptr;
3924
+ }
3925
+
3926
+ free() {
3927
+ const ptr = this.__destroy_into_raw();
3928
+ wasm.__wbg_wasmoptimizationutils_free(ptr, 0);
3929
+ }
3930
+ /**
3931
+ * Compute numerical gradient
3932
+ * @param {Float64Array} coefficients
3933
+ * @param {Float64Array} point
3934
+ * @param {number} epsilon
3935
+ * @returns {Float64Array}
3936
+ */
3937
+ static numericalGradient(coefficients, point, epsilon) {
3938
+ const ptr0 = passArrayF64ToWasm0(coefficients, wasm.__wbindgen_malloc);
3939
+ const len0 = WASM_VECTOR_LEN;
3940
+ const ptr1 = passArrayF64ToWasm0(point, wasm.__wbindgen_malloc);
3941
+ const len1 = WASM_VECTOR_LEN;
3942
+ const ret = wasm.wasmoptimizationutils_numericalGradient(ptr0, len0, ptr1, len1, epsilon);
3943
+ if (ret[3]) {
3944
+ throw takeFromExternrefTable0(ret[2]);
3945
+ }
3946
+ var v3 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
3947
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
3948
+ return v3;
3949
+ }
3950
+ /**
3951
+ * Check if a point dominates another in multi-objective optimization
3952
+ * @param {Float64Array} objectives1
3953
+ * @param {Float64Array} objectives2
3954
+ * @returns {boolean}
3955
+ */
3956
+ static dominates(objectives1, objectives2) {
3957
+ const ptr0 = passArrayF64ToWasm0(objectives1, wasm.__wbindgen_malloc);
3958
+ const len0 = WASM_VECTOR_LEN;
3959
+ const ptr1 = passArrayF64ToWasm0(objectives2, wasm.__wbindgen_malloc);
3960
+ const len1 = WASM_VECTOR_LEN;
3961
+ const ret = wasm.wasmoptimizationutils_dominates(ptr0, len0, ptr1, len1);
3962
+ return ret !== 0;
3963
+ }
3964
+ }
3965
+ if (Symbol.dispose) WasmOptimizationUtils.prototype[Symbol.dispose] = WasmOptimizationUtils.prototype.free;
3966
+
3628
3967
  const WasmProjectiveSpaceFinalization = (typeof FinalizationRegistry === 'undefined')
3629
3968
  ? { register: () => {}, unregister: () => {} }
3630
3969
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmprojectivespace_free(ptr >>> 0, 1));
@@ -3716,7 +4055,7 @@ export class WasmPropagationAnalysis {
3716
4055
  * @returns {number}
3717
4056
  */
3718
4057
  get convergenceTime() {
3719
- const ret = wasm.wasmpropagationanalysis_convergence_time(this.__wbg_ptr);
4058
+ const ret = wasm.wasmoptimizationresult_iterations(this.__wbg_ptr);
3720
4059
  return ret >>> 0;
3721
4060
  }
3722
4061
  /**
@@ -4228,6 +4567,54 @@ export class WasmSensitivityMap {
4228
4567
  }
4229
4568
  if (Symbol.dispose) WasmSensitivityMap.prototype[Symbol.dispose] = WasmSensitivityMap.prototype.free;
4230
4569
 
4570
+ const WasmSimpleOptimizerFinalization = (typeof FinalizationRegistry === 'undefined')
4571
+ ? { register: () => {}, unregister: () => {} }
4572
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmsimpleoptimizer_free(ptr >>> 0, 1));
4573
+ /**
4574
+ * Simple quadratic optimization problem for WASM demonstration
4575
+ */
4576
+ export class WasmSimpleOptimizer {
4577
+
4578
+ __destroy_into_raw() {
4579
+ const ptr = this.__wbg_ptr;
4580
+ this.__wbg_ptr = 0;
4581
+ WasmSimpleOptimizerFinalization.unregister(this);
4582
+ return ptr;
4583
+ }
4584
+
4585
+ free() {
4586
+ const ptr = this.__destroy_into_raw();
4587
+ wasm.__wbg_wasmsimpleoptimizer_free(ptr, 0);
4588
+ }
4589
+ /**
4590
+ * Optimize a simple quadratic function: minimize sum(c_i * x_i^2)
4591
+ * @param {Float64Array} coefficients
4592
+ * @param {Float64Array} initial_point
4593
+ * @returns {WasmOptimizationResult}
4594
+ */
4595
+ optimizeQuadratic(coefficients, initial_point) {
4596
+ const ptr0 = passArrayF64ToWasm0(coefficients, wasm.__wbindgen_malloc);
4597
+ const len0 = WASM_VECTOR_LEN;
4598
+ const ptr1 = passArrayF64ToWasm0(initial_point, wasm.__wbindgen_malloc);
4599
+ const len1 = WASM_VECTOR_LEN;
4600
+ const ret = wasm.wasmsimpleoptimizer_optimizeQuadratic(this.__wbg_ptr, ptr0, len0, ptr1, len1);
4601
+ if (ret[2]) {
4602
+ throw takeFromExternrefTable0(ret[1]);
4603
+ }
4604
+ return WasmOptimizationResult.__wrap(ret[0]);
4605
+ }
4606
+ /**
4607
+ * Create a new simple optimizer
4608
+ */
4609
+ constructor() {
4610
+ const ret = wasm.wasmgpuoptimizer_new();
4611
+ this.__wbg_ptr = ret >>> 0;
4612
+ WasmSimpleOptimizerFinalization.register(this, this.__wbg_ptr, this);
4613
+ return this;
4614
+ }
4615
+ }
4616
+ if (Symbol.dispose) WasmSimpleOptimizer.prototype[Symbol.dispose] = WasmSimpleOptimizer.prototype.free;
4617
+
4231
4618
  const WasmSpacetimeVectorFinalization = (typeof FinalizationRegistry === 'undefined')
4232
4619
  ? { register: () => {}, unregister: () => {} }
4233
4620
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmspacetimevector_free(ptr >>> 0, 1));
@@ -4883,7 +5270,7 @@ export class WasmTropicalNetwork {
4883
5270
  * @returns {number}
4884
5271
  */
4885
5272
  getSize() {
4886
- const ret = wasm.wasmtropicalnetwork_getSize(this.__wbg_ptr);
5273
+ const ret = wasm.wasmmultiobjectiveresult_generations(this.__wbg_ptr);
4887
5274
  return ret >>> 0;
4888
5275
  }
4889
5276
  /**
@@ -5095,7 +5482,7 @@ export class WasmTropicalPolynomial {
5095
5482
  * @returns {number}
5096
5483
  */
5097
5484
  coefficients_count() {
5098
- const ret = wasm.wasmtropicalpolynomial_coefficients_count(this.__wbg_ptr);
5485
+ const ret = wasm.wasmgpuoptimizer_isGpuAvailable(this.__wbg_ptr);
5099
5486
  return ret >>> 0;
5100
5487
  }
5101
5488
  /**
@@ -5231,10 +5618,45 @@ async function __wbg_load(module, imports) {
5231
5618
  function __wbg_get_imports() {
5232
5619
  const imports = {};
5233
5620
  imports.wbg = {};
5234
- 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) {
5235
5649
  const ret = arg0.apply(arg1, arg2);
5236
5650
  return ret;
5237
5651
  }, arguments) };
5652
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
5653
+ const ret = arg0.call(arg1, arg2);
5654
+ return ret;
5655
+ }, arguments) };
5656
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
5657
+ const ret = arg0.call(arg1);
5658
+ return ret;
5659
+ }, arguments) };
5238
5660
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
5239
5661
  let deferred0_0;
5240
5662
  let deferred0_1;
@@ -5246,50 +5668,83 @@ function __wbg_get_imports() {
5246
5668
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5247
5669
  }
5248
5670
  };
5249
- imports.wbg.__wbg_from_88bc52ce20ba6318 = function(arg0) {
5671
+ imports.wbg.__wbg_from_a4ad7cbddd0d7135 = function(arg0) {
5250
5672
  const ret = Array.from(arg0);
5251
5673
  return ret;
5252
5674
  };
5253
- imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
5675
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5254
5676
  const ret = arg0[arg1 >>> 0];
5255
5677
  return ret;
5256
5678
  };
5257
- imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
5679
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
5258
5680
  const ret = arg0.length;
5259
5681
  return ret;
5260
5682
  };
5261
- imports.wbg.__wbg_log_3cc7740e30649ca2 = function(arg0, arg1) {
5683
+ imports.wbg.__wbg_log_78aa79d721d10880 = function(arg0, arg1) {
5262
5684
  console.log(getStringFromWasm0(arg0, arg1));
5263
5685
  };
5264
- imports.wbg.__wbg_log_6c7b5f4f00b8ce3f = function(arg0) {
5686
+ imports.wbg.__wbg_log_8cec76766b8c0e33 = function(arg0) {
5265
5687
  console.log(arg0);
5266
5688
  };
5267
- imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
5689
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
5268
5690
  const ret = new Object();
5269
5691
  return ret;
5270
5692
  };
5271
- imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
5272
- const ret = new Array();
5273
- return ret;
5693
+ imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
5694
+ try {
5695
+ var state0 = {a: arg0, b: arg1};
5696
+ var cb0 = (arg0, arg1) => {
5697
+ const a = state0.a;
5698
+ state0.a = 0;
5699
+ try {
5700
+ return wasm_bindgen__convert__closures_____invoke__h0bb870c532b1b216(a, state0.b, arg0, arg1);
5701
+ } finally {
5702
+ state0.a = a;
5703
+ }
5704
+ };
5705
+ const ret = new Promise(cb0);
5706
+ return ret;
5707
+ } finally {
5708
+ state0.a = state0.b = 0;
5709
+ }
5274
5710
  };
5275
5711
  imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
5276
5712
  const ret = new Error();
5277
5713
  return ret;
5278
5714
  };
5279
- imports.wbg.__wbg_push_330b2eb93e4e1212 = 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) {
5720
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
5721
+ return ret;
5722
+ };
5723
+ imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
5280
5724
  const ret = arg0.push(arg1);
5281
5725
  return ret;
5282
5726
  };
5727
+ imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
5728
+ const ret = arg0.queueMicrotask;
5729
+ return ret;
5730
+ };
5731
+ imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
5732
+ queueMicrotask(arg0);
5733
+ };
5734
+ imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
5735
+ const ret = Promise.resolve(arg0);
5736
+ return ret;
5737
+ };
5283
5738
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5284
5739
  arg0[arg1] = arg2;
5285
5740
  };
5286
- 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) {
5287
5745
  const ret = Reflect.set(arg0, arg1, arg2);
5288
5746
  return ret;
5289
5747
  }, arguments) };
5290
- imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
5291
- arg0[arg1 >>> 0] = arg2;
5292
- };
5293
5748
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
5294
5749
  const ret = arg1.stack;
5295
5750
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -5297,10 +5752,34 @@ function __wbg_get_imports() {
5297
5752
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5298
5753
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5299
5754
  };
5755
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
5756
+ const ret = typeof global === 'undefined' ? null : global;
5757
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5758
+ };
5759
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
5760
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
5761
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5762
+ };
5763
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
5764
+ const ret = typeof self === 'undefined' ? null : self;
5765
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5766
+ };
5767
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
5768
+ const ret = typeof window === 'undefined' ? null : window;
5769
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5770
+ };
5771
+ imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
5772
+ const ret = arg0.then(arg1);
5773
+ return ret;
5774
+ };
5300
5775
  imports.wbg.__wbg_wasmcommunity_new = function(arg0) {
5301
5776
  const ret = WasmCommunity.__wrap(arg0);
5302
5777
  return ret;
5303
5778
  };
5779
+ imports.wbg.__wbg_wasmoptimizationresult_new = function(arg0) {
5780
+ const ret = WasmOptimizationResult.__wrap(arg0);
5781
+ return ret;
5782
+ };
5304
5783
  imports.wbg.__wbg_wasmspacetimevector_new = function(arg0) {
5305
5784
  const ret = WasmSpacetimeVector.__wrap(arg0);
5306
5785
  return ret;
@@ -5309,22 +5788,6 @@ function __wbg_get_imports() {
5309
5788
  const ret = WasmTropicalNumber.__wrap(arg0);
5310
5789
  return ret;
5311
5790
  };
5312
- imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
5313
- const ret = debugString(arg1);
5314
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5315
- const len1 = WASM_VECTOR_LEN;
5316
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5317
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5318
- };
5319
- imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
5320
- const obj = arg1;
5321
- const ret = typeof(obj) === 'number' ? obj : undefined;
5322
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
5323
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
5324
- };
5325
- imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
5326
- throw new Error(getStringFromWasm0(arg0, arg1));
5327
- };
5328
5791
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
5329
5792
  // Cast intrinsic for `Ref(String) -> Externref`.
5330
5793
  const ret = getStringFromWasm0(arg0, arg1);
@@ -5335,13 +5798,25 @@ function __wbg_get_imports() {
5335
5798
  const ret = BigInt.asUintN(64, arg0);
5336
5799
  return ret;
5337
5800
  };
5801
+ imports.wbg.__wbindgen_cast_69f35aa0fcaecc47 = function(arg0, arg1) {
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`.
5803
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1dd832fb828dedcc, wasm_bindgen__convert__closures_____invoke__h79d0d9c6410c14e7);
5804
+ return ret;
5805
+ };
5806
+ imports.wbg.__wbindgen_cast_b63aeb0d85365734 = function(arg0, arg1) {
5807
+ var v0 = getArrayF64FromWasm0(arg0, arg1).slice();
5808
+ wasm.__wbindgen_free(arg0, arg1 * 8, 8);
5809
+ // Cast intrinsic for `Vector(F64) -> Externref`.
5810
+ const ret = v0;
5811
+ return ret;
5812
+ };
5338
5813
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
5339
5814
  // Cast intrinsic for `F64 -> Externref`.
5340
5815
  const ret = arg0;
5341
5816
  return ret;
5342
5817
  };
5343
5818
  imports.wbg.__wbindgen_init_externref_table = function() {
5344
- const table = wasm.__wbindgen_export_2;
5819
+ const table = wasm.__wbindgen_externrefs;
5345
5820
  const offset = table.grow(4);
5346
5821
  table.set(0, undefined);
5347
5822
  table.set(offset + 0, undefined);
@@ -5354,10 +5829,6 @@ function __wbg_get_imports() {
5354
5829
  return imports;
5355
5830
  }
5356
5831
 
5357
- function __wbg_init_memory(imports, memory) {
5358
-
5359
- }
5360
-
5361
5832
  function __wbg_finalize_init(instance, module) {
5362
5833
  wasm = instance.exports;
5363
5834
  __wbg_init.__wbindgen_wasm_module = module;
@@ -5385,8 +5856,6 @@ function initSync(module) {
5385
5856
 
5386
5857
  const imports = __wbg_get_imports();
5387
5858
 
5388
- __wbg_init_memory(imports);
5389
-
5390
5859
  if (!(module instanceof WebAssembly.Module)) {
5391
5860
  module = new WebAssembly.Module(module);
5392
5861
  }
@@ -5417,8 +5886,6 @@ async function __wbg_init(module_or_path) {
5417
5886
  module_or_path = fetch(module_or_path);
5418
5887
  }
5419
5888
 
5420
- __wbg_init_memory(imports);
5421
-
5422
5889
  const { instance, module } = await __wbg_load(await module_or_path, imports);
5423
5890
 
5424
5891
  return __wbg_finalize_init(instance, module);