@justinelliottcobb/amari-wasm 0.11.0 → 0.12.2
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/README.md +115 -10
- package/amari_wasm.d.ts +257 -113
- package/amari_wasm.js +742 -396
- package/amari_wasm_bg.wasm +0 -0
- package/package.json +2 -2
package/amari_wasm.js
CHANGED
|
@@ -1,71 +1,19 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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);
|
|
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;
|
|
3
|
+
function addToExternrefTable0(obj) {
|
|
4
|
+
const idx = wasm.__externref_table_alloc();
|
|
5
|
+
wasm.__wbindgen_export_2.set(idx, obj);
|
|
6
|
+
return idx;
|
|
66
7
|
}
|
|
67
8
|
|
|
68
|
-
|
|
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);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
69
17
|
|
|
70
18
|
let cachedUint8ArrayMemory0 = null;
|
|
71
19
|
|
|
@@ -76,18 +24,43 @@ function getUint8ArrayMemory0() {
|
|
|
76
24
|
return cachedUint8ArrayMemory0;
|
|
77
25
|
}
|
|
78
26
|
|
|
79
|
-
|
|
27
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
80
28
|
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
};
|
|
29
|
+
if (typeof TextDecoder !== 'undefined') { 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 = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
37
|
+
cachedTextDecoder.decode();
|
|
38
|
+
numBytesDecoded = len;
|
|
89
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
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
51
|
+
|
|
52
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
53
|
+
? function (arg, view) {
|
|
54
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
90
55
|
}
|
|
56
|
+
: function (arg, view) {
|
|
57
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
58
|
+
view.set(buf);
|
|
59
|
+
return {
|
|
60
|
+
read: arg.length,
|
|
61
|
+
written: buf.length
|
|
62
|
+
};
|
|
63
|
+
});
|
|
91
64
|
|
|
92
65
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
93
66
|
|
|
@@ -118,7 +91,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
118
91
|
}
|
|
119
92
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
120
93
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
121
|
-
const ret =
|
|
94
|
+
const ret = encodeString(arg, view);
|
|
122
95
|
|
|
123
96
|
offset += ret.written;
|
|
124
97
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -141,64 +114,15 @@ function isLikeNone(x) {
|
|
|
141
114
|
return x === undefined || x === null;
|
|
142
115
|
}
|
|
143
116
|
|
|
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;
|
|
156
|
-
}
|
|
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);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
let cachedFloat64ArrayMemory0 = null;
|
|
181
|
-
|
|
182
|
-
function getFloat64ArrayMemory0() {
|
|
183
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
184
|
-
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
185
|
-
}
|
|
186
|
-
return cachedFloat64ArrayMemory0;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function getArrayF64FromWasm0(ptr, len) {
|
|
190
|
-
ptr = ptr >>> 0;
|
|
191
|
-
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
117
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
195
118
|
? { register: () => {}, unregister: () => {} }
|
|
196
|
-
: new FinalizationRegistry(state =>
|
|
119
|
+
: new FinalizationRegistry(state => {
|
|
120
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b)
|
|
121
|
+
});
|
|
197
122
|
|
|
198
123
|
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
199
124
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
200
125
|
const real = (...args) => {
|
|
201
|
-
|
|
202
126
|
// First up with a closure we increment the internal reference
|
|
203
127
|
// count. This ensures that the Rust closure environment won't
|
|
204
128
|
// be deallocated while we're invoking it.
|
|
@@ -208,20 +132,97 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
208
132
|
try {
|
|
209
133
|
return f(a, state.b, ...args);
|
|
210
134
|
} finally {
|
|
211
|
-
state.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
state.dtor(state.a, state.b);
|
|
218
|
-
state.a = 0;
|
|
219
|
-
CLOSURE_DTORS.unregister(state);
|
|
135
|
+
if (--state.cnt === 0) {
|
|
136
|
+
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
137
|
+
CLOSURE_DTORS.unregister(state);
|
|
138
|
+
} else {
|
|
139
|
+
state.a = a;
|
|
140
|
+
}
|
|
220
141
|
}
|
|
221
142
|
};
|
|
143
|
+
real.original = state;
|
|
222
144
|
CLOSURE_DTORS.register(real, state, state);
|
|
223
145
|
return real;
|
|
224
146
|
}
|
|
147
|
+
|
|
148
|
+
function debugString(val) {
|
|
149
|
+
// primitive types
|
|
150
|
+
const type = typeof val;
|
|
151
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
152
|
+
return `${val}`;
|
|
153
|
+
}
|
|
154
|
+
if (type == 'string') {
|
|
155
|
+
return `"${val}"`;
|
|
156
|
+
}
|
|
157
|
+
if (type == 'symbol') {
|
|
158
|
+
const description = val.description;
|
|
159
|
+
if (description == null) {
|
|
160
|
+
return 'Symbol';
|
|
161
|
+
} else {
|
|
162
|
+
return `Symbol(${description})`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (type == 'function') {
|
|
166
|
+
const name = val.name;
|
|
167
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
168
|
+
return `Function(${name})`;
|
|
169
|
+
} else {
|
|
170
|
+
return 'Function';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// objects
|
|
174
|
+
if (Array.isArray(val)) {
|
|
175
|
+
const length = val.length;
|
|
176
|
+
let debug = '[';
|
|
177
|
+
if (length > 0) {
|
|
178
|
+
debug += debugString(val[0]);
|
|
179
|
+
}
|
|
180
|
+
for(let i = 1; i < length; i++) {
|
|
181
|
+
debug += ', ' + debugString(val[i]);
|
|
182
|
+
}
|
|
183
|
+
debug += ']';
|
|
184
|
+
return debug;
|
|
185
|
+
}
|
|
186
|
+
// Test for built-in
|
|
187
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
188
|
+
let className;
|
|
189
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
190
|
+
className = builtInMatches[1];
|
|
191
|
+
} else {
|
|
192
|
+
// Failed to match the standard '[object ClassName]'
|
|
193
|
+
return toString.call(val);
|
|
194
|
+
}
|
|
195
|
+
if (className == 'Object') {
|
|
196
|
+
// we're a user defined class or Object
|
|
197
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
198
|
+
// easier than looping through ownProperties of `val`.
|
|
199
|
+
try {
|
|
200
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
201
|
+
} catch (_) {
|
|
202
|
+
return 'Object';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
// errors
|
|
206
|
+
if (val instanceof Error) {
|
|
207
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
208
|
+
}
|
|
209
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
210
|
+
return className;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
214
|
+
|
|
215
|
+
function getFloat64ArrayMemory0() {
|
|
216
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
217
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
218
|
+
}
|
|
219
|
+
return cachedFloat64ArrayMemory0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
223
|
+
ptr = ptr >>> 0;
|
|
224
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
225
|
+
}
|
|
225
226
|
/**
|
|
226
227
|
* Initialize the WASM module
|
|
227
228
|
*/
|
|
@@ -254,7 +255,7 @@ export function light_deflection_angle(impact_parameter, mass) {
|
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
function takeFromExternrefTable0(idx) {
|
|
257
|
-
const value = wasm.
|
|
258
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
258
259
|
wasm.__externref_table_dealloc(idx);
|
|
259
260
|
return value;
|
|
260
261
|
}
|
|
@@ -300,6 +301,13 @@ export function initFusion() {
|
|
|
300
301
|
wasm.initFusion();
|
|
301
302
|
}
|
|
302
303
|
|
|
304
|
+
/**
|
|
305
|
+
* Initialize the holographic memory module
|
|
306
|
+
*/
|
|
307
|
+
export function initHolographic() {
|
|
308
|
+
wasm.initHolographic();
|
|
309
|
+
}
|
|
310
|
+
|
|
303
311
|
/**
|
|
304
312
|
* Integrate a JavaScript function over an interval
|
|
305
313
|
*
|
|
@@ -395,6 +403,11 @@ export function initAutomata() {
|
|
|
395
403
|
wasm.initAutomata();
|
|
396
404
|
}
|
|
397
405
|
|
|
406
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
407
|
+
ptr = ptr >>> 0;
|
|
408
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
409
|
+
}
|
|
410
|
+
|
|
398
411
|
let cachedUint32ArrayMemory0 = null;
|
|
399
412
|
|
|
400
413
|
function getUint32ArrayMemory0() {
|
|
@@ -409,23 +422,18 @@ function getArrayU32FromWasm0(ptr, len) {
|
|
|
409
422
|
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
410
423
|
}
|
|
411
424
|
|
|
412
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
413
|
-
ptr = ptr >>> 0;
|
|
414
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
425
|
function passArray32ToWasm0(arg, malloc) {
|
|
418
426
|
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
419
427
|
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
420
428
|
WASM_VECTOR_LEN = arg.length;
|
|
421
429
|
return ptr;
|
|
422
430
|
}
|
|
423
|
-
function
|
|
424
|
-
wasm.
|
|
431
|
+
function __wbg_adapter_28(arg0, arg1, arg2) {
|
|
432
|
+
wasm.closure58_externref_shim(arg0, arg1, arg2);
|
|
425
433
|
}
|
|
426
434
|
|
|
427
|
-
function
|
|
428
|
-
wasm.
|
|
435
|
+
function __wbg_adapter_496(arg0, arg1, arg2, arg3) {
|
|
436
|
+
wasm.closure49_externref_shim(arg0, arg1, arg2, arg3);
|
|
429
437
|
}
|
|
430
438
|
|
|
431
439
|
/**
|
|
@@ -542,7 +550,6 @@ export class AutoDiff {
|
|
|
542
550
|
return ret[0];
|
|
543
551
|
}
|
|
544
552
|
}
|
|
545
|
-
if (Symbol.dispose) AutoDiff.prototype[Symbol.dispose] = AutoDiff.prototype.free;
|
|
546
553
|
|
|
547
554
|
const AutomataBatchOperationsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
548
555
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -624,7 +631,6 @@ export class AutomataBatchOperations {
|
|
|
624
631
|
return v2;
|
|
625
632
|
}
|
|
626
633
|
}
|
|
627
|
-
if (Symbol.dispose) AutomataBatchOperations.prototype[Symbol.dispose] = AutomataBatchOperations.prototype.free;
|
|
628
634
|
|
|
629
635
|
const AutomataUtilsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
630
636
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -704,7 +710,6 @@ export class AutomataUtils {
|
|
|
704
710
|
return v1;
|
|
705
711
|
}
|
|
706
712
|
}
|
|
707
|
-
if (Symbol.dispose) AutomataUtils.prototype[Symbol.dispose] = AutomataUtils.prototype.free;
|
|
708
713
|
|
|
709
714
|
const BatchOperationsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
710
715
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -765,7 +770,6 @@ export class BatchOperations {
|
|
|
765
770
|
return v3;
|
|
766
771
|
}
|
|
767
772
|
}
|
|
768
|
-
if (Symbol.dispose) BatchOperations.prototype[Symbol.dispose] = BatchOperations.prototype.free;
|
|
769
773
|
|
|
770
774
|
const BatchOpsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
771
775
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -848,7 +852,6 @@ export class BatchOps {
|
|
|
848
852
|
return v3;
|
|
849
853
|
}
|
|
850
854
|
}
|
|
851
|
-
if (Symbol.dispose) BatchOps.prototype[Symbol.dispose] = BatchOps.prototype.free;
|
|
852
855
|
|
|
853
856
|
const EnumerativeBatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
854
857
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -918,7 +921,6 @@ export class EnumerativeBatch {
|
|
|
918
921
|
return ret >>> 0;
|
|
919
922
|
}
|
|
920
923
|
}
|
|
921
|
-
if (Symbol.dispose) EnumerativeBatch.prototype[Symbol.dispose] = EnumerativeBatch.prototype.free;
|
|
922
924
|
|
|
923
925
|
const EnumerativeUtilsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
924
926
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1010,7 +1012,6 @@ export class EnumerativeUtils {
|
|
|
1010
1012
|
return ret[0];
|
|
1011
1013
|
}
|
|
1012
1014
|
}
|
|
1013
|
-
if (Symbol.dispose) EnumerativeUtils.prototype[Symbol.dispose] = EnumerativeUtils.prototype.free;
|
|
1014
1015
|
|
|
1015
1016
|
const FusionBatchOperationsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1016
1017
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1084,6 +1085,8 @@ export class FusionBatchOperations {
|
|
|
1084
1085
|
}
|
|
1085
1086
|
/**
|
|
1086
1087
|
* Batch sensitivity analysis for gradient-based optimization
|
|
1088
|
+
*
|
|
1089
|
+
* Note: Using simplified implementation based on gradient norms
|
|
1087
1090
|
* @param {Float64Array} tdc_batch
|
|
1088
1091
|
* @param {number} batch_size
|
|
1089
1092
|
* @returns {Float64Array}
|
|
@@ -1135,7 +1138,6 @@ export class FusionBatchOperations {
|
|
|
1135
1138
|
return v4;
|
|
1136
1139
|
}
|
|
1137
1140
|
}
|
|
1138
|
-
if (Symbol.dispose) FusionBatchOperations.prototype[Symbol.dispose] = FusionBatchOperations.prototype.free;
|
|
1139
1141
|
|
|
1140
1142
|
const FusionUtilsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1141
1143
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1182,6 +1184,8 @@ export class FusionUtils {
|
|
|
1182
1184
|
}
|
|
1183
1185
|
/**
|
|
1184
1186
|
* Convert softmax probabilities to tropical representation
|
|
1187
|
+
*
|
|
1188
|
+
* Note: Direct conversion helpers are not in v0.12.0, using manual implementation
|
|
1185
1189
|
* @param {Float64Array} probs
|
|
1186
1190
|
* @returns {Float64Array}
|
|
1187
1191
|
*/
|
|
@@ -1195,6 +1199,8 @@ export class FusionUtils {
|
|
|
1195
1199
|
}
|
|
1196
1200
|
/**
|
|
1197
1201
|
* Convert tropical numbers back to softmax probabilities
|
|
1202
|
+
*
|
|
1203
|
+
* Note: Direct conversion helpers are not in v0.12.0, using manual implementation
|
|
1198
1204
|
* @param {Float64Array} tropical_values
|
|
1199
1205
|
* @returns {Float64Array}
|
|
1200
1206
|
*/
|
|
@@ -1207,7 +1213,6 @@ export class FusionUtils {
|
|
|
1207
1213
|
return v2;
|
|
1208
1214
|
}
|
|
1209
1215
|
}
|
|
1210
|
-
if (Symbol.dispose) FusionUtils.prototype[Symbol.dispose] = FusionUtils.prototype.free;
|
|
1211
1216
|
|
|
1212
1217
|
const InfoGeomUtilsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1213
1218
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1322,7 +1327,6 @@ export class InfoGeomUtils {
|
|
|
1322
1327
|
return v2;
|
|
1323
1328
|
}
|
|
1324
1329
|
}
|
|
1325
|
-
if (Symbol.dispose) InfoGeomUtils.prototype[Symbol.dispose] = InfoGeomUtils.prototype.free;
|
|
1326
1330
|
|
|
1327
1331
|
const IntegrationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1328
1332
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1413,7 +1417,6 @@ export class Integration {
|
|
|
1413
1417
|
return ret[0];
|
|
1414
1418
|
}
|
|
1415
1419
|
}
|
|
1416
|
-
if (Symbol.dispose) Integration.prototype[Symbol.dispose] = Integration.prototype.free;
|
|
1417
1420
|
|
|
1418
1421
|
const MLOpsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1419
1422
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1504,7 +1507,6 @@ export class MLOps {
|
|
|
1504
1507
|
return v2;
|
|
1505
1508
|
}
|
|
1506
1509
|
}
|
|
1507
|
-
if (Symbol.dispose) MLOps.prototype[Symbol.dispose] = MLOps.prototype.free;
|
|
1508
1510
|
|
|
1509
1511
|
const NetworkUtilsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1510
1512
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1563,7 +1565,6 @@ export class NetworkUtils {
|
|
|
1563
1565
|
return WasmGeometricNetwork.__wrap(ret[0]);
|
|
1564
1566
|
}
|
|
1565
1567
|
}
|
|
1566
|
-
if (Symbol.dispose) NetworkUtils.prototype[Symbol.dispose] = NetworkUtils.prototype.free;
|
|
1567
1568
|
|
|
1568
1569
|
const NumericalDerivativeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1569
1570
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1722,7 +1723,6 @@ export class NumericalDerivative {
|
|
|
1722
1723
|
return ret[0];
|
|
1723
1724
|
}
|
|
1724
1725
|
}
|
|
1725
|
-
if (Symbol.dispose) NumericalDerivative.prototype[Symbol.dispose] = NumericalDerivative.prototype.free;
|
|
1726
1726
|
|
|
1727
1727
|
const PerformanceOperationsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1728
1728
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1804,7 +1804,6 @@ export class PerformanceOperations {
|
|
|
1804
1804
|
return v3;
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
|
-
if (Symbol.dispose) PerformanceOperations.prototype[Symbol.dispose] = PerformanceOperations.prototype.free;
|
|
1808
1807
|
|
|
1809
1808
|
const RiemannianManifoldFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1810
1809
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2027,7 +2026,6 @@ export class RiemannianManifold {
|
|
|
2027
2026
|
return RiemannianManifold.__wrap(ret[0]);
|
|
2028
2027
|
}
|
|
2029
2028
|
}
|
|
2030
|
-
if (Symbol.dispose) RiemannianManifold.prototype[Symbol.dispose] = RiemannianManifold.prototype.free;
|
|
2031
2029
|
|
|
2032
2030
|
const ScalarFieldFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2033
2031
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2156,7 +2154,6 @@ export class ScalarField {
|
|
|
2156
2154
|
return ret[0];
|
|
2157
2155
|
}
|
|
2158
2156
|
}
|
|
2159
|
-
if (Symbol.dispose) ScalarField.prototype[Symbol.dispose] = ScalarField.prototype.free;
|
|
2160
2157
|
|
|
2161
2158
|
const TropicalBatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2162
2159
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2234,7 +2231,6 @@ export class TropicalBatch {
|
|
|
2234
2231
|
return ret;
|
|
2235
2232
|
}
|
|
2236
2233
|
}
|
|
2237
|
-
if (Symbol.dispose) TropicalBatch.prototype[Symbol.dispose] = TropicalBatch.prototype.free;
|
|
2238
2234
|
|
|
2239
2235
|
const TropicalMLOpsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2240
2236
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2298,7 +2294,6 @@ export class TropicalMLOps {
|
|
|
2298
2294
|
return ret[0];
|
|
2299
2295
|
}
|
|
2300
2296
|
}
|
|
2301
|
-
if (Symbol.dispose) TropicalMLOps.prototype[Symbol.dispose] = TropicalMLOps.prototype.free;
|
|
2302
2297
|
|
|
2303
2298
|
const VectorFieldFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2304
2299
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2401,7 +2396,6 @@ export class VectorField {
|
|
|
2401
2396
|
return v2;
|
|
2402
2397
|
}
|
|
2403
2398
|
}
|
|
2404
|
-
if (Symbol.dispose) VectorField.prototype[Symbol.dispose] = VectorField.prototype.free;
|
|
2405
2399
|
|
|
2406
2400
|
const WasmAlphaConnectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2407
2401
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2468,7 +2462,6 @@ export class WasmAlphaConnection {
|
|
|
2468
2462
|
return ret;
|
|
2469
2463
|
}
|
|
2470
2464
|
}
|
|
2471
|
-
if (Symbol.dispose) WasmAlphaConnection.prototype[Symbol.dispose] = WasmAlphaConnection.prototype.free;
|
|
2472
2465
|
|
|
2473
2466
|
const WasmChowClassFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2474
2467
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2578,40 +2571,100 @@ export class WasmChowClass {
|
|
|
2578
2571
|
return WasmChowClass.__wrap(ret);
|
|
2579
2572
|
}
|
|
2580
2573
|
}
|
|
2581
|
-
if (Symbol.dispose) WasmChowClass.prototype[Symbol.dispose] = WasmChowClass.prototype.free;
|
|
2582
2574
|
|
|
2583
|
-
const
|
|
2575
|
+
const WasmCleanupResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2584
2576
|
? { register: () => {}, unregister: () => {} }
|
|
2585
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
2577
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmcleanupresult_free(ptr >>> 0, 1));
|
|
2586
2578
|
/**
|
|
2587
|
-
* WASM wrapper for
|
|
2579
|
+
* WASM wrapper for cleanup results
|
|
2588
2580
|
*/
|
|
2589
|
-
export class
|
|
2581
|
+
export class WasmCleanupResult {
|
|
2590
2582
|
|
|
2591
2583
|
static __wrap(ptr) {
|
|
2592
2584
|
ptr = ptr >>> 0;
|
|
2593
|
-
const obj = Object.create(
|
|
2585
|
+
const obj = Object.create(WasmCleanupResult.prototype);
|
|
2594
2586
|
obj.__wbg_ptr = ptr;
|
|
2595
|
-
|
|
2587
|
+
WasmCleanupResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2596
2588
|
return obj;
|
|
2597
2589
|
}
|
|
2598
2590
|
|
|
2599
2591
|
__destroy_into_raw() {
|
|
2600
2592
|
const ptr = this.__wbg_ptr;
|
|
2601
2593
|
this.__wbg_ptr = 0;
|
|
2602
|
-
|
|
2594
|
+
WasmCleanupResultFinalization.unregister(this);
|
|
2603
2595
|
return ptr;
|
|
2604
2596
|
}
|
|
2605
2597
|
|
|
2606
2598
|
free() {
|
|
2607
2599
|
const ptr = this.__destroy_into_raw();
|
|
2608
|
-
wasm.
|
|
2600
|
+
wasm.__wbg_wasmcleanupresult_free(ptr, 0);
|
|
2609
2601
|
}
|
|
2610
2602
|
/**
|
|
2611
|
-
* Get
|
|
2612
|
-
* @returns {
|
|
2603
|
+
* Get the cleaned (denoised) value
|
|
2604
|
+
* @returns {WasmTropicalDualClifford}
|
|
2613
2605
|
*/
|
|
2614
|
-
|
|
2606
|
+
getCleaned() {
|
|
2607
|
+
const ret = wasm.wasmcleanupresult_getCleaned(this.__wbg_ptr);
|
|
2608
|
+
return WasmTropicalDualClifford.__wrap(ret);
|
|
2609
|
+
}
|
|
2610
|
+
/**
|
|
2611
|
+
* Check if the cleanup converged
|
|
2612
|
+
* @returns {boolean}
|
|
2613
|
+
*/
|
|
2614
|
+
didConverge() {
|
|
2615
|
+
const ret = wasm.wasmcleanupresult_didConverge(this.__wbg_ptr);
|
|
2616
|
+
return ret !== 0;
|
|
2617
|
+
}
|
|
2618
|
+
/**
|
|
2619
|
+
* Get the number of iterations used
|
|
2620
|
+
* @returns {number}
|
|
2621
|
+
*/
|
|
2622
|
+
getIterations() {
|
|
2623
|
+
const ret = wasm.wasmcleanupresult_getIterations(this.__wbg_ptr);
|
|
2624
|
+
return ret >>> 0;
|
|
2625
|
+
}
|
|
2626
|
+
/**
|
|
2627
|
+
* Get the index of the best matching codebook item
|
|
2628
|
+
* @returns {number}
|
|
2629
|
+
*/
|
|
2630
|
+
getBestMatchIndex() {
|
|
2631
|
+
const ret = wasm.wasmcleanupresult_getBestMatchIndex(this.__wbg_ptr);
|
|
2632
|
+
return ret >>> 0;
|
|
2633
|
+
}
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
const WasmCommunityFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2637
|
+
? { register: () => {}, unregister: () => {} }
|
|
2638
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmcommunity_free(ptr >>> 0, 1));
|
|
2639
|
+
/**
|
|
2640
|
+
* WASM wrapper for community detection results
|
|
2641
|
+
*/
|
|
2642
|
+
export class WasmCommunity {
|
|
2643
|
+
|
|
2644
|
+
static __wrap(ptr) {
|
|
2645
|
+
ptr = ptr >>> 0;
|
|
2646
|
+
const obj = Object.create(WasmCommunity.prototype);
|
|
2647
|
+
obj.__wbg_ptr = ptr;
|
|
2648
|
+
WasmCommunityFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2649
|
+
return obj;
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
__destroy_into_raw() {
|
|
2653
|
+
const ptr = this.__wbg_ptr;
|
|
2654
|
+
this.__wbg_ptr = 0;
|
|
2655
|
+
WasmCommunityFinalization.unregister(this);
|
|
2656
|
+
return ptr;
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
free() {
|
|
2660
|
+
const ptr = this.__destroy_into_raw();
|
|
2661
|
+
wasm.__wbg_wasmcommunity_free(ptr, 0);
|
|
2662
|
+
}
|
|
2663
|
+
/**
|
|
2664
|
+
* Get cohesion score
|
|
2665
|
+
* @returns {number}
|
|
2666
|
+
*/
|
|
2667
|
+
get cohesionScore() {
|
|
2615
2668
|
const ret = wasm.wasmalphaconnection_getAlpha(this.__wbg_ptr);
|
|
2616
2669
|
return ret;
|
|
2617
2670
|
}
|
|
@@ -2636,7 +2689,6 @@ export class WasmCommunity {
|
|
|
2636
2689
|
return v1;
|
|
2637
2690
|
}
|
|
2638
2691
|
}
|
|
2639
|
-
if (Symbol.dispose) WasmCommunity.prototype[Symbol.dispose] = WasmCommunity.prototype.free;
|
|
2640
2692
|
|
|
2641
2693
|
const WasmCountingMeasureFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2642
2694
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2690,7 +2742,6 @@ export class WasmCountingMeasure {
|
|
|
2690
2742
|
return this;
|
|
2691
2743
|
}
|
|
2692
2744
|
}
|
|
2693
|
-
if (Symbol.dispose) WasmCountingMeasure.prototype[Symbol.dispose] = WasmCountingMeasure.prototype.free;
|
|
2694
2745
|
|
|
2695
2746
|
const WasmDualNumberFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2696
2747
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2872,6 +2923,8 @@ export class WasmDualNumber {
|
|
|
2872
2923
|
}
|
|
2873
2924
|
/**
|
|
2874
2925
|
* ReLU activation function
|
|
2926
|
+
*
|
|
2927
|
+
* Note: Manual implementation as relu() is not in v0.12.0 DualNumber API
|
|
2875
2928
|
* @returns {WasmDualNumber}
|
|
2876
2929
|
*/
|
|
2877
2930
|
relu() {
|
|
@@ -2940,6 +2993,9 @@ export class WasmDualNumber {
|
|
|
2940
2993
|
}
|
|
2941
2994
|
/**
|
|
2942
2995
|
* Softplus activation function
|
|
2996
|
+
*
|
|
2997
|
+
* Note: Manual implementation as softplus() is not in v0.12.0 DualNumber API
|
|
2998
|
+
* softplus(x) = ln(1 + exp(x))
|
|
2943
2999
|
* @returns {WasmDualNumber}
|
|
2944
3000
|
*/
|
|
2945
3001
|
softplus() {
|
|
@@ -2956,7 +3012,6 @@ export class WasmDualNumber {
|
|
|
2956
3012
|
return WasmDualNumber.__wrap(ret);
|
|
2957
3013
|
}
|
|
2958
3014
|
}
|
|
2959
|
-
if (Symbol.dispose) WasmDualNumber.prototype[Symbol.dispose] = WasmDualNumber.prototype.free;
|
|
2960
3015
|
|
|
2961
3016
|
const WasmDuallyFlatManifoldFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2962
3017
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3065,7 +3120,6 @@ export class WasmDuallyFlatManifold {
|
|
|
3065
3120
|
return this;
|
|
3066
3121
|
}
|
|
3067
3122
|
}
|
|
3068
|
-
if (Symbol.dispose) WasmDuallyFlatManifold.prototype[Symbol.dispose] = WasmDuallyFlatManifold.prototype.free;
|
|
3069
3123
|
|
|
3070
3124
|
const WasmEvaluationResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3071
3125
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3138,7 +3192,6 @@ export class WasmEvaluationResult {
|
|
|
3138
3192
|
return takeFromExternrefTable0(ret[0]);
|
|
3139
3193
|
}
|
|
3140
3194
|
}
|
|
3141
|
-
if (Symbol.dispose) WasmEvaluationResult.prototype[Symbol.dispose] = WasmEvaluationResult.prototype.free;
|
|
3142
3195
|
|
|
3143
3196
|
const WasmFisherInformationMatrixFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3144
3197
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3194,7 +3247,6 @@ export class WasmFisherInformationMatrix {
|
|
|
3194
3247
|
return ret !== 0;
|
|
3195
3248
|
}
|
|
3196
3249
|
}
|
|
3197
|
-
if (Symbol.dispose) WasmFisherInformationMatrix.prototype[Symbol.dispose] = WasmFisherInformationMatrix.prototype.free;
|
|
3198
3250
|
|
|
3199
3251
|
const WasmFisherMeasureFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3200
3252
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3271,7 +3323,6 @@ export class WasmFisherMeasure {
|
|
|
3271
3323
|
return ret[0];
|
|
3272
3324
|
}
|
|
3273
3325
|
}
|
|
3274
|
-
if (Symbol.dispose) WasmFisherMeasure.prototype[Symbol.dispose] = WasmFisherMeasure.prototype.free;
|
|
3275
3326
|
|
|
3276
3327
|
const WasmFourVelocityFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3277
3328
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3371,7 +3422,6 @@ export class WasmFourVelocity {
|
|
|
3371
3422
|
}
|
|
3372
3423
|
}
|
|
3373
3424
|
}
|
|
3374
|
-
if (Symbol.dispose) WasmFourVelocity.prototype[Symbol.dispose] = WasmFourVelocity.prototype.free;
|
|
3375
3425
|
|
|
3376
3426
|
const WasmGeodesicIntegratorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3377
3427
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3426,7 +3476,6 @@ export class WasmGeodesicIntegrator {
|
|
|
3426
3476
|
return WasmGeodesicIntegrator.__wrap(ret);
|
|
3427
3477
|
}
|
|
3428
3478
|
}
|
|
3429
|
-
if (Symbol.dispose) WasmGeodesicIntegrator.prototype[Symbol.dispose] = WasmGeodesicIntegrator.prototype.free;
|
|
3430
3479
|
|
|
3431
3480
|
const WasmGeometricCAFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3432
3481
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3603,7 +3652,6 @@ export class WasmGeometricCA {
|
|
|
3603
3652
|
}
|
|
3604
3653
|
}
|
|
3605
3654
|
}
|
|
3606
|
-
if (Symbol.dispose) WasmGeometricCA.prototype[Symbol.dispose] = WasmGeometricCA.prototype.free;
|
|
3607
3655
|
|
|
3608
3656
|
const WasmGeometricEdgeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3609
3657
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3661,7 +3709,6 @@ export class WasmGeometricEdge {
|
|
|
3661
3709
|
return ret;
|
|
3662
3710
|
}
|
|
3663
3711
|
}
|
|
3664
|
-
if (Symbol.dispose) WasmGeometricEdge.prototype[Symbol.dispose] = WasmGeometricEdge.prototype.free;
|
|
3665
3712
|
|
|
3666
3713
|
const WasmGeometricNetworkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3667
3714
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3931,7 +3978,6 @@ export class WasmGeometricNetwork {
|
|
|
3931
3978
|
return ret >>> 0;
|
|
3932
3979
|
}
|
|
3933
3980
|
}
|
|
3934
|
-
if (Symbol.dispose) WasmGeometricNetwork.prototype[Symbol.dispose] = WasmGeometricNetwork.prototype.free;
|
|
3935
3981
|
|
|
3936
3982
|
const WasmGpuOptimizerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3937
3983
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4009,7 +4055,6 @@ export class WasmGpuOptimizer {
|
|
|
4009
4055
|
return this;
|
|
4010
4056
|
}
|
|
4011
4057
|
}
|
|
4012
|
-
if (Symbol.dispose) WasmGpuOptimizer.prototype[Symbol.dispose] = WasmGpuOptimizer.prototype.free;
|
|
4013
4058
|
|
|
4014
4059
|
const WasmGrassmannianFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4015
4060
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4063,7 +4108,163 @@ export class WasmGrassmannian {
|
|
|
4063
4108
|
return this;
|
|
4064
4109
|
}
|
|
4065
4110
|
}
|
|
4066
|
-
|
|
4111
|
+
|
|
4112
|
+
const WasmHolographicMemoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4113
|
+
? { register: () => {}, unregister: () => {} }
|
|
4114
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmholographicmemory_free(ptr >>> 0, 1));
|
|
4115
|
+
/**
|
|
4116
|
+
* WASM wrapper for HolographicMemory
|
|
4117
|
+
*/
|
|
4118
|
+
export class WasmHolographicMemory {
|
|
4119
|
+
|
|
4120
|
+
static __wrap(ptr) {
|
|
4121
|
+
ptr = ptr >>> 0;
|
|
4122
|
+
const obj = Object.create(WasmHolographicMemory.prototype);
|
|
4123
|
+
obj.__wbg_ptr = ptr;
|
|
4124
|
+
WasmHolographicMemoryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
4125
|
+
return obj;
|
|
4126
|
+
}
|
|
4127
|
+
|
|
4128
|
+
__destroy_into_raw() {
|
|
4129
|
+
const ptr = this.__wbg_ptr;
|
|
4130
|
+
this.__wbg_ptr = 0;
|
|
4131
|
+
WasmHolographicMemoryFinalization.unregister(this);
|
|
4132
|
+
return ptr;
|
|
4133
|
+
}
|
|
4134
|
+
|
|
4135
|
+
free() {
|
|
4136
|
+
const ptr = this.__destroy_into_raw();
|
|
4137
|
+
wasm.__wbg_wasmholographicmemory_free(ptr, 0);
|
|
4138
|
+
}
|
|
4139
|
+
/**
|
|
4140
|
+
* Get the number of stored items
|
|
4141
|
+
* @returns {number}
|
|
4142
|
+
*/
|
|
4143
|
+
itemCount() {
|
|
4144
|
+
const ret = wasm.wasmholographicmemory_itemCount(this.__wbg_ptr);
|
|
4145
|
+
return ret >>> 0;
|
|
4146
|
+
}
|
|
4147
|
+
/**
|
|
4148
|
+
* Batch store multiple key-value pairs
|
|
4149
|
+
* @param {Float64Array} keys
|
|
4150
|
+
* @param {Float64Array} values
|
|
4151
|
+
*/
|
|
4152
|
+
storeBatch(keys, values) {
|
|
4153
|
+
const ptr0 = passArrayF64ToWasm0(keys, wasm.__wbindgen_malloc);
|
|
4154
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4155
|
+
const ptr1 = passArrayF64ToWasm0(values, wasm.__wbindgen_malloc);
|
|
4156
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4157
|
+
const ret = wasm.wasmholographicmemory_storeBatch(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
4158
|
+
if (ret[1]) {
|
|
4159
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4162
|
+
/**
|
|
4163
|
+
* Get the estimated SNR (signal-to-noise ratio)
|
|
4164
|
+
* @returns {number}
|
|
4165
|
+
*/
|
|
4166
|
+
estimatedSnr() {
|
|
4167
|
+
const ret = wasm.wasmholographicmemory_estimatedSnr(this.__wbg_ptr);
|
|
4168
|
+
return ret;
|
|
4169
|
+
}
|
|
4170
|
+
/**
|
|
4171
|
+
* Check if memory is near capacity
|
|
4172
|
+
* @returns {boolean}
|
|
4173
|
+
*/
|
|
4174
|
+
isNearCapacity() {
|
|
4175
|
+
const ret = wasm.wasmholographicmemory_isNearCapacity(this.__wbg_ptr);
|
|
4176
|
+
return ret !== 0;
|
|
4177
|
+
}
|
|
4178
|
+
/**
|
|
4179
|
+
* Check if memory probably contains a key
|
|
4180
|
+
* @param {WasmTropicalDualClifford} key
|
|
4181
|
+
* @returns {boolean}
|
|
4182
|
+
*/
|
|
4183
|
+
probablyContains(key) {
|
|
4184
|
+
_assertClass(key, WasmTropicalDualClifford);
|
|
4185
|
+
const ret = wasm.wasmholographicmemory_probablyContains(this.__wbg_ptr, key.__wbg_ptr);
|
|
4186
|
+
return ret !== 0;
|
|
4187
|
+
}
|
|
4188
|
+
/**
|
|
4189
|
+
* Create with key tracking enabled (for attribution)
|
|
4190
|
+
* @returns {WasmHolographicMemory}
|
|
4191
|
+
*/
|
|
4192
|
+
static withKeyTracking() {
|
|
4193
|
+
const ret = wasm.wasmholographicmemory_withKeyTracking();
|
|
4194
|
+
return WasmHolographicMemory.__wrap(ret);
|
|
4195
|
+
}
|
|
4196
|
+
/**
|
|
4197
|
+
* Get the theoretical capacity
|
|
4198
|
+
* @returns {number}
|
|
4199
|
+
*/
|
|
4200
|
+
theoreticalCapacity() {
|
|
4201
|
+
const ret = wasm.wasmholographicmemory_theoreticalCapacity(this.__wbg_ptr);
|
|
4202
|
+
return ret >>> 0;
|
|
4203
|
+
}
|
|
4204
|
+
/**
|
|
4205
|
+
* Retrieve with custom temperature
|
|
4206
|
+
* @param {WasmTropicalDualClifford} key
|
|
4207
|
+
* @param {number} beta
|
|
4208
|
+
* @returns {WasmRetrievalResult}
|
|
4209
|
+
*/
|
|
4210
|
+
retrieveAtTemperature(key, beta) {
|
|
4211
|
+
_assertClass(key, WasmTropicalDualClifford);
|
|
4212
|
+
const ret = wasm.wasmholographicmemory_retrieveAtTemperature(this.__wbg_ptr, key.__wbg_ptr, beta);
|
|
4213
|
+
return WasmRetrievalResult.__wrap(ret);
|
|
4214
|
+
}
|
|
4215
|
+
/**
|
|
4216
|
+
* Create with custom bundle temperature
|
|
4217
|
+
* @param {number} beta
|
|
4218
|
+
* @returns {WasmHolographicMemory}
|
|
4219
|
+
*/
|
|
4220
|
+
static withBundleTemperature(beta) {
|
|
4221
|
+
const ret = wasm.wasmholographicmemory_withBundleTemperature(beta);
|
|
4222
|
+
return WasmHolographicMemory.__wrap(ret);
|
|
4223
|
+
}
|
|
4224
|
+
/**
|
|
4225
|
+
* Create a new holographic memory with default settings
|
|
4226
|
+
*/
|
|
4227
|
+
constructor() {
|
|
4228
|
+
const ret = wasm.wasmholographicmemory_new();
|
|
4229
|
+
this.__wbg_ptr = ret >>> 0;
|
|
4230
|
+
WasmHolographicMemoryFinalization.register(this, this.__wbg_ptr, this);
|
|
4231
|
+
return this;
|
|
4232
|
+
}
|
|
4233
|
+
/**
|
|
4234
|
+
* Clear all stored items
|
|
4235
|
+
*/
|
|
4236
|
+
clear() {
|
|
4237
|
+
wasm.wasmholographicmemory_clear(this.__wbg_ptr);
|
|
4238
|
+
}
|
|
4239
|
+
/**
|
|
4240
|
+
* Merge another memory into this one
|
|
4241
|
+
* @param {WasmHolographicMemory} other
|
|
4242
|
+
*/
|
|
4243
|
+
merge(other) {
|
|
4244
|
+
_assertClass(other, WasmHolographicMemory);
|
|
4245
|
+
wasm.wasmholographicmemory_merge(this.__wbg_ptr, other.__wbg_ptr);
|
|
4246
|
+
}
|
|
4247
|
+
/**
|
|
4248
|
+
* Store a key-value pair in memory
|
|
4249
|
+
* @param {WasmTropicalDualClifford} key
|
|
4250
|
+
* @param {WasmTropicalDualClifford} value
|
|
4251
|
+
*/
|
|
4252
|
+
store(key, value) {
|
|
4253
|
+
_assertClass(key, WasmTropicalDualClifford);
|
|
4254
|
+
_assertClass(value, WasmTropicalDualClifford);
|
|
4255
|
+
wasm.wasmholographicmemory_store(this.__wbg_ptr, key.__wbg_ptr, value.__wbg_ptr);
|
|
4256
|
+
}
|
|
4257
|
+
/**
|
|
4258
|
+
* Retrieve a value by key
|
|
4259
|
+
* @param {WasmTropicalDualClifford} key
|
|
4260
|
+
* @returns {WasmRetrievalResult}
|
|
4261
|
+
*/
|
|
4262
|
+
retrieve(key) {
|
|
4263
|
+
_assertClass(key, WasmTropicalDualClifford);
|
|
4264
|
+
const ret = wasm.wasmholographicmemory_retrieve(this.__wbg_ptr, key.__wbg_ptr);
|
|
4265
|
+
return WasmRetrievalResult.__wrap(ret);
|
|
4266
|
+
}
|
|
4267
|
+
}
|
|
4067
4268
|
|
|
4068
4269
|
const WasmInverseCADesignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4069
4270
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4137,7 +4338,6 @@ export class WasmInverseCADesigner {
|
|
|
4137
4338
|
return v1;
|
|
4138
4339
|
}
|
|
4139
4340
|
}
|
|
4140
|
-
if (Symbol.dispose) WasmInverseCADesigner.prototype[Symbol.dispose] = WasmInverseCADesigner.prototype.free;
|
|
4141
4341
|
|
|
4142
4342
|
const WasmLebesgueMeasureFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4143
4343
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4220,7 +4420,6 @@ export class WasmLebesgueMeasure {
|
|
|
4220
4420
|
return this;
|
|
4221
4421
|
}
|
|
4222
4422
|
}
|
|
4223
|
-
if (Symbol.dispose) WasmLebesgueMeasure.prototype[Symbol.dispose] = WasmLebesgueMeasure.prototype.free;
|
|
4224
4423
|
|
|
4225
4424
|
const WasmModuliSpaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4226
4425
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4302,7 +4501,6 @@ export class WasmModuliSpace {
|
|
|
4302
4501
|
return WasmModuliSpace.__wrap(ret);
|
|
4303
4502
|
}
|
|
4304
4503
|
}
|
|
4305
|
-
if (Symbol.dispose) WasmModuliSpace.prototype[Symbol.dispose] = WasmModuliSpace.prototype.free;
|
|
4306
4504
|
|
|
4307
4505
|
const WasmMultiDualNumberFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4308
4506
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4441,7 +4639,6 @@ export class WasmMultiDualNumber {
|
|
|
4441
4639
|
return WasmMultiDualNumber.__wrap(ret);
|
|
4442
4640
|
}
|
|
4443
4641
|
}
|
|
4444
|
-
if (Symbol.dispose) WasmMultiDualNumber.prototype[Symbol.dispose] = WasmMultiDualNumber.prototype.free;
|
|
4445
4642
|
|
|
4446
4643
|
const WasmMultiObjectiveOptimizerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4447
4644
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4487,7 +4684,6 @@ export class WasmMultiObjectiveOptimizer {
|
|
|
4487
4684
|
return this;
|
|
4488
4685
|
}
|
|
4489
4686
|
}
|
|
4490
|
-
if (Symbol.dispose) WasmMultiObjectiveOptimizer.prototype[Symbol.dispose] = WasmMultiObjectiveOptimizer.prototype.free;
|
|
4491
4687
|
|
|
4492
4688
|
const WasmMultiObjectiveResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4493
4689
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4543,7 +4739,6 @@ export class WasmMultiObjectiveResult {
|
|
|
4543
4739
|
return ret !== 0;
|
|
4544
4740
|
}
|
|
4545
4741
|
}
|
|
4546
|
-
if (Symbol.dispose) WasmMultiObjectiveResult.prototype[Symbol.dispose] = WasmMultiObjectiveResult.prototype.free;
|
|
4547
4742
|
|
|
4548
4743
|
const WasmMultivectorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4549
4744
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4776,7 +4971,6 @@ export class WasmMultivector {
|
|
|
4776
4971
|
return WasmMultivector.__wrap(ret[0]);
|
|
4777
4972
|
}
|
|
4778
4973
|
}
|
|
4779
|
-
if (Symbol.dispose) WasmMultivector.prototype[Symbol.dispose] = WasmMultivector.prototype.free;
|
|
4780
4974
|
|
|
4781
4975
|
const WasmNodeMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4782
4976
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4869,7 +5063,6 @@ export class WasmNodeMetadata {
|
|
|
4869
5063
|
wasm.wasmnodemetadata_set_label(this.__wbg_ptr, ptr0, len0);
|
|
4870
5064
|
}
|
|
4871
5065
|
}
|
|
4872
|
-
if (Symbol.dispose) WasmNodeMetadata.prototype[Symbol.dispose] = WasmNodeMetadata.prototype.free;
|
|
4873
5066
|
|
|
4874
5067
|
const WasmOptimizationResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4875
5068
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4933,7 +5126,6 @@ export class WasmOptimizationResult {
|
|
|
4933
5126
|
return ret !== 0;
|
|
4934
5127
|
}
|
|
4935
5128
|
}
|
|
4936
|
-
if (Symbol.dispose) WasmOptimizationResult.prototype[Symbol.dispose] = WasmOptimizationResult.prototype.free;
|
|
4937
5129
|
|
|
4938
5130
|
const WasmOptimizationUtilsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4939
5131
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4989,7 +5181,6 @@ export class WasmOptimizationUtils {
|
|
|
4989
5181
|
return ret !== 0;
|
|
4990
5182
|
}
|
|
4991
5183
|
}
|
|
4992
|
-
if (Symbol.dispose) WasmOptimizationUtils.prototype[Symbol.dispose] = WasmOptimizationUtils.prototype.free;
|
|
4993
5184
|
|
|
4994
5185
|
const WasmParametricDensityFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4995
5186
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5121,7 +5312,6 @@ export class WasmParametricDensity {
|
|
|
5121
5312
|
return v2;
|
|
5122
5313
|
}
|
|
5123
5314
|
}
|
|
5124
|
-
if (Symbol.dispose) WasmParametricDensity.prototype[Symbol.dispose] = WasmParametricDensity.prototype.free;
|
|
5125
5315
|
|
|
5126
5316
|
const WasmProbabilityMeasureFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5127
5317
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5203,7 +5393,6 @@ export class WasmProbabilityMeasure {
|
|
|
5203
5393
|
return WasmProbabilityMeasure.__wrap(ret[0]);
|
|
5204
5394
|
}
|
|
5205
5395
|
}
|
|
5206
|
-
if (Symbol.dispose) WasmProbabilityMeasure.prototype[Symbol.dispose] = WasmProbabilityMeasure.prototype.free;
|
|
5207
5396
|
|
|
5208
5397
|
const WasmProjectiveSpaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5209
5398
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5262,7 +5451,6 @@ export class WasmProjectiveSpace {
|
|
|
5262
5451
|
return this;
|
|
5263
5452
|
}
|
|
5264
5453
|
}
|
|
5265
|
-
if (Symbol.dispose) WasmProjectiveSpace.prototype[Symbol.dispose] = WasmProjectiveSpace.prototype.free;
|
|
5266
5454
|
|
|
5267
5455
|
const WasmPropagationAnalysisFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5268
5456
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5320,7 +5508,6 @@ export class WasmPropagationAnalysis {
|
|
|
5320
5508
|
return v1;
|
|
5321
5509
|
}
|
|
5322
5510
|
}
|
|
5323
|
-
if (Symbol.dispose) WasmPropagationAnalysis.prototype[Symbol.dispose] = WasmPropagationAnalysis.prototype.free;
|
|
5324
5511
|
|
|
5325
5512
|
const WasmRelativisticConstantsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5326
5513
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5374,7 +5561,6 @@ export class WasmRelativisticConstants {
|
|
|
5374
5561
|
return ret;
|
|
5375
5562
|
}
|
|
5376
5563
|
}
|
|
5377
|
-
if (Symbol.dispose) WasmRelativisticConstants.prototype[Symbol.dispose] = WasmRelativisticConstants.prototype.free;
|
|
5378
5564
|
|
|
5379
5565
|
const WasmRelativisticParticleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5380
5566
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5525,7 +5711,140 @@ export class WasmRelativisticParticle {
|
|
|
5525
5711
|
}
|
|
5526
5712
|
}
|
|
5527
5713
|
}
|
|
5528
|
-
|
|
5714
|
+
|
|
5715
|
+
const WasmResonatorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5716
|
+
? { register: () => {}, unregister: () => {} }
|
|
5717
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmresonator_free(ptr >>> 0, 1));
|
|
5718
|
+
/**
|
|
5719
|
+
* WASM wrapper for Resonator (iterative cleanup)
|
|
5720
|
+
*/
|
|
5721
|
+
export class WasmResonator {
|
|
5722
|
+
|
|
5723
|
+
static __wrap(ptr) {
|
|
5724
|
+
ptr = ptr >>> 0;
|
|
5725
|
+
const obj = Object.create(WasmResonator.prototype);
|
|
5726
|
+
obj.__wbg_ptr = ptr;
|
|
5727
|
+
WasmResonatorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
5728
|
+
return obj;
|
|
5729
|
+
}
|
|
5730
|
+
|
|
5731
|
+
__destroy_into_raw() {
|
|
5732
|
+
const ptr = this.__wbg_ptr;
|
|
5733
|
+
this.__wbg_ptr = 0;
|
|
5734
|
+
WasmResonatorFinalization.unregister(this);
|
|
5735
|
+
return ptr;
|
|
5736
|
+
}
|
|
5737
|
+
|
|
5738
|
+
free() {
|
|
5739
|
+
const ptr = this.__destroy_into_raw();
|
|
5740
|
+
wasm.__wbg_wasmresonator_free(ptr, 0);
|
|
5741
|
+
}
|
|
5742
|
+
/**
|
|
5743
|
+
* Create with custom configuration
|
|
5744
|
+
* @param {Float64Array} codebook_flat
|
|
5745
|
+
* @param {number} max_iterations
|
|
5746
|
+
* @param {number} convergence_threshold
|
|
5747
|
+
* @returns {WasmResonator}
|
|
5748
|
+
*/
|
|
5749
|
+
static withConfig(codebook_flat, max_iterations, convergence_threshold) {
|
|
5750
|
+
const ptr0 = passArrayF64ToWasm0(codebook_flat, wasm.__wbindgen_malloc);
|
|
5751
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5752
|
+
const ret = wasm.wasmresonator_withConfig(ptr0, len0, max_iterations, convergence_threshold);
|
|
5753
|
+
if (ret[2]) {
|
|
5754
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5755
|
+
}
|
|
5756
|
+
return WasmResonator.__wrap(ret[0]);
|
|
5757
|
+
}
|
|
5758
|
+
/**
|
|
5759
|
+
* Get the codebook size
|
|
5760
|
+
* @returns {number}
|
|
5761
|
+
*/
|
|
5762
|
+
codebookSize() {
|
|
5763
|
+
const ret = wasm.wasmresonator_codebookSize(this.__wbg_ptr);
|
|
5764
|
+
return ret >>> 0;
|
|
5765
|
+
}
|
|
5766
|
+
/**
|
|
5767
|
+
* Create a resonator from a codebook of TDC vectors
|
|
5768
|
+
* @param {Float64Array} codebook_flat
|
|
5769
|
+
*/
|
|
5770
|
+
constructor(codebook_flat) {
|
|
5771
|
+
const ptr0 = passArrayF64ToWasm0(codebook_flat, wasm.__wbindgen_malloc);
|
|
5772
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5773
|
+
const ret = wasm.wasmresonator_new(ptr0, len0);
|
|
5774
|
+
if (ret[2]) {
|
|
5775
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5776
|
+
}
|
|
5777
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
5778
|
+
WasmResonatorFinalization.register(this, this.__wbg_ptr, this);
|
|
5779
|
+
return this;
|
|
5780
|
+
}
|
|
5781
|
+
/**
|
|
5782
|
+
* Clean up a noisy input to find the closest codebook item
|
|
5783
|
+
* @param {WasmTropicalDualClifford} input
|
|
5784
|
+
* @returns {WasmCleanupResult}
|
|
5785
|
+
*/
|
|
5786
|
+
cleanup(input) {
|
|
5787
|
+
_assertClass(input, WasmTropicalDualClifford);
|
|
5788
|
+
const ret = wasm.wasmresonator_cleanup(this.__wbg_ptr, input.__wbg_ptr);
|
|
5789
|
+
return WasmCleanupResult.__wrap(ret);
|
|
5790
|
+
}
|
|
5791
|
+
}
|
|
5792
|
+
|
|
5793
|
+
const WasmRetrievalResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5794
|
+
? { register: () => {}, unregister: () => {} }
|
|
5795
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmretrievalresult_free(ptr >>> 0, 1));
|
|
5796
|
+
/**
|
|
5797
|
+
* WASM wrapper for retrieval results
|
|
5798
|
+
*/
|
|
5799
|
+
export class WasmRetrievalResult {
|
|
5800
|
+
|
|
5801
|
+
static __wrap(ptr) {
|
|
5802
|
+
ptr = ptr >>> 0;
|
|
5803
|
+
const obj = Object.create(WasmRetrievalResult.prototype);
|
|
5804
|
+
obj.__wbg_ptr = ptr;
|
|
5805
|
+
WasmRetrievalResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
5806
|
+
return obj;
|
|
5807
|
+
}
|
|
5808
|
+
|
|
5809
|
+
__destroy_into_raw() {
|
|
5810
|
+
const ptr = this.__wbg_ptr;
|
|
5811
|
+
this.__wbg_ptr = 0;
|
|
5812
|
+
WasmRetrievalResultFinalization.unregister(this);
|
|
5813
|
+
return ptr;
|
|
5814
|
+
}
|
|
5815
|
+
|
|
5816
|
+
free() {
|
|
5817
|
+
const ptr = this.__destroy_into_raw();
|
|
5818
|
+
wasm.__wbg_wasmretrievalresult_free(ptr, 0);
|
|
5819
|
+
}
|
|
5820
|
+
/**
|
|
5821
|
+
* Get the retrieval confidence (0 to 1)
|
|
5822
|
+
* @returns {number}
|
|
5823
|
+
*/
|
|
5824
|
+
getConfidence() {
|
|
5825
|
+
const ret = wasm.wasmretrievalresult_getConfidence(this.__wbg_ptr);
|
|
5826
|
+
return ret;
|
|
5827
|
+
}
|
|
5828
|
+
/**
|
|
5829
|
+
* Get attribution as arrays of [index, weight] pairs
|
|
5830
|
+
* @returns {any}
|
|
5831
|
+
*/
|
|
5832
|
+
getAttribution() {
|
|
5833
|
+
const ret = wasm.wasmretrievalresult_getAttribution(this.__wbg_ptr);
|
|
5834
|
+
if (ret[2]) {
|
|
5835
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5836
|
+
}
|
|
5837
|
+
return takeFromExternrefTable0(ret[0]);
|
|
5838
|
+
}
|
|
5839
|
+
/**
|
|
5840
|
+
* Get the retrieved value
|
|
5841
|
+
* @returns {WasmTropicalDualClifford}
|
|
5842
|
+
*/
|
|
5843
|
+
getValue() {
|
|
5844
|
+
const ret = wasm.wasmretrievalresult_getValue(this.__wbg_ptr);
|
|
5845
|
+
return WasmTropicalDualClifford.__wrap(ret);
|
|
5846
|
+
}
|
|
5847
|
+
}
|
|
5529
5848
|
|
|
5530
5849
|
const WasmRotorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5531
5850
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5594,7 +5913,6 @@ export class WasmRotor {
|
|
|
5594
5913
|
return WasmRotor.__wrap(ret);
|
|
5595
5914
|
}
|
|
5596
5915
|
}
|
|
5597
|
-
if (Symbol.dispose) WasmRotor.prototype[Symbol.dispose] = WasmRotor.prototype.free;
|
|
5598
5916
|
|
|
5599
5917
|
const WasmSchwarzschildMetricFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5600
5918
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5685,7 +6003,6 @@ export class WasmSchwarzschildMetric {
|
|
|
5685
6003
|
return WasmSchwarzschildMetric.__wrap(ret);
|
|
5686
6004
|
}
|
|
5687
6005
|
}
|
|
5688
|
-
if (Symbol.dispose) WasmSchwarzschildMetric.prototype[Symbol.dispose] = WasmSchwarzschildMetric.prototype.free;
|
|
5689
6006
|
|
|
5690
6007
|
const WasmSelfAssemblerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5691
6008
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5746,7 +6063,6 @@ export class WasmSelfAssembler {
|
|
|
5746
6063
|
return this;
|
|
5747
6064
|
}
|
|
5748
6065
|
}
|
|
5749
|
-
if (Symbol.dispose) WasmSelfAssembler.prototype[Symbol.dispose] = WasmSelfAssembler.prototype.free;
|
|
5750
6066
|
|
|
5751
6067
|
const WasmSensitivityMapFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5752
6068
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5806,7 +6122,6 @@ export class WasmSensitivityMap {
|
|
|
5806
6122
|
return ret;
|
|
5807
6123
|
}
|
|
5808
6124
|
}
|
|
5809
|
-
if (Symbol.dispose) WasmSensitivityMap.prototype[Symbol.dispose] = WasmSensitivityMap.prototype.free;
|
|
5810
6125
|
|
|
5811
6126
|
const WasmSimpleOptimizerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5812
6127
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5854,7 +6169,6 @@ export class WasmSimpleOptimizer {
|
|
|
5854
6169
|
return this;
|
|
5855
6170
|
}
|
|
5856
6171
|
}
|
|
5857
|
-
if (Symbol.dispose) WasmSimpleOptimizer.prototype[Symbol.dispose] = WasmSimpleOptimizer.prototype.free;
|
|
5858
6172
|
|
|
5859
6173
|
const WasmSpacetimeVectorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5860
6174
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6007,7 +6321,6 @@ export class WasmSpacetimeVector {
|
|
|
6007
6321
|
}
|
|
6008
6322
|
}
|
|
6009
6323
|
}
|
|
6010
|
-
if (Symbol.dispose) WasmSpacetimeVector.prototype[Symbol.dispose] = WasmSpacetimeVector.prototype.free;
|
|
6011
6324
|
|
|
6012
6325
|
const WasmTrajectoryPointFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6013
6326
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6052,7 +6365,6 @@ export class WasmTrajectoryPoint {
|
|
|
6052
6365
|
return WasmSpacetimeVector.__wrap(ret);
|
|
6053
6366
|
}
|
|
6054
6367
|
}
|
|
6055
|
-
if (Symbol.dispose) WasmTrajectoryPoint.prototype[Symbol.dispose] = WasmTrajectoryPoint.prototype.free;
|
|
6056
6368
|
|
|
6057
6369
|
const WasmTropicalCurveFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6058
6370
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6109,7 +6421,6 @@ export class WasmTropicalCurve {
|
|
|
6109
6421
|
return ret >>> 0;
|
|
6110
6422
|
}
|
|
6111
6423
|
}
|
|
6112
|
-
if (Symbol.dispose) WasmTropicalCurve.prototype[Symbol.dispose] = WasmTropicalCurve.prototype.free;
|
|
6113
6424
|
|
|
6114
6425
|
const WasmTropicalDualCliffordFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6115
6426
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6138,6 +6449,111 @@ export class WasmTropicalDualClifford {
|
|
|
6138
6449
|
const ptr = this.__destroy_into_raw();
|
|
6139
6450
|
wasm.__wbg_wasmtropicaldualclifford_free(ptr, 0);
|
|
6140
6451
|
}
|
|
6452
|
+
/**
|
|
6453
|
+
* Compute similarity between two TDC objects
|
|
6454
|
+
*
|
|
6455
|
+
* Uses the proper Clifford inner product with reverse: <A B̃>₀ / (|A| |B|)
|
|
6456
|
+
* Returns a value in [-1, 1].
|
|
6457
|
+
* @param {WasmTropicalDualClifford} other
|
|
6458
|
+
* @returns {number}
|
|
6459
|
+
*/
|
|
6460
|
+
similarity(other) {
|
|
6461
|
+
_assertClass(other, WasmTropicalDualClifford);
|
|
6462
|
+
const ret = wasm.wasmtropicaldualclifford_similarity(this.__wbg_ptr, other.__wbg_ptr);
|
|
6463
|
+
return ret;
|
|
6464
|
+
}
|
|
6465
|
+
/**
|
|
6466
|
+
* Create a random unit vector TDC (grade 1 only)
|
|
6467
|
+
*
|
|
6468
|
+
* Unit vectors are guaranteed invertible and useful for
|
|
6469
|
+
* proper VSA (Vector Symbolic Architecture) operations.
|
|
6470
|
+
* @returns {WasmTropicalDualClifford}
|
|
6471
|
+
*/
|
|
6472
|
+
static randomVector() {
|
|
6473
|
+
const ret = wasm.wasmtropicaldualclifford_randomVector();
|
|
6474
|
+
return WasmTropicalDualClifford.__wrap(ret);
|
|
6475
|
+
}
|
|
6476
|
+
/**
|
|
6477
|
+
* Compute binding inverse
|
|
6478
|
+
*
|
|
6479
|
+
* If successful, `x.bind(x.bindingInverse()) ≈ identity`
|
|
6480
|
+
* @returns {WasmTropicalDualClifford}
|
|
6481
|
+
*/
|
|
6482
|
+
bindingInverse() {
|
|
6483
|
+
const ret = wasm.wasmtropicaldualclifford_bindingInverse(this.__wbg_ptr);
|
|
6484
|
+
if (ret[2]) {
|
|
6485
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
6486
|
+
}
|
|
6487
|
+
return WasmTropicalDualClifford.__wrap(ret[0]);
|
|
6488
|
+
}
|
|
6489
|
+
/**
|
|
6490
|
+
* Get the binding identity element
|
|
6491
|
+
*
|
|
6492
|
+
* `x.bind(identity) = x` for any x
|
|
6493
|
+
* @returns {WasmTropicalDualClifford}
|
|
6494
|
+
*/
|
|
6495
|
+
static bindingIdentity() {
|
|
6496
|
+
const ret = wasm.wasmtropicaldualclifford_bindingIdentity();
|
|
6497
|
+
return WasmTropicalDualClifford.__wrap(ret);
|
|
6498
|
+
}
|
|
6499
|
+
/**
|
|
6500
|
+
* Normalize the TDC to unit norm
|
|
6501
|
+
* @returns {WasmTropicalDualClifford}
|
|
6502
|
+
*/
|
|
6503
|
+
normalizeToUnit() {
|
|
6504
|
+
const ret = wasm.wasmtropicaldualclifford_normalizeToUnit(this.__wbg_ptr);
|
|
6505
|
+
return WasmTropicalDualClifford.__wrap(ret);
|
|
6506
|
+
}
|
|
6507
|
+
/**
|
|
6508
|
+
* Compute Clifford similarity (proper inner product with reverse)
|
|
6509
|
+
* @param {WasmTropicalDualClifford} other
|
|
6510
|
+
* @returns {number}
|
|
6511
|
+
*/
|
|
6512
|
+
cliffordSimilarity(other) {
|
|
6513
|
+
_assertClass(other, WasmTropicalDualClifford);
|
|
6514
|
+
const ret = wasm.wasmtropicaldualclifford_cliffordSimilarity(this.__wbg_ptr, other.__wbg_ptr);
|
|
6515
|
+
return ret;
|
|
6516
|
+
}
|
|
6517
|
+
/**
|
|
6518
|
+
* Bind two TDC objects using geometric product (creates associations)
|
|
6519
|
+
*
|
|
6520
|
+
* The result is dissimilar to both inputs - useful for creating
|
|
6521
|
+
* key-value associations in holographic memory.
|
|
6522
|
+
* @param {WasmTropicalDualClifford} other
|
|
6523
|
+
* @returns {WasmTropicalDualClifford}
|
|
6524
|
+
*/
|
|
6525
|
+
bind(other) {
|
|
6526
|
+
_assertClass(other, WasmTropicalDualClifford);
|
|
6527
|
+
const ret = wasm.wasmtropicaldualclifford_bind(this.__wbg_ptr, other.__wbg_ptr);
|
|
6528
|
+
return WasmTropicalDualClifford.__wrap(ret);
|
|
6529
|
+
}
|
|
6530
|
+
/**
|
|
6531
|
+
* Bundle two TDC objects (superposition/aggregation)
|
|
6532
|
+
*
|
|
6533
|
+
* The result is similar to both inputs - useful for storing
|
|
6534
|
+
* multiple associations in the same memory trace.
|
|
6535
|
+
* `beta` controls soft (1.0) vs hard (∞) bundling.
|
|
6536
|
+
* @param {WasmTropicalDualClifford} other
|
|
6537
|
+
* @param {number} beta
|
|
6538
|
+
* @returns {WasmTropicalDualClifford}
|
|
6539
|
+
*/
|
|
6540
|
+
bundle(other, beta) {
|
|
6541
|
+
_assertClass(other, WasmTropicalDualClifford);
|
|
6542
|
+
const ret = wasm.wasmtropicaldualclifford_bundle(this.__wbg_ptr, other.__wbg_ptr, beta);
|
|
6543
|
+
return WasmTropicalDualClifford.__wrap(ret);
|
|
6544
|
+
}
|
|
6545
|
+
/**
|
|
6546
|
+
* Unbind: retrieve associated value
|
|
6547
|
+
*
|
|
6548
|
+
* If `bound = key.bind(value)`, then `key.unbind(bound) ≈ value`
|
|
6549
|
+
* @param {WasmTropicalDualClifford} other
|
|
6550
|
+
* @returns {WasmTropicalDualClifford}
|
|
6551
|
+
*/
|
|
6552
|
+
unbind(other) {
|
|
6553
|
+
_assertClass(other, WasmTropicalDualClifford);
|
|
6554
|
+
const ret = wasm.wasmtropicaldualclifford_unbind(this.__wbg_ptr, other.__wbg_ptr);
|
|
6555
|
+
return WasmTropicalDualClifford.__wrap(ret);
|
|
6556
|
+
}
|
|
6141
6557
|
/**
|
|
6142
6558
|
* Create from logits (array of log-probabilities)
|
|
6143
6559
|
* @param {Float64Array} logits
|
|
@@ -6189,6 +6605,8 @@ export class WasmTropicalDualClifford {
|
|
|
6189
6605
|
}
|
|
6190
6606
|
/**
|
|
6191
6607
|
* Create from probability distribution
|
|
6608
|
+
*
|
|
6609
|
+
* Note: Converts probabilities to log space for tropical representation
|
|
6192
6610
|
* @param {Float64Array} probs
|
|
6193
6611
|
* @returns {WasmTropicalDualClifford}
|
|
6194
6612
|
*/
|
|
@@ -6229,6 +6647,9 @@ export class WasmTropicalDualClifford {
|
|
|
6229
6647
|
}
|
|
6230
6648
|
/**
|
|
6231
6649
|
* Perform sensitivity analysis for gradient-based optimization
|
|
6650
|
+
*
|
|
6651
|
+
* Note: This feature is not yet available in v0.12.0
|
|
6652
|
+
* TODO: Re-enable when sensitivity_analysis is added to TropicalDualClifford
|
|
6232
6653
|
* @returns {WasmSensitivityMap}
|
|
6233
6654
|
*/
|
|
6234
6655
|
sensitivityAnalysis() {
|
|
@@ -6340,93 +6761,6 @@ export class WasmTropicalDualClifford {
|
|
|
6340
6761
|
return WasmTropicalDualClifford.__wrap(ret);
|
|
6341
6762
|
}
|
|
6342
6763
|
}
|
|
6343
|
-
if (Symbol.dispose) WasmTropicalDualClifford.prototype[Symbol.dispose] = WasmTropicalDualClifford.prototype.free;
|
|
6344
|
-
|
|
6345
|
-
const WasmTropicalDualDistributionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6346
|
-
? { register: () => {}, unregister: () => {} }
|
|
6347
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmtropicaldualdistribution_free(ptr >>> 0, 1));
|
|
6348
|
-
/**
|
|
6349
|
-
* WASM wrapper for LLM token distributions
|
|
6350
|
-
*/
|
|
6351
|
-
export class WasmTropicalDualDistribution {
|
|
6352
|
-
|
|
6353
|
-
__destroy_into_raw() {
|
|
6354
|
-
const ptr = this.__wbg_ptr;
|
|
6355
|
-
this.__wbg_ptr = 0;
|
|
6356
|
-
WasmTropicalDualDistributionFinalization.unregister(this);
|
|
6357
|
-
return ptr;
|
|
6358
|
-
}
|
|
6359
|
-
|
|
6360
|
-
free() {
|
|
6361
|
-
const ptr = this.__destroy_into_raw();
|
|
6362
|
-
wasm.__wbg_wasmtropicaldualdistribution_free(ptr, 0);
|
|
6363
|
-
}
|
|
6364
|
-
/**
|
|
6365
|
-
* Compute KL divergence with automatic gradients
|
|
6366
|
-
* @param {WasmTropicalDualDistribution} other
|
|
6367
|
-
* @returns {any}
|
|
6368
|
-
*/
|
|
6369
|
-
klDivergence(other) {
|
|
6370
|
-
_assertClass(other, WasmTropicalDualDistribution);
|
|
6371
|
-
const ret = wasm.wasmtropicaldualdistribution_klDivergence(this.__wbg_ptr, other.__wbg_ptr);
|
|
6372
|
-
if (ret[2]) {
|
|
6373
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
6374
|
-
}
|
|
6375
|
-
return takeFromExternrefTable0(ret[0]);
|
|
6376
|
-
}
|
|
6377
|
-
/**
|
|
6378
|
-
* Get vocabulary size
|
|
6379
|
-
* @returns {number}
|
|
6380
|
-
*/
|
|
6381
|
-
getVocabSize() {
|
|
6382
|
-
const ret = wasm.wasmtropicaldualdistribution_getVocabSize(this.__wbg_ptr);
|
|
6383
|
-
return ret >>> 0;
|
|
6384
|
-
}
|
|
6385
|
-
/**
|
|
6386
|
-
* Get attention pattern as tropical polytope vertices
|
|
6387
|
-
* @returns {Float64Array}
|
|
6388
|
-
*/
|
|
6389
|
-
attentionPolytope() {
|
|
6390
|
-
const ret = wasm.wasmtropicaldualdistribution_attentionPolytope(this.__wbg_ptr);
|
|
6391
|
-
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
6392
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
6393
|
-
return v1;
|
|
6394
|
-
}
|
|
6395
|
-
/**
|
|
6396
|
-
* Compute geometric alignment with reference distribution
|
|
6397
|
-
* @param {WasmTropicalDualDistribution} reference
|
|
6398
|
-
* @returns {number}
|
|
6399
|
-
*/
|
|
6400
|
-
geometricAlignment(reference) {
|
|
6401
|
-
_assertClass(reference, WasmTropicalDualDistribution);
|
|
6402
|
-
const ret = wasm.wasmtropicaldualdistribution_geometricAlignment(this.__wbg_ptr, reference.__wbg_ptr);
|
|
6403
|
-
return ret;
|
|
6404
|
-
}
|
|
6405
|
-
/**
|
|
6406
|
-
* Generate most likely sequence using tropical algebra (Viterbi-like)
|
|
6407
|
-
* @param {number} length
|
|
6408
|
-
* @returns {Uint32Array}
|
|
6409
|
-
*/
|
|
6410
|
-
mostLikelySequence(length) {
|
|
6411
|
-
const ret = wasm.wasmtropicaldualdistribution_mostLikelySequence(this.__wbg_ptr, length);
|
|
6412
|
-
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
6413
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6414
|
-
return v1;
|
|
6415
|
-
}
|
|
6416
|
-
/**
|
|
6417
|
-
* Create from logit vector (typical LLM output)
|
|
6418
|
-
* @param {Float64Array} logits
|
|
6419
|
-
*/
|
|
6420
|
-
constructor(logits) {
|
|
6421
|
-
const ptr0 = passArrayF64ToWasm0(logits, wasm.__wbindgen_malloc);
|
|
6422
|
-
const len0 = WASM_VECTOR_LEN;
|
|
6423
|
-
const ret = wasm.wasmtropicaldualdistribution_new(ptr0, len0);
|
|
6424
|
-
this.__wbg_ptr = ret >>> 0;
|
|
6425
|
-
WasmTropicalDualDistributionFinalization.register(this, this.__wbg_ptr, this);
|
|
6426
|
-
return this;
|
|
6427
|
-
}
|
|
6428
|
-
}
|
|
6429
|
-
if (Symbol.dispose) WasmTropicalDualDistribution.prototype[Symbol.dispose] = WasmTropicalDualDistribution.prototype.free;
|
|
6430
6764
|
|
|
6431
6765
|
const WasmTropicalMeasureFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6432
6766
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6510,7 +6844,6 @@ export class WasmTropicalMeasure {
|
|
|
6510
6844
|
return v2;
|
|
6511
6845
|
}
|
|
6512
6846
|
}
|
|
6513
|
-
if (Symbol.dispose) WasmTropicalMeasure.prototype[Symbol.dispose] = WasmTropicalMeasure.prototype.free;
|
|
6514
6847
|
|
|
6515
6848
|
const WasmTropicalNetworkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6516
6849
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6611,7 +6944,6 @@ export class WasmTropicalNetwork {
|
|
|
6611
6944
|
}
|
|
6612
6945
|
}
|
|
6613
6946
|
}
|
|
6614
|
-
if (Symbol.dispose) WasmTropicalNetwork.prototype[Symbol.dispose] = WasmTropicalNetwork.prototype.free;
|
|
6615
6947
|
|
|
6616
6948
|
const WasmTropicalNumberFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6617
6949
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6642,6 +6974,8 @@ export class WasmTropicalNumber {
|
|
|
6642
6974
|
}
|
|
6643
6975
|
/**
|
|
6644
6976
|
* Check if this is infinite
|
|
6977
|
+
*
|
|
6978
|
+
* Note: Manual implementation as is_infinity() not in v0.12.0 API
|
|
6645
6979
|
* @returns {boolean}
|
|
6646
6980
|
*/
|
|
6647
6981
|
isInfinity() {
|
|
@@ -6679,6 +7013,8 @@ export class WasmTropicalNumber {
|
|
|
6679
7013
|
}
|
|
6680
7014
|
/**
|
|
6681
7015
|
* Create from log probability
|
|
7016
|
+
*
|
|
7017
|
+
* Note: Manual implementation as from_log_prob() not in v0.12.0 API
|
|
6682
7018
|
* @param {number} log_p
|
|
6683
7019
|
* @returns {WasmTropicalNumber}
|
|
6684
7020
|
*/
|
|
@@ -6708,6 +7044,8 @@ export class WasmTropicalNumber {
|
|
|
6708
7044
|
}
|
|
6709
7045
|
/**
|
|
6710
7046
|
* Negation
|
|
7047
|
+
*
|
|
7048
|
+
* Note: Manual implementation as Neg trait not implemented in v0.12.0 API
|
|
6711
7049
|
* @returns {WasmTropicalNumber}
|
|
6712
7050
|
*/
|
|
6713
7051
|
neg() {
|
|
@@ -6737,7 +7075,7 @@ export class WasmTropicalNumber {
|
|
|
6737
7075
|
* @returns {WasmTropicalNumber}
|
|
6738
7076
|
*/
|
|
6739
7077
|
static zero() {
|
|
6740
|
-
const ret = wasm.
|
|
7078
|
+
const ret = wasm.wasmtropicalnumber_one();
|
|
6741
7079
|
return WasmTropicalNumber.__wrap(ret);
|
|
6742
7080
|
}
|
|
6743
7081
|
/**
|
|
@@ -6753,11 +7091,13 @@ export class WasmTropicalNumber {
|
|
|
6753
7091
|
* @returns {boolean}
|
|
6754
7092
|
*/
|
|
6755
7093
|
isZero() {
|
|
6756
|
-
const ret = wasm.
|
|
7094
|
+
const ret = wasm.wasmtropicalnumber_isInfinity(this.__wbg_ptr);
|
|
6757
7095
|
return ret !== 0;
|
|
6758
7096
|
}
|
|
6759
7097
|
/**
|
|
6760
7098
|
* Convert to probability (via exp)
|
|
7099
|
+
*
|
|
7100
|
+
* Note: Manual implementation as to_prob() not in v0.12.0 API
|
|
6761
7101
|
* @returns {number}
|
|
6762
7102
|
*/
|
|
6763
7103
|
toProb() {
|
|
@@ -6773,7 +7113,6 @@ export class WasmTropicalNumber {
|
|
|
6773
7113
|
return ret;
|
|
6774
7114
|
}
|
|
6775
7115
|
}
|
|
6776
|
-
if (Symbol.dispose) WasmTropicalNumber.prototype[Symbol.dispose] = WasmTropicalNumber.prototype.free;
|
|
6777
7116
|
|
|
6778
7117
|
const WasmTropicalPolynomialFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6779
7118
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6833,7 +7172,6 @@ export class WasmTropicalPolynomial {
|
|
|
6833
7172
|
return WasmTropicalNumber.__wrap(ret);
|
|
6834
7173
|
}
|
|
6835
7174
|
}
|
|
6836
|
-
if (Symbol.dispose) WasmTropicalPolynomial.prototype[Symbol.dispose] = WasmTropicalPolynomial.prototype.free;
|
|
6837
7175
|
|
|
6838
7176
|
const WasmTropicalViterbiFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6839
7177
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -6903,7 +7241,6 @@ export class WasmTropicalViterbi {
|
|
|
6903
7241
|
return takeFromExternrefTable0(ret[0]);
|
|
6904
7242
|
}
|
|
6905
7243
|
}
|
|
6906
|
-
if (Symbol.dispose) WasmTropicalViterbi.prototype[Symbol.dispose] = WasmTropicalViterbi.prototype.free;
|
|
6907
7244
|
|
|
6908
7245
|
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
6909
7246
|
|
|
@@ -6943,50 +7280,23 @@ async function __wbg_load(module, imports) {
|
|
|
6943
7280
|
function __wbg_get_imports() {
|
|
6944
7281
|
const imports = {};
|
|
6945
7282
|
imports.wbg = {};
|
|
6946
|
-
imports.wbg.
|
|
6947
|
-
const ret = debugString(arg1);
|
|
6948
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6949
|
-
const len1 = WASM_VECTOR_LEN;
|
|
6950
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
6951
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
6952
|
-
};
|
|
6953
|
-
imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
|
|
6954
|
-
const ret = typeof(arg0) === 'function';
|
|
6955
|
-
return ret;
|
|
6956
|
-
};
|
|
6957
|
-
imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
6958
|
-
const ret = arg0 === undefined;
|
|
6959
|
-
return ret;
|
|
6960
|
-
};
|
|
6961
|
-
imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
6962
|
-
const obj = arg1;
|
|
6963
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
6964
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
6965
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
6966
|
-
};
|
|
6967
|
-
imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
6968
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
6969
|
-
};
|
|
6970
|
-
imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
|
|
6971
|
-
arg0._wbg_cb_unref();
|
|
6972
|
-
};
|
|
6973
|
-
imports.wbg.__wbg_apply_04097a755e1e4a1e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
7283
|
+
imports.wbg.__wbg_apply_8745fdcf855d21f5 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
6974
7284
|
const ret = arg0.apply(arg1, arg2);
|
|
6975
7285
|
return ret;
|
|
6976
7286
|
}, arguments) };
|
|
6977
|
-
imports.wbg.
|
|
6978
|
-
const ret = arg0.call(arg1, arg2, arg3
|
|
7287
|
+
imports.wbg.__wbg_call_1b920c3ac0afee4b = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
7288
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
6979
7289
|
return ret;
|
|
6980
7290
|
}, arguments) };
|
|
6981
|
-
imports.wbg.
|
|
6982
|
-
const ret = arg0.call(arg1, arg2);
|
|
7291
|
+
imports.wbg.__wbg_call_36f1bbf64b4cf7c7 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
7292
|
+
const ret = arg0.call(arg1, arg2, arg3, arg4);
|
|
6983
7293
|
return ret;
|
|
6984
7294
|
}, arguments) };
|
|
6985
|
-
imports.wbg.
|
|
6986
|
-
const ret = arg0.call(arg1, arg2
|
|
7295
|
+
imports.wbg.__wbg_call_f2db6205e5c51dc8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
7296
|
+
const ret = arg0.call(arg1, arg2);
|
|
6987
7297
|
return ret;
|
|
6988
7298
|
}, arguments) };
|
|
6989
|
-
imports.wbg.
|
|
7299
|
+
imports.wbg.__wbg_call_fbe8be8bf6436ce5 = function() { return handleError(function (arg0, arg1) {
|
|
6990
7300
|
const ret = arg0.call(arg1);
|
|
6991
7301
|
return ret;
|
|
6992
7302
|
}, arguments) };
|
|
@@ -7001,36 +7311,44 @@ function __wbg_get_imports() {
|
|
|
7001
7311
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
7002
7312
|
}
|
|
7003
7313
|
};
|
|
7004
|
-
imports.wbg.
|
|
7314
|
+
imports.wbg.__wbg_from_12ff8e47307bd4c7 = function(arg0) {
|
|
7005
7315
|
const ret = Array.from(arg0);
|
|
7006
7316
|
return ret;
|
|
7007
7317
|
};
|
|
7008
|
-
imports.wbg.
|
|
7318
|
+
imports.wbg.__wbg_get_a131a44bd1eb6979 = function(arg0, arg1) {
|
|
7009
7319
|
const ret = arg0[arg1 >>> 0];
|
|
7010
7320
|
return ret;
|
|
7011
7321
|
};
|
|
7012
|
-
imports.wbg.
|
|
7322
|
+
imports.wbg.__wbg_length_f00ec12454a5d9fd = function(arg0) {
|
|
7013
7323
|
const ret = arg0.length;
|
|
7014
7324
|
return ret;
|
|
7015
7325
|
};
|
|
7016
|
-
imports.wbg.
|
|
7017
|
-
console.log(arg0);
|
|
7018
|
-
};
|
|
7019
|
-
imports.wbg.__wbg_log_bf0922dbf69432a1 = function(arg0, arg1) {
|
|
7326
|
+
imports.wbg.__wbg_log_bf345a94df4f1349 = function(arg0, arg1) {
|
|
7020
7327
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
7021
7328
|
};
|
|
7022
|
-
imports.wbg.
|
|
7329
|
+
imports.wbg.__wbg_log_ea240990d83e374e = function(arg0) {
|
|
7330
|
+
console.log(arg0);
|
|
7331
|
+
};
|
|
7332
|
+
imports.wbg.__wbg_new_07b483f72211fd66 = function() {
|
|
7023
7333
|
const ret = new Object();
|
|
7024
7334
|
return ret;
|
|
7025
7335
|
};
|
|
7026
|
-
imports.wbg.
|
|
7336
|
+
imports.wbg.__wbg_new_58353953ad2097cc = function() {
|
|
7337
|
+
const ret = new Array();
|
|
7338
|
+
return ret;
|
|
7339
|
+
};
|
|
7340
|
+
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
7341
|
+
const ret = new Error();
|
|
7342
|
+
return ret;
|
|
7343
|
+
};
|
|
7344
|
+
imports.wbg.__wbg_new_e30c39c06edaabf2 = function(arg0, arg1) {
|
|
7027
7345
|
try {
|
|
7028
7346
|
var state0 = {a: arg0, b: arg1};
|
|
7029
7347
|
var cb0 = (arg0, arg1) => {
|
|
7030
7348
|
const a = state0.a;
|
|
7031
7349
|
state0.a = 0;
|
|
7032
7350
|
try {
|
|
7033
|
-
return
|
|
7351
|
+
return __wbg_adapter_496(a, state0.b, arg0, arg1);
|
|
7034
7352
|
} finally {
|
|
7035
7353
|
state0.a = a;
|
|
7036
7354
|
}
|
|
@@ -7041,40 +7359,32 @@ function __wbg_get_imports() {
|
|
|
7041
7359
|
state0.a = state0.b = 0;
|
|
7042
7360
|
}
|
|
7043
7361
|
};
|
|
7044
|
-
imports.wbg.
|
|
7045
|
-
const ret = new Error();
|
|
7046
|
-
return ret;
|
|
7047
|
-
};
|
|
7048
|
-
imports.wbg.__wbg_new_e17d9f43105b08be = function() {
|
|
7049
|
-
const ret = new Array();
|
|
7050
|
-
return ret;
|
|
7051
|
-
};
|
|
7052
|
-
imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
|
|
7362
|
+
imports.wbg.__wbg_newnoargs_ff528e72d35de39a = function(arg0, arg1) {
|
|
7053
7363
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
7054
7364
|
return ret;
|
|
7055
7365
|
};
|
|
7056
|
-
imports.wbg.
|
|
7366
|
+
imports.wbg.__wbg_push_73fd7b5550ebf707 = function(arg0, arg1) {
|
|
7057
7367
|
const ret = arg0.push(arg1);
|
|
7058
7368
|
return ret;
|
|
7059
7369
|
};
|
|
7060
|
-
imports.wbg.
|
|
7370
|
+
imports.wbg.__wbg_queueMicrotask_46c1df247678729f = function(arg0) {
|
|
7371
|
+
queueMicrotask(arg0);
|
|
7372
|
+
};
|
|
7373
|
+
imports.wbg.__wbg_queueMicrotask_8acf3ccb75ed8d11 = function(arg0) {
|
|
7061
7374
|
const ret = arg0.queueMicrotask;
|
|
7062
7375
|
return ret;
|
|
7063
7376
|
};
|
|
7064
|
-
imports.wbg.
|
|
7065
|
-
queueMicrotask(arg0);
|
|
7066
|
-
};
|
|
7067
|
-
imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
|
|
7377
|
+
imports.wbg.__wbg_resolve_0dac8c580ffd4678 = function(arg0) {
|
|
7068
7378
|
const ret = Promise.resolve(arg0);
|
|
7069
7379
|
return ret;
|
|
7070
7380
|
};
|
|
7071
7381
|
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
7072
7382
|
arg0[arg1] = arg2;
|
|
7073
7383
|
};
|
|
7074
|
-
imports.wbg.
|
|
7384
|
+
imports.wbg.__wbg_set_7422acbe992d64ab = function(arg0, arg1, arg2) {
|
|
7075
7385
|
arg0[arg1 >>> 0] = arg2;
|
|
7076
7386
|
};
|
|
7077
|
-
imports.wbg.
|
|
7387
|
+
imports.wbg.__wbg_set_c43293f93a35998a = function() { return handleError(function (arg0, arg1, arg2) {
|
|
7078
7388
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
7079
7389
|
return ret;
|
|
7080
7390
|
}, arguments) };
|
|
@@ -7085,23 +7395,23 @@ function __wbg_get_imports() {
|
|
|
7085
7395
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
7086
7396
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
7087
7397
|
};
|
|
7088
|
-
imports.wbg.
|
|
7398
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_487c52c58d65314d = function() {
|
|
7089
7399
|
const ret = typeof global === 'undefined' ? null : global;
|
|
7090
7400
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
7091
7401
|
};
|
|
7092
|
-
imports.wbg.
|
|
7402
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_ee9704f328b6b291 = function() {
|
|
7093
7403
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
7094
7404
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
7095
7405
|
};
|
|
7096
|
-
imports.wbg.
|
|
7406
|
+
imports.wbg.__wbg_static_accessor_SELF_78c9e3071b912620 = function() {
|
|
7097
7407
|
const ret = typeof self === 'undefined' ? null : self;
|
|
7098
7408
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
7099
7409
|
};
|
|
7100
|
-
imports.wbg.
|
|
7410
|
+
imports.wbg.__wbg_static_accessor_WINDOW_a093d21393777366 = function() {
|
|
7101
7411
|
const ret = typeof window === 'undefined' ? null : window;
|
|
7102
7412
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
7103
7413
|
};
|
|
7104
|
-
imports.wbg.
|
|
7414
|
+
imports.wbg.__wbg_then_db882932c0c714c6 = function(arg0, arg1) {
|
|
7105
7415
|
const ret = arg0.then(arg1);
|
|
7106
7416
|
return ret;
|
|
7107
7417
|
};
|
|
@@ -7121,35 +7431,38 @@ function __wbg_get_imports() {
|
|
|
7121
7431
|
const ret = WasmTropicalNumber.__wrap(arg0);
|
|
7122
7432
|
return ret;
|
|
7123
7433
|
};
|
|
7124
|
-
imports.wbg.
|
|
7125
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
7126
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
7127
|
-
return ret;
|
|
7128
|
-
};
|
|
7129
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
7130
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
7434
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
7131
7435
|
const ret = BigInt.asUintN(64, arg0);
|
|
7132
7436
|
return ret;
|
|
7133
7437
|
};
|
|
7134
|
-
imports.wbg.
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7438
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
7439
|
+
const obj = arg0.original;
|
|
7440
|
+
if (obj.cnt-- == 1) {
|
|
7441
|
+
obj.a = 0;
|
|
7442
|
+
return true;
|
|
7443
|
+
}
|
|
7444
|
+
const ret = false;
|
|
7139
7445
|
return ret;
|
|
7140
7446
|
};
|
|
7141
|
-
imports.wbg.
|
|
7142
|
-
|
|
7143
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_e07ba2a7d21574bf___closure__destroy___dyn_core_a2b7f04d45112077___ops__function__FnMut__wasm_bindgen_e07ba2a7d21574bf___JsValue____Output_______, wasm_bindgen_e07ba2a7d21574bf___convert__closures_____invoke___wasm_bindgen_e07ba2a7d21574bf___JsValue_____);
|
|
7447
|
+
imports.wbg.__wbindgen_closure_wrapper1715 = function(arg0, arg1, arg2) {
|
|
7448
|
+
const ret = makeMutClosure(arg0, arg1, 57, __wbg_adapter_28);
|
|
7144
7449
|
return ret;
|
|
7145
7450
|
};
|
|
7146
|
-
imports.wbg.
|
|
7147
|
-
|
|
7148
|
-
const
|
|
7451
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
7452
|
+
const ret = debugString(arg1);
|
|
7453
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7454
|
+
const len1 = WASM_VECTOR_LEN;
|
|
7455
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
7456
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
7457
|
+
};
|
|
7458
|
+
imports.wbg.__wbindgen_float64_array_new = function(arg0, arg1) {
|
|
7459
|
+
var v0 = getArrayF64FromWasm0(arg0, arg1).slice();
|
|
7460
|
+
wasm.__wbindgen_free(arg0, arg1 * 8, 8);
|
|
7461
|
+
const ret = v0;
|
|
7149
7462
|
return ret;
|
|
7150
7463
|
};
|
|
7151
7464
|
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
7152
|
-
const table = wasm.
|
|
7465
|
+
const table = wasm.__wbindgen_export_2;
|
|
7153
7466
|
const offset = table.grow(4);
|
|
7154
7467
|
table.set(0, undefined);
|
|
7155
7468
|
table.set(offset + 0, undefined);
|
|
@@ -7158,10 +7471,39 @@ function __wbg_get_imports() {
|
|
|
7158
7471
|
table.set(offset + 3, false);
|
|
7159
7472
|
;
|
|
7160
7473
|
};
|
|
7474
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
7475
|
+
const ret = typeof(arg0) === 'function';
|
|
7476
|
+
return ret;
|
|
7477
|
+
};
|
|
7478
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
7479
|
+
const ret = arg0 === undefined;
|
|
7480
|
+
return ret;
|
|
7481
|
+
};
|
|
7482
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
7483
|
+
const obj = arg1;
|
|
7484
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
7485
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
7486
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
7487
|
+
};
|
|
7488
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
7489
|
+
const ret = arg0;
|
|
7490
|
+
return ret;
|
|
7491
|
+
};
|
|
7492
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
7493
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
7494
|
+
return ret;
|
|
7495
|
+
};
|
|
7496
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
7497
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
7498
|
+
};
|
|
7161
7499
|
|
|
7162
7500
|
return imports;
|
|
7163
7501
|
}
|
|
7164
7502
|
|
|
7503
|
+
function __wbg_init_memory(imports, memory) {
|
|
7504
|
+
|
|
7505
|
+
}
|
|
7506
|
+
|
|
7165
7507
|
function __wbg_finalize_init(instance, module) {
|
|
7166
7508
|
wasm = instance.exports;
|
|
7167
7509
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
@@ -7189,6 +7531,8 @@ function initSync(module) {
|
|
|
7189
7531
|
|
|
7190
7532
|
const imports = __wbg_get_imports();
|
|
7191
7533
|
|
|
7534
|
+
__wbg_init_memory(imports);
|
|
7535
|
+
|
|
7192
7536
|
if (!(module instanceof WebAssembly.Module)) {
|
|
7193
7537
|
module = new WebAssembly.Module(module);
|
|
7194
7538
|
}
|
|
@@ -7219,6 +7563,8 @@ async function __wbg_init(module_or_path) {
|
|
|
7219
7563
|
module_or_path = fetch(module_or_path);
|
|
7220
7564
|
}
|
|
7221
7565
|
|
|
7566
|
+
__wbg_init_memory(imports);
|
|
7567
|
+
|
|
7222
7568
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
7223
7569
|
|
|
7224
7570
|
return __wbg_finalize_init(instance, module);
|