egraph 6.0.0-alpha.0 → 6.0.0-alpha.1

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.
@@ -1,1534 +0,0 @@
1
- let imports = {};
2
- imports['__wbindgen_placeholder__'] = module.exports;
3
- let wasm;
4
- const { TextDecoder, TextEncoder } = require(`util`);
5
-
6
- const heap = new Array(32).fill(undefined);
7
-
8
- heap.push(undefined, null, true, false);
9
-
10
- let heap_next = heap.length;
11
-
12
- function addHeapObject(obj) {
13
- if (heap_next === heap.length) heap.push(heap.length + 1);
14
- const idx = heap_next;
15
- heap_next = heap[idx];
16
-
17
- heap[idx] = obj;
18
- return idx;
19
- }
20
-
21
- function getObject(idx) { return heap[idx]; }
22
-
23
- function dropObject(idx) {
24
- if (idx < 36) return;
25
- heap[idx] = heap_next;
26
- heap_next = idx;
27
- }
28
-
29
- function takeObject(idx) {
30
- const ret = getObject(idx);
31
- dropObject(idx);
32
- return ret;
33
- }
34
-
35
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
36
-
37
- cachedTextDecoder.decode();
38
-
39
- let cachegetUint8Memory0 = null;
40
- function getUint8Memory0() {
41
- if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
42
- cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
43
- }
44
- return cachegetUint8Memory0;
45
- }
46
-
47
- function getStringFromWasm0(ptr, len) {
48
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
49
- }
50
-
51
- function isLikeNone(x) {
52
- return x === undefined || x === null;
53
- }
54
-
55
- let cachegetFloat64Memory0 = null;
56
- function getFloat64Memory0() {
57
- if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
58
- cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
59
- }
60
- return cachegetFloat64Memory0;
61
- }
62
-
63
- let cachegetInt32Memory0 = null;
64
- function getInt32Memory0() {
65
- if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
66
- cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
67
- }
68
- return cachegetInt32Memory0;
69
- }
70
-
71
- let WASM_VECTOR_LEN = 0;
72
-
73
- let cachedTextEncoder = new TextEncoder('utf-8');
74
-
75
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
76
- ? function (arg, view) {
77
- return cachedTextEncoder.encodeInto(arg, view);
78
- }
79
- : function (arg, view) {
80
- const buf = cachedTextEncoder.encode(arg);
81
- view.set(buf);
82
- return {
83
- read: arg.length,
84
- written: buf.length
85
- };
86
- });
87
-
88
- function passStringToWasm0(arg, malloc, realloc) {
89
-
90
- if (realloc === undefined) {
91
- const buf = cachedTextEncoder.encode(arg);
92
- const ptr = malloc(buf.length);
93
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
94
- WASM_VECTOR_LEN = buf.length;
95
- return ptr;
96
- }
97
-
98
- let len = arg.length;
99
- let ptr = malloc(len);
100
-
101
- const mem = getUint8Memory0();
102
-
103
- let offset = 0;
104
-
105
- for (; offset < len; offset++) {
106
- const code = arg.charCodeAt(offset);
107
- if (code > 0x7F) break;
108
- mem[ptr + offset] = code;
109
- }
110
-
111
- if (offset !== len) {
112
- if (offset !== 0) {
113
- arg = arg.slice(offset);
114
- }
115
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
116
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
117
- const ret = encodeString(arg, view);
118
-
119
- offset += ret.written;
120
- }
121
-
122
- WASM_VECTOR_LEN = offset;
123
- return ptr;
124
- }
125
-
126
- function debugString(val) {
127
- // primitive types
128
- const type = typeof val;
129
- if (type == 'number' || type == 'boolean' || val == null) {
130
- return `${val}`;
131
- }
132
- if (type == 'string') {
133
- return `"${val}"`;
134
- }
135
- if (type == 'symbol') {
136
- const description = val.description;
137
- if (description == null) {
138
- return 'Symbol';
139
- } else {
140
- return `Symbol(${description})`;
141
- }
142
- }
143
- if (type == 'function') {
144
- const name = val.name;
145
- if (typeof name == 'string' && name.length > 0) {
146
- return `Function(${name})`;
147
- } else {
148
- return 'Function';
149
- }
150
- }
151
- // objects
152
- if (Array.isArray(val)) {
153
- const length = val.length;
154
- let debug = '[';
155
- if (length > 0) {
156
- debug += debugString(val[0]);
157
- }
158
- for(let i = 1; i < length; i++) {
159
- debug += ', ' + debugString(val[i]);
160
- }
161
- debug += ']';
162
- return debug;
163
- }
164
- // Test for built-in
165
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
166
- let className;
167
- if (builtInMatches.length > 1) {
168
- className = builtInMatches[1];
169
- } else {
170
- // Failed to match the standard '[object ClassName]'
171
- return toString.call(val);
172
- }
173
- if (className == 'Object') {
174
- // we're a user defined class or Object
175
- // JSON.stringify avoids problems with cycles, and is generally much
176
- // easier than looping through ownProperties of `val`.
177
- try {
178
- return 'Object(' + JSON.stringify(val) + ')';
179
- } catch (_) {
180
- return 'Object';
181
- }
182
- }
183
- // errors
184
- if (val instanceof Error) {
185
- return `${val.name}: ${val.message}\n${val.stack}`;
186
- }
187
- // TODO we could test for more things here, like `Set`s and `Map`s.
188
- return className;
189
- }
190
-
191
- function _assertClass(instance, klass) {
192
- if (!(instance instanceof klass)) {
193
- throw new Error(`expected instance of ${klass.name}`);
194
- }
195
- return instance.ptr;
196
- }
197
-
198
- let stack_pointer = 32;
199
-
200
- function addBorrowedObject(obj) {
201
- if (stack_pointer == 1) throw new Error('out of js stack');
202
- heap[--stack_pointer] = obj;
203
- return stack_pointer;
204
- }
205
- /**
206
- * @param {Graph} graph
207
- * @param {Function} groups
208
- * @param {Function} shrink_node
209
- * @param {Function} shrink_edge
210
- * @returns {any}
211
- */
212
- module.exports.coarsen = function(graph, groups, shrink_node, shrink_edge) {
213
- try {
214
- _assertClass(graph, Graph);
215
- var ret = wasm.coarsen(graph.ptr, addBorrowedObject(groups), addBorrowedObject(shrink_node), addBorrowedObject(shrink_edge));
216
- return takeObject(ret);
217
- } finally {
218
- heap[stack_pointer++] = undefined;
219
- heap[stack_pointer++] = undefined;
220
- heap[stack_pointer++] = undefined;
221
- }
222
- };
223
-
224
- /**
225
- * @param {Graph} graph
226
- * @param {any} coordinates
227
- * @returns {any}
228
- */
229
- module.exports.fdeb = function(graph, coordinates) {
230
- try {
231
- _assertClass(graph, Graph);
232
- var ret = wasm.fdeb(graph.ptr, addBorrowedObject(coordinates));
233
- return takeObject(ret);
234
- } finally {
235
- heap[stack_pointer++] = undefined;
236
- }
237
- };
238
-
239
- /**
240
- * @param {Graph} graph
241
- * @param {number} min_size
242
- * @param {number} step_iteration
243
- * @param {Function} _shrink_node
244
- * @param {Function} _shrink_edge
245
- * @param {Function} _link_distance_accessor
246
- * @returns {Coordinates}
247
- */
248
- module.exports.fm3 = function(graph, min_size, step_iteration, _shrink_node, _shrink_edge, _link_distance_accessor) {
249
- _assertClass(graph, Graph);
250
- var ret = wasm.fm3(graph.ptr, min_size, step_iteration, addHeapObject(_shrink_node), addHeapObject(_shrink_edge), addHeapObject(_link_distance_accessor));
251
- return Coordinates.__wrap(ret);
252
- };
253
-
254
- let cachegetFloat32Memory0 = null;
255
- function getFloat32Memory0() {
256
- if (cachegetFloat32Memory0 === null || cachegetFloat32Memory0.buffer !== wasm.memory.buffer) {
257
- cachegetFloat32Memory0 = new Float32Array(wasm.memory.buffer);
258
- }
259
- return cachegetFloat32Memory0;
260
- }
261
- /**
262
- * @param {Graph} graph
263
- * @param {Coordinates} coordinates
264
- * @param {Function} _length
265
- * @param {number} eps
266
- * @param {number} width
267
- * @param {number} height
268
- * @returns {any}
269
- */
270
- module.exports.kamadaKawai = function(graph, coordinates, _length, eps, width, height) {
271
- _assertClass(graph, Graph);
272
- _assertClass(coordinates, Coordinates);
273
- var ret = wasm.kamadaKawai(graph.ptr, coordinates.ptr, addHeapObject(_length), eps, width, height);
274
- return takeObject(ret);
275
- };
276
-
277
- function handleError(f, args) {
278
- try {
279
- return f.apply(this, args);
280
- } catch (e) {
281
- wasm.__wbindgen_exn_store(addHeapObject(e));
282
- }
283
- }
284
- /**
285
- */
286
- class CollideForce {
287
-
288
- static __wrap(ptr) {
289
- const obj = Object.create(CollideForce.prototype);
290
- obj.ptr = ptr;
291
-
292
- return obj;
293
- }
294
-
295
- __destroy_into_raw() {
296
- const ptr = this.ptr;
297
- this.ptr = 0;
298
-
299
- return ptr;
300
- }
301
-
302
- free() {
303
- const ptr = this.__destroy_into_raw();
304
- wasm.__wbg_collideforce_free(ptr);
305
- }
306
- /**
307
- * @param {Graph} graph
308
- * @param {Function} f
309
- * @param {any} options
310
- */
311
- constructor(graph, f, options) {
312
- try {
313
- _assertClass(graph, Graph);
314
- var ret = wasm.collideforce_new(graph.ptr, addBorrowedObject(f), addBorrowedObject(options));
315
- return CollideForce.__wrap(ret);
316
- } finally {
317
- heap[stack_pointer++] = undefined;
318
- heap[stack_pointer++] = undefined;
319
- }
320
- }
321
- /**
322
- * @param {Coordinates} context
323
- * @param {number} alpha
324
- */
325
- apply(context, alpha) {
326
- _assertClass(context, Coordinates);
327
- wasm.collideforce_apply(this.ptr, context.ptr, alpha);
328
- }
329
- }
330
- module.exports.CollideForce = CollideForce;
331
- /**
332
- */
333
- class Coordinates {
334
-
335
- static __wrap(ptr) {
336
- const obj = Object.create(Coordinates.prototype);
337
- obj.ptr = ptr;
338
-
339
- return obj;
340
- }
341
-
342
- __destroy_into_raw() {
343
- const ptr = this.ptr;
344
- this.ptr = 0;
345
-
346
- return ptr;
347
- }
348
-
349
- free() {
350
- const ptr = this.__destroy_into_raw();
351
- wasm.__wbg_coordinates_free(ptr);
352
- }
353
- /**
354
- * @param {number} u
355
- * @returns {number | undefined}
356
- */
357
- x(u) {
358
- try {
359
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
360
- wasm.coordinates_x(retptr, this.ptr, u);
361
- var r0 = getInt32Memory0()[retptr / 4 + 0];
362
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
363
- return r0 === 0 ? undefined : r1;
364
- } finally {
365
- wasm.__wbindgen_add_to_stack_pointer(16);
366
- }
367
- }
368
- /**
369
- * @param {number} u
370
- * @returns {number | undefined}
371
- */
372
- y(u) {
373
- try {
374
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
375
- wasm.coordinates_y(retptr, this.ptr, u);
376
- var r0 = getInt32Memory0()[retptr / 4 + 0];
377
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
378
- return r0 === 0 ? undefined : r1;
379
- } finally {
380
- wasm.__wbindgen_add_to_stack_pointer(16);
381
- }
382
- }
383
- /**
384
- * @param {number} u
385
- * @param {number} x
386
- */
387
- setX(u, x) {
388
- wasm.coordinates_setX(this.ptr, u, x);
389
- }
390
- /**
391
- * @param {number} u
392
- * @param {number} y
393
- */
394
- setY(u, y) {
395
- wasm.coordinates_setY(this.ptr, u, y);
396
- }
397
- /**
398
- * @param {number} u
399
- * @returns {number | undefined}
400
- */
401
- vx(u) {
402
- try {
403
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
404
- wasm.coordinates_vx(retptr, this.ptr, u);
405
- var r0 = getInt32Memory0()[retptr / 4 + 0];
406
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
407
- return r0 === 0 ? undefined : r1;
408
- } finally {
409
- wasm.__wbindgen_add_to_stack_pointer(16);
410
- }
411
- }
412
- /**
413
- * @param {number} u
414
- * @returns {number | undefined}
415
- */
416
- vy(u) {
417
- try {
418
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
419
- wasm.coordinates_vy(retptr, this.ptr, u);
420
- var r0 = getInt32Memory0()[retptr / 4 + 0];
421
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
422
- return r0 === 0 ? undefined : r1;
423
- } finally {
424
- wasm.__wbindgen_add_to_stack_pointer(16);
425
- }
426
- }
427
- /**
428
- * @returns {number}
429
- */
430
- len() {
431
- var ret = wasm.coordinates_len(this.ptr);
432
- return ret >>> 0;
433
- }
434
- /**
435
- * @returns {any}
436
- */
437
- toJSON() {
438
- var ret = wasm.coordinates_toJSON(this.ptr);
439
- return takeObject(ret);
440
- }
441
- /**
442
- */
443
- centralize() {
444
- wasm.coordinates_centralize(this.ptr);
445
- }
446
- /**
447
- * @param {number} velocity_decay
448
- */
449
- updatePosition(velocity_decay) {
450
- wasm.coordinates_updatePosition(this.ptr, velocity_decay);
451
- }
452
- /**
453
- * @param {number} x0
454
- * @param {number} y0
455
- * @param {number} x1
456
- * @param {number} y1
457
- */
458
- clampRegion(x0, y0, x1, y1) {
459
- wasm.coordinates_clampRegion(this.ptr, x0, y0, x1, y1);
460
- }
461
- /**
462
- * @param {Graph} graph
463
- * @returns {Coordinates}
464
- */
465
- static initialPlacement(graph) {
466
- _assertClass(graph, Graph);
467
- var ret = wasm.coordinates_initialPlacement(graph.ptr);
468
- return Coordinates.__wrap(ret);
469
- }
470
- }
471
- module.exports.Coordinates = Coordinates;
472
- /**
473
- */
474
- class FruchtermanReingoldForce {
475
-
476
- static __wrap(ptr) {
477
- const obj = Object.create(FruchtermanReingoldForce.prototype);
478
- obj.ptr = ptr;
479
-
480
- return obj;
481
- }
482
-
483
- __destroy_into_raw() {
484
- const ptr = this.ptr;
485
- this.ptr = 0;
486
-
487
- return ptr;
488
- }
489
-
490
- free() {
491
- const ptr = this.__destroy_into_raw();
492
- wasm.__wbg_fruchtermanreingoldforce_free(ptr);
493
- }
494
- /**
495
- * @param {Graph} graph
496
- * @param {number} k
497
- * @param {number} min_distance
498
- */
499
- constructor(graph, k, min_distance) {
500
- _assertClass(graph, Graph);
501
- var ret = wasm.fruchtermanreingoldforce_new(graph.ptr, k, min_distance);
502
- return FruchtermanReingoldForce.__wrap(ret);
503
- }
504
- /**
505
- * @param {Coordinates} coordinates
506
- * @param {number} alpha
507
- */
508
- apply(coordinates, alpha) {
509
- _assertClass(coordinates, Coordinates);
510
- wasm.fruchtermanreingoldforce_apply(this.ptr, coordinates.ptr, alpha);
511
- }
512
- /**
513
- * @param {number} u
514
- * @param {Coordinates} coordinates
515
- * @param {number} alpha
516
- */
517
- applyToNode(u, coordinates, alpha) {
518
- _assertClass(coordinates, Coordinates);
519
- wasm.fruchtermanreingoldforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
520
- }
521
- }
522
- module.exports.FruchtermanReingoldForce = FruchtermanReingoldForce;
523
- /**
524
- */
525
- class Graph {
526
-
527
- static __wrap(ptr) {
528
- const obj = Object.create(Graph.prototype);
529
- obj.ptr = ptr;
530
-
531
- return obj;
532
- }
533
-
534
- __destroy_into_raw() {
535
- const ptr = this.ptr;
536
- this.ptr = 0;
537
-
538
- return ptr;
539
- }
540
-
541
- free() {
542
- const ptr = this.__destroy_into_raw();
543
- wasm.__wbg_graph_free(ptr);
544
- }
545
- /**
546
- */
547
- constructor() {
548
- var ret = wasm.graph_new();
549
- return Graph.__wrap(ret);
550
- }
551
- /**
552
- * @returns {number}
553
- */
554
- nodeCount() {
555
- var ret = wasm.graph_nodeCount(this.ptr);
556
- return ret >>> 0;
557
- }
558
- /**
559
- * @returns {number}
560
- */
561
- edgeCount() {
562
- var ret = wasm.graph_edgeCount(this.ptr);
563
- return ret >>> 0;
564
- }
565
- /**
566
- * @param {any} value
567
- * @returns {number}
568
- */
569
- addNode(value) {
570
- var ret = wasm.graph_addNode(this.ptr, addHeapObject(value));
571
- return ret >>> 0;
572
- }
573
- /**
574
- * @param {number} a
575
- * @returns {any}
576
- */
577
- nodeWeight(a) {
578
- var ret = wasm.graph_nodeWeight(this.ptr, a);
579
- return takeObject(ret);
580
- }
581
- /**
582
- * @param {number} a
583
- * @param {number} b
584
- * @param {any} value
585
- * @returns {number}
586
- */
587
- addEdge(a, b, value) {
588
- var ret = wasm.graph_addEdge(this.ptr, a, b, addHeapObject(value));
589
- return ret >>> 0;
590
- }
591
- /**
592
- * @param {number} e
593
- * @returns {any}
594
- */
595
- edgeWeight(e) {
596
- var ret = wasm.graph_edgeWeight(this.ptr, e);
597
- return takeObject(ret);
598
- }
599
- /**
600
- * @param {number} e
601
- * @returns {Array<any>}
602
- */
603
- edgeEndpoints(e) {
604
- var ret = wasm.graph_edgeEndpoints(this.ptr, e);
605
- return takeObject(ret);
606
- }
607
- /**
608
- * @param {number} a
609
- * @returns {any}
610
- */
611
- removeNode(a) {
612
- var ret = wasm.graph_removeNode(this.ptr, a);
613
- return takeObject(ret);
614
- }
615
- /**
616
- * @param {number} e
617
- * @returns {any}
618
- */
619
- removeEdge(e) {
620
- var ret = wasm.graph_removeEdge(this.ptr, e);
621
- return takeObject(ret);
622
- }
623
- /**
624
- * @param {number} a
625
- * @returns {Array<any>}
626
- */
627
- neighbors(a) {
628
- var ret = wasm.graph_neighbors(this.ptr, a);
629
- return takeObject(ret);
630
- }
631
- /**
632
- * @param {number} a
633
- * @param {number} dir
634
- * @returns {Array<any>}
635
- */
636
- neighborsDirected(a, dir) {
637
- var ret = wasm.graph_neighborsDirected(this.ptr, a, dir);
638
- return takeObject(ret);
639
- }
640
- /**
641
- * @param {number} a
642
- * @returns {Array<any>}
643
- */
644
- neighborsUndirected(a) {
645
- var ret = wasm.graph_neighborsUndirected(this.ptr, a);
646
- return takeObject(ret);
647
- }
648
- /**
649
- * @param {number} a
650
- * @returns {Array<any>}
651
- */
652
- edges(a) {
653
- var ret = wasm.graph_edges(this.ptr, a);
654
- return takeObject(ret);
655
- }
656
- /**
657
- * @param {number} a
658
- * @param {number} b
659
- * @returns {boolean}
660
- */
661
- containsEdge(a, b) {
662
- var ret = wasm.graph_containsEdge(this.ptr, a, b);
663
- return ret !== 0;
664
- }
665
- /**
666
- * @param {number} a
667
- * @param {number} b
668
- * @returns {number}
669
- */
670
- findEdge(a, b) {
671
- var ret = wasm.graph_findEdge(this.ptr, a, b);
672
- return ret >>> 0;
673
- }
674
- /**
675
- * @param {number} dir
676
- * @returns {Array<any>}
677
- */
678
- externals(dir) {
679
- var ret = wasm.graph_externals(this.ptr, dir);
680
- return takeObject(ret);
681
- }
682
- /**
683
- * @returns {Array<any>}
684
- */
685
- nodeIndices() {
686
- var ret = wasm.graph_nodeIndices(this.ptr);
687
- return takeObject(ret);
688
- }
689
- /**
690
- * @returns {Array<any>}
691
- */
692
- edgeIndices() {
693
- var ret = wasm.graph_edgeIndices(this.ptr);
694
- return takeObject(ret);
695
- }
696
- /**
697
- * @param {Function} node_map
698
- * @param {Function} edge_map
699
- * @returns {Graph}
700
- */
701
- map(node_map, edge_map) {
702
- try {
703
- var ret = wasm.graph_map(this.ptr, addBorrowedObject(node_map), addBorrowedObject(edge_map));
704
- return Graph.__wrap(ret);
705
- } finally {
706
- heap[stack_pointer++] = undefined;
707
- heap[stack_pointer++] = undefined;
708
- }
709
- }
710
- /**
711
- * @param {Function} node_map
712
- * @param {Function} edge_map
713
- * @returns {Graph}
714
- */
715
- filterMap(node_map, edge_map) {
716
- try {
717
- var ret = wasm.graph_filterMap(this.ptr, addBorrowedObject(node_map), addBorrowedObject(edge_map));
718
- return Graph.__wrap(ret);
719
- } finally {
720
- heap[stack_pointer++] = undefined;
721
- heap[stack_pointer++] = undefined;
722
- }
723
- }
724
- }
725
- module.exports.Graph = Graph;
726
- /**
727
- */
728
- class GroupLinkForce {
729
-
730
- static __wrap(ptr) {
731
- const obj = Object.create(GroupLinkForce.prototype);
732
- obj.ptr = ptr;
733
-
734
- return obj;
735
- }
736
-
737
- __destroy_into_raw() {
738
- const ptr = this.ptr;
739
- this.ptr = 0;
740
-
741
- return ptr;
742
- }
743
-
744
- free() {
745
- const ptr = this.__destroy_into_raw();
746
- wasm.__wbg_grouplinkforce_free(ptr);
747
- }
748
- /**
749
- * @param {Graph} graph
750
- * @param {Function} group_accessor
751
- * @param {Function} inter_link_accessor
752
- * @param {Function} intra_link_accessor
753
- */
754
- constructor(graph, group_accessor, inter_link_accessor, intra_link_accessor) {
755
- try {
756
- _assertClass(graph, Graph);
757
- var ret = wasm.grouplinkforce_new(graph.ptr, addBorrowedObject(group_accessor), addBorrowedObject(inter_link_accessor), addBorrowedObject(intra_link_accessor));
758
- return GroupLinkForce.__wrap(ret);
759
- } finally {
760
- heap[stack_pointer++] = undefined;
761
- heap[stack_pointer++] = undefined;
762
- heap[stack_pointer++] = undefined;
763
- }
764
- }
765
- /**
766
- * @param {Coordinates} coordinates
767
- * @param {number} alpha
768
- */
769
- apply(coordinates, alpha) {
770
- _assertClass(coordinates, Coordinates);
771
- wasm.grouplinkforce_apply(this.ptr, coordinates.ptr, alpha);
772
- }
773
- }
774
- module.exports.GroupLinkForce = GroupLinkForce;
775
- /**
776
- */
777
- class GroupManyBodyForce {
778
-
779
- static __wrap(ptr) {
780
- const obj = Object.create(GroupManyBodyForce.prototype);
781
- obj.ptr = ptr;
782
-
783
- return obj;
784
- }
785
-
786
- __destroy_into_raw() {
787
- const ptr = this.ptr;
788
- this.ptr = 0;
789
-
790
- return ptr;
791
- }
792
-
793
- free() {
794
- const ptr = this.__destroy_into_raw();
795
- wasm.__wbg_groupmanybodyforce_free(ptr);
796
- }
797
- /**
798
- * @param {Graph} graph
799
- * @param {Function} node_accessor
800
- */
801
- constructor(graph, node_accessor) {
802
- try {
803
- _assertClass(graph, Graph);
804
- var ret = wasm.groupmanybodyforce_new(graph.ptr, addBorrowedObject(node_accessor));
805
- return GroupManyBodyForce.__wrap(ret);
806
- } finally {
807
- heap[stack_pointer++] = undefined;
808
- }
809
- }
810
- /**
811
- * @param {Coordinates} coordinates
812
- * @param {number} alpha
813
- */
814
- apply(coordinates, alpha) {
815
- _assertClass(coordinates, Coordinates);
816
- wasm.groupmanybodyforce_apply(this.ptr, coordinates.ptr, alpha);
817
- }
818
- }
819
- module.exports.GroupManyBodyForce = GroupManyBodyForce;
820
- /**
821
- */
822
- class GroupPositionForce {
823
-
824
- static __wrap(ptr) {
825
- const obj = Object.create(GroupPositionForce.prototype);
826
- obj.ptr = ptr;
827
-
828
- return obj;
829
- }
830
-
831
- __destroy_into_raw() {
832
- const ptr = this.ptr;
833
- this.ptr = 0;
834
-
835
- return ptr;
836
- }
837
-
838
- free() {
839
- const ptr = this.__destroy_into_raw();
840
- wasm.__wbg_grouppositionforce_free(ptr);
841
- }
842
- /**
843
- * @param {Graph} graph
844
- * @param {Function} node_accessor
845
- * @param {Function} group_accessor
846
- */
847
- constructor(graph, node_accessor, group_accessor) {
848
- try {
849
- _assertClass(graph, Graph);
850
- var ret = wasm.grouppositionforce_new(graph.ptr, addBorrowedObject(node_accessor), addBorrowedObject(group_accessor));
851
- return GroupPositionForce.__wrap(ret);
852
- } finally {
853
- heap[stack_pointer++] = undefined;
854
- heap[stack_pointer++] = undefined;
855
- }
856
- }
857
- /**
858
- * @param {Coordinates} coordinates
859
- * @param {number} alpha
860
- */
861
- apply(coordinates, alpha) {
862
- _assertClass(coordinates, Coordinates);
863
- wasm.grouppositionforce_apply(this.ptr, coordinates.ptr, alpha);
864
- }
865
- }
866
- module.exports.GroupPositionForce = GroupPositionForce;
867
- /**
868
- */
869
- class HyperbolicSpace {
870
-
871
- __destroy_into_raw() {
872
- const ptr = this.ptr;
873
- this.ptr = 0;
874
-
875
- return ptr;
876
- }
877
-
878
- free() {
879
- const ptr = this.__destroy_into_raw();
880
- wasm.__wbg_hyperbolicspace_free(ptr);
881
- }
882
- /**
883
- * @param {any} a
884
- * @param {any} b
885
- * @returns {any}
886
- */
887
- static toTangentSpace(a, b) {
888
- var ret = wasm.hyperbolicspace_toTangentSpace(addHeapObject(a), addHeapObject(b));
889
- return takeObject(ret);
890
- }
891
- /**
892
- * @param {any} a
893
- * @param {any} b
894
- * @returns {any}
895
- */
896
- static fromTangentSpace(a, b) {
897
- var ret = wasm.hyperbolicspace_fromTangentSpace(addHeapObject(a), addHeapObject(b));
898
- return takeObject(ret);
899
- }
900
- /**
901
- * @param {number} i
902
- * @param {Coordinates} riemann_space
903
- * @param {Coordinates} tangent_space
904
- */
905
- static mapToTangentSpace(i, riemann_space, tangent_space) {
906
- _assertClass(riemann_space, Coordinates);
907
- _assertClass(tangent_space, Coordinates);
908
- wasm.hyperbolicspace_mapToTangentSpace(i, riemann_space.ptr, tangent_space.ptr);
909
- }
910
- /**
911
- * @param {number} i
912
- * @param {Coordinates} riemann_space
913
- * @param {Coordinates} tangent_space
914
- * @param {number} velocity_decay
915
- */
916
- static updatePosition(i, riemann_space, tangent_space, velocity_decay) {
917
- _assertClass(riemann_space, Coordinates);
918
- _assertClass(tangent_space, Coordinates);
919
- wasm.hyperbolicspace_updatePosition(i, riemann_space.ptr, tangent_space.ptr, velocity_decay);
920
- }
921
- }
922
- module.exports.HyperbolicSpace = HyperbolicSpace;
923
- /**
924
- */
925
- class KamadaKawai {
926
-
927
- static __wrap(ptr) {
928
- const obj = Object.create(KamadaKawai.prototype);
929
- obj.ptr = ptr;
930
-
931
- return obj;
932
- }
933
-
934
- __destroy_into_raw() {
935
- const ptr = this.ptr;
936
- this.ptr = 0;
937
-
938
- return ptr;
939
- }
940
-
941
- free() {
942
- const ptr = this.__destroy_into_raw();
943
- wasm.__wbg_kamadakawai_free(ptr);
944
- }
945
- /**
946
- * @param {Graph} graph
947
- * @param {Function} f
948
- */
949
- constructor(graph, f) {
950
- try {
951
- _assertClass(graph, Graph);
952
- var ret = wasm.kamadakawai_new(graph.ptr, addBorrowedObject(f));
953
- return KamadaKawai.__wrap(ret);
954
- } finally {
955
- heap[stack_pointer++] = undefined;
956
- }
957
- }
958
- /**
959
- * @param {Coordinates} coordinates
960
- * @returns {number | undefined}
961
- */
962
- selectNode(coordinates) {
963
- try {
964
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
965
- _assertClass(coordinates, Coordinates);
966
- wasm.kamadakawai_selectNode(retptr, this.ptr, coordinates.ptr);
967
- var r0 = getInt32Memory0()[retptr / 4 + 0];
968
- var r1 = getInt32Memory0()[retptr / 4 + 1];
969
- return r0 === 0 ? undefined : r1 >>> 0;
970
- } finally {
971
- wasm.__wbindgen_add_to_stack_pointer(16);
972
- }
973
- }
974
- /**
975
- * @param {number} m
976
- * @param {Coordinates} coordinates
977
- */
978
- applyToNode(m, coordinates) {
979
- _assertClass(coordinates, Coordinates);
980
- wasm.kamadakawai_applyToNode(this.ptr, m, coordinates.ptr);
981
- }
982
- /**
983
- * @param {Coordinates} coordinates
984
- */
985
- run(coordinates) {
986
- _assertClass(coordinates, Coordinates);
987
- wasm.kamadakawai_run(this.ptr, coordinates.ptr);
988
- }
989
- }
990
- module.exports.KamadaKawai = KamadaKawai;
991
- /**
992
- */
993
- class LinkForce {
994
-
995
- static __wrap(ptr) {
996
- const obj = Object.create(LinkForce.prototype);
997
- obj.ptr = ptr;
998
-
999
- return obj;
1000
- }
1001
-
1002
- __destroy_into_raw() {
1003
- const ptr = this.ptr;
1004
- this.ptr = 0;
1005
-
1006
- return ptr;
1007
- }
1008
-
1009
- free() {
1010
- const ptr = this.__destroy_into_raw();
1011
- wasm.__wbg_linkforce_free(ptr);
1012
- }
1013
- /**
1014
- * @param {Graph} graph
1015
- * @param {Function} f
1016
- */
1017
- constructor(graph, f) {
1018
- try {
1019
- _assertClass(graph, Graph);
1020
- var ret = wasm.linkforce_new(graph.ptr, addBorrowedObject(f));
1021
- return LinkForce.__wrap(ret);
1022
- } finally {
1023
- heap[stack_pointer++] = undefined;
1024
- }
1025
- }
1026
- /**
1027
- * @param {Coordinates} coordinates
1028
- * @param {number} alpha
1029
- */
1030
- apply(coordinates, alpha) {
1031
- _assertClass(coordinates, Coordinates);
1032
- wasm.linkforce_apply(this.ptr, coordinates.ptr, alpha);
1033
- }
1034
- /**
1035
- * @param {number} u
1036
- * @param {Coordinates} coordinates
1037
- * @param {number} alpha
1038
- */
1039
- applyToNode(u, coordinates, alpha) {
1040
- _assertClass(coordinates, Coordinates);
1041
- wasm.linkforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1042
- }
1043
- }
1044
- module.exports.LinkForce = LinkForce;
1045
- /**
1046
- */
1047
- class ManyBodyForce {
1048
-
1049
- static __wrap(ptr) {
1050
- const obj = Object.create(ManyBodyForce.prototype);
1051
- obj.ptr = ptr;
1052
-
1053
- return obj;
1054
- }
1055
-
1056
- __destroy_into_raw() {
1057
- const ptr = this.ptr;
1058
- this.ptr = 0;
1059
-
1060
- return ptr;
1061
- }
1062
-
1063
- free() {
1064
- const ptr = this.__destroy_into_raw();
1065
- wasm.__wbg_manybodyforce_free(ptr);
1066
- }
1067
- /**
1068
- * @param {Graph} graph
1069
- * @param {Function} f
1070
- */
1071
- constructor(graph, f) {
1072
- try {
1073
- _assertClass(graph, Graph);
1074
- var ret = wasm.manybodyforce_new(graph.ptr, addBorrowedObject(f));
1075
- return ManyBodyForce.__wrap(ret);
1076
- } finally {
1077
- heap[stack_pointer++] = undefined;
1078
- }
1079
- }
1080
- /**
1081
- * @param {Coordinates} coordinates
1082
- * @param {number} alpha
1083
- */
1084
- apply(coordinates, alpha) {
1085
- _assertClass(coordinates, Coordinates);
1086
- wasm.manybodyforce_apply(this.ptr, coordinates.ptr, alpha);
1087
- }
1088
- /**
1089
- * @param {number} u
1090
- * @param {Coordinates} coordinates
1091
- * @param {number} alpha
1092
- */
1093
- applyToNode(u, coordinates, alpha) {
1094
- _assertClass(coordinates, Coordinates);
1095
- wasm.manybodyforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1096
- }
1097
- }
1098
- module.exports.ManyBodyForce = ManyBodyForce;
1099
- /**
1100
- */
1101
- class PositionForce {
1102
-
1103
- static __wrap(ptr) {
1104
- const obj = Object.create(PositionForce.prototype);
1105
- obj.ptr = ptr;
1106
-
1107
- return obj;
1108
- }
1109
-
1110
- __destroy_into_raw() {
1111
- const ptr = this.ptr;
1112
- this.ptr = 0;
1113
-
1114
- return ptr;
1115
- }
1116
-
1117
- free() {
1118
- const ptr = this.__destroy_into_raw();
1119
- wasm.__wbg_positionforce_free(ptr);
1120
- }
1121
- /**
1122
- * @param {Graph} graph
1123
- * @param {Function} f
1124
- */
1125
- constructor(graph, f) {
1126
- try {
1127
- _assertClass(graph, Graph);
1128
- var ret = wasm.positionforce_new(graph.ptr, addBorrowedObject(f));
1129
- return PositionForce.__wrap(ret);
1130
- } finally {
1131
- heap[stack_pointer++] = undefined;
1132
- }
1133
- }
1134
- /**
1135
- * @param {Coordinates} coordinates
1136
- * @param {number} alpha
1137
- */
1138
- apply(coordinates, alpha) {
1139
- _assertClass(coordinates, Coordinates);
1140
- wasm.positionforce_apply(this.ptr, coordinates.ptr, alpha);
1141
- }
1142
- /**
1143
- * @param {number} u
1144
- * @param {Coordinates} coordinates
1145
- * @param {number} alpha
1146
- */
1147
- applyToNode(u, coordinates, alpha) {
1148
- _assertClass(coordinates, Coordinates);
1149
- wasm.positionforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1150
- }
1151
- }
1152
- module.exports.PositionForce = PositionForce;
1153
- /**
1154
- */
1155
- class RadialForce {
1156
-
1157
- static __wrap(ptr) {
1158
- const obj = Object.create(RadialForce.prototype);
1159
- obj.ptr = ptr;
1160
-
1161
- return obj;
1162
- }
1163
-
1164
- __destroy_into_raw() {
1165
- const ptr = this.ptr;
1166
- this.ptr = 0;
1167
-
1168
- return ptr;
1169
- }
1170
-
1171
- free() {
1172
- const ptr = this.__destroy_into_raw();
1173
- wasm.__wbg_radialforce_free(ptr);
1174
- }
1175
- /**
1176
- * @param {Graph} graph
1177
- * @param {Function} f
1178
- */
1179
- constructor(graph, f) {
1180
- _assertClass(graph, Graph);
1181
- var ret = wasm.radialforce_new(graph.ptr, addHeapObject(f));
1182
- return RadialForce.__wrap(ret);
1183
- }
1184
- /**
1185
- * @param {Coordinates} coordinates
1186
- * @param {number} alpha
1187
- */
1188
- apply(coordinates, alpha) {
1189
- _assertClass(coordinates, Coordinates);
1190
- wasm.radialforce_apply(this.ptr, coordinates.ptr, alpha);
1191
- }
1192
- /**
1193
- * @param {number} u
1194
- * @param {Coordinates} coordinates
1195
- * @param {number} alpha
1196
- */
1197
- applyToNode(u, coordinates, alpha) {
1198
- _assertClass(coordinates, Coordinates);
1199
- wasm.radialforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1200
- }
1201
- }
1202
- module.exports.RadialForce = RadialForce;
1203
- /**
1204
- */
1205
- class Simulation {
1206
-
1207
- static __wrap(ptr) {
1208
- const obj = Object.create(Simulation.prototype);
1209
- obj.ptr = ptr;
1210
-
1211
- return obj;
1212
- }
1213
-
1214
- __destroy_into_raw() {
1215
- const ptr = this.ptr;
1216
- this.ptr = 0;
1217
-
1218
- return ptr;
1219
- }
1220
-
1221
- free() {
1222
- const ptr = this.__destroy_into_raw();
1223
- wasm.__wbg_simulation_free(ptr);
1224
- }
1225
- /**
1226
- */
1227
- constructor() {
1228
- var ret = wasm.simulation_new();
1229
- return Simulation.__wrap(ret);
1230
- }
1231
- /**
1232
- * @param {Function} f
1233
- */
1234
- run(f) {
1235
- try {
1236
- wasm.simulation_run(this.ptr, addBorrowedObject(f));
1237
- } finally {
1238
- heap[stack_pointer++] = undefined;
1239
- }
1240
- }
1241
- /**
1242
- * @param {number} n
1243
- * @param {Function} f
1244
- */
1245
- runStep(n, f) {
1246
- try {
1247
- wasm.simulation_runStep(this.ptr, n, addBorrowedObject(f));
1248
- } finally {
1249
- heap[stack_pointer++] = undefined;
1250
- }
1251
- }
1252
- /**
1253
- * @returns {boolean}
1254
- */
1255
- isFinished() {
1256
- var ret = wasm.simulation_isFinished(this.ptr);
1257
- return ret !== 0;
1258
- }
1259
- /**
1260
- * @param {number} alpha_start
1261
- */
1262
- reset(alpha_start) {
1263
- wasm.simulation_reset(this.ptr, alpha_start);
1264
- }
1265
- /**
1266
- * @returns {number}
1267
- */
1268
- get alphaStart() {
1269
- var ret = wasm.simulation_alpha(this.ptr);
1270
- return ret;
1271
- }
1272
- /**
1273
- * @param {number} value
1274
- */
1275
- set alphaStart(value) {
1276
- wasm.simulation_set_alpha(this.ptr, value);
1277
- }
1278
- /**
1279
- * @returns {number}
1280
- */
1281
- get alphaMin() {
1282
- var ret = wasm.simulation_alpha_min(this.ptr);
1283
- return ret;
1284
- }
1285
- /**
1286
- * @param {number} value
1287
- */
1288
- set alphaMin(value) {
1289
- wasm.simulation_set_alpha_min(this.ptr, value);
1290
- }
1291
- /**
1292
- * @returns {number}
1293
- */
1294
- get alphaTarget() {
1295
- var ret = wasm.simulation_alpha_target(this.ptr);
1296
- return ret;
1297
- }
1298
- /**
1299
- * @param {number} value
1300
- */
1301
- set alphaTarget(value) {
1302
- wasm.simulation_set_alpha_target(this.ptr, value);
1303
- }
1304
- /**
1305
- * @returns {number}
1306
- */
1307
- get iterations() {
1308
- var ret = wasm.simulation_iterations(this.ptr);
1309
- return ret >>> 0;
1310
- }
1311
- /**
1312
- * @param {number} value
1313
- */
1314
- set iterations(value) {
1315
- wasm.simulation_set_iterations(this.ptr, value);
1316
- }
1317
- }
1318
- module.exports.Simulation = Simulation;
1319
- /**
1320
- */
1321
- class SphericalSpace {
1322
-
1323
- __destroy_into_raw() {
1324
- const ptr = this.ptr;
1325
- this.ptr = 0;
1326
-
1327
- return ptr;
1328
- }
1329
-
1330
- free() {
1331
- const ptr = this.__destroy_into_raw();
1332
- wasm.__wbg_sphericalspace_free(ptr);
1333
- }
1334
- /**
1335
- * @param {any} a
1336
- * @param {any} b
1337
- * @returns {any}
1338
- */
1339
- static toTangentSpace(a, b) {
1340
- var ret = wasm.sphericalspace_toTangentSpace(addHeapObject(a), addHeapObject(b));
1341
- return takeObject(ret);
1342
- }
1343
- /**
1344
- * @param {any} a
1345
- * @param {any} b
1346
- * @returns {any}
1347
- */
1348
- static fromTangentSpace(a, b) {
1349
- var ret = wasm.sphericalspace_fromTangentSpace(addHeapObject(a), addHeapObject(b));
1350
- return takeObject(ret);
1351
- }
1352
- /**
1353
- * @param {number} i
1354
- * @param {Coordinates} riemann_space
1355
- * @param {Coordinates} tangent_space
1356
- */
1357
- static mapToTangentSpace(i, riemann_space, tangent_space) {
1358
- _assertClass(riemann_space, Coordinates);
1359
- _assertClass(tangent_space, Coordinates);
1360
- wasm.sphericalspace_mapToTangentSpace(i, riemann_space.ptr, tangent_space.ptr);
1361
- }
1362
- /**
1363
- * @param {number} i
1364
- * @param {Coordinates} riemann_space
1365
- * @param {Coordinates} tangent_space
1366
- * @param {number} velocity_decay
1367
- */
1368
- static updatePosition(i, riemann_space, tangent_space, velocity_decay) {
1369
- _assertClass(riemann_space, Coordinates);
1370
- _assertClass(tangent_space, Coordinates);
1371
- wasm.sphericalspace_updatePosition(i, riemann_space.ptr, tangent_space.ptr, velocity_decay);
1372
- }
1373
- }
1374
- module.exports.SphericalSpace = SphericalSpace;
1375
- /**
1376
- */
1377
- class StressMajorization {
1378
-
1379
- static __wrap(ptr) {
1380
- const obj = Object.create(StressMajorization.prototype);
1381
- obj.ptr = ptr;
1382
-
1383
- return obj;
1384
- }
1385
-
1386
- __destroy_into_raw() {
1387
- const ptr = this.ptr;
1388
- this.ptr = 0;
1389
-
1390
- return ptr;
1391
- }
1392
-
1393
- free() {
1394
- const ptr = this.__destroy_into_raw();
1395
- wasm.__wbg_stressmajorization_free(ptr);
1396
- }
1397
- /**
1398
- * @param {Graph} graph
1399
- * @param {Coordinates} coordinates
1400
- * @param {Function} f
1401
- */
1402
- constructor(graph, coordinates, f) {
1403
- try {
1404
- _assertClass(graph, Graph);
1405
- _assertClass(coordinates, Coordinates);
1406
- var ret = wasm.stressmajorization_new(graph.ptr, coordinates.ptr, addBorrowedObject(f));
1407
- return StressMajorization.__wrap(ret);
1408
- } finally {
1409
- heap[stack_pointer++] = undefined;
1410
- }
1411
- }
1412
- /**
1413
- * @param {Coordinates} coordinates
1414
- * @returns {number}
1415
- */
1416
- apply(coordinates) {
1417
- _assertClass(coordinates, Coordinates);
1418
- var ret = wasm.stressmajorization_apply(this.ptr, coordinates.ptr);
1419
- return ret;
1420
- }
1421
- /**
1422
- * @param {Coordinates} coordinates
1423
- */
1424
- run(coordinates) {
1425
- _assertClass(coordinates, Coordinates);
1426
- wasm.stressmajorization_run(this.ptr, coordinates.ptr);
1427
- }
1428
- }
1429
- module.exports.StressMajorization = StressMajorization;
1430
-
1431
- module.exports.__wbindgen_number_new = function(arg0) {
1432
- var ret = arg0;
1433
- return addHeapObject(ret);
1434
- };
1435
-
1436
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
1437
- takeObject(arg0);
1438
- };
1439
-
1440
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
1441
- var ret = getStringFromWasm0(arg0, arg1);
1442
- return addHeapObject(ret);
1443
- };
1444
-
1445
- module.exports.__wbindgen_number_get = function(arg0, arg1) {
1446
- const obj = getObject(arg1);
1447
- var ret = typeof(obj) === 'number' ? obj : undefined;
1448
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
1449
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
1450
- };
1451
-
1452
- module.exports.__wbg_graph_new = function(arg0) {
1453
- var ret = Graph.__wrap(arg0);
1454
- return addHeapObject(ret);
1455
- };
1456
-
1457
- module.exports.__wbindgen_json_parse = function(arg0, arg1) {
1458
- var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
1459
- return addHeapObject(ret);
1460
- };
1461
-
1462
- module.exports.__wbindgen_is_null = function(arg0) {
1463
- var ret = getObject(arg0) === null;
1464
- return ret;
1465
- };
1466
-
1467
- module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
1468
- const obj = getObject(arg1);
1469
- var ret = JSON.stringify(obj === undefined ? null : obj);
1470
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1471
- var len0 = WASM_VECTOR_LEN;
1472
- getInt32Memory0()[arg0 / 4 + 1] = len0;
1473
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
1474
- };
1475
-
1476
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
1477
- var ret = getObject(arg0);
1478
- return addHeapObject(ret);
1479
- };
1480
-
1481
- module.exports.__wbindgen_is_undefined = function(arg0) {
1482
- var ret = getObject(arg0) === undefined;
1483
- return ret;
1484
- };
1485
-
1486
- module.exports.__wbg_get_800098c980b31ea2 = function() { return handleError(function (arg0, arg1) {
1487
- var ret = Reflect.get(getObject(arg0), getObject(arg1));
1488
- return addHeapObject(ret);
1489
- }, arguments) };
1490
-
1491
- module.exports.__wbg_new_515b65a8e7699d00 = function() {
1492
- var ret = new Array();
1493
- return addHeapObject(ret);
1494
- };
1495
-
1496
- module.exports.__wbg_push_b7f68478f81d358b = function(arg0, arg1) {
1497
- var ret = getObject(arg0).push(getObject(arg1));
1498
- return ret;
1499
- };
1500
-
1501
- module.exports.__wbg_call_3fc07b7d5fc9022d = function() { return handleError(function (arg0, arg1, arg2) {
1502
- var ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1503
- return addHeapObject(ret);
1504
- }, arguments) };
1505
-
1506
- module.exports.__wbg_call_2c06c503c0d359bd = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1507
- var ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
1508
- return addHeapObject(ret);
1509
- }, arguments) };
1510
-
1511
- module.exports.__wbindgen_debug_string = function(arg0, arg1) {
1512
- var ret = debugString(getObject(arg1));
1513
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1514
- var len0 = WASM_VECTOR_LEN;
1515
- getInt32Memory0()[arg0 / 4 + 1] = len0;
1516
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
1517
- };
1518
-
1519
- module.exports.__wbindgen_throw = function(arg0, arg1) {
1520
- throw new Error(getStringFromWasm0(arg0, arg1));
1521
- };
1522
-
1523
- module.exports.__wbindgen_rethrow = function(arg0) {
1524
- throw takeObject(arg0);
1525
- };
1526
-
1527
- const path = require('path').join(__dirname, 'egraph_wasm_bg.wasm');
1528
- const bytes = require('fs').readFileSync(path);
1529
-
1530
- const wasmModule = new WebAssembly.Module(bytes);
1531
- const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
1532
- wasm = wasmInstance.exports;
1533
- module.exports.__wasm = wasm;
1534
-