egraph 6.0.0-alpha.3 → 6.0.0-alpha.5

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/umd/egraph.js DELETED
@@ -1,2771 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.egraph = {}));
5
- }(this, (function (exports) { 'use strict';
6
-
7
- let wasm;
8
-
9
- const heap = new Array(128).fill(undefined);
10
-
11
- heap.push(undefined, null, true, false);
12
-
13
- function getObject(idx) { return heap[idx]; }
14
-
15
- let heap_next = heap.length;
16
-
17
- function dropObject(idx) {
18
- if (idx < 132) return;
19
- heap[idx] = heap_next;
20
- heap_next = idx;
21
- }
22
-
23
- function takeObject(idx) {
24
- const ret = getObject(idx);
25
- dropObject(idx);
26
- return ret;
27
- }
28
-
29
- function addHeapObject(obj) {
30
- if (heap_next === heap.length) heap.push(heap.length + 1);
31
- const idx = heap_next;
32
- heap_next = heap[idx];
33
-
34
- heap[idx] = obj;
35
- return idx;
36
- }
37
-
38
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
39
-
40
- cachedTextDecoder.decode();
41
-
42
- let cachedUint8Memory0 = null;
43
-
44
- function getUint8Memory0() {
45
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
46
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
47
- }
48
- return cachedUint8Memory0;
49
- }
50
-
51
- function getStringFromWasm0(ptr, len) {
52
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
53
- }
54
-
55
- function isLikeNone(x) {
56
- return x === undefined || x === null;
57
- }
58
-
59
- let cachedFloat64Memory0 = null;
60
-
61
- function getFloat64Memory0() {
62
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
63
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
64
- }
65
- return cachedFloat64Memory0;
66
- }
67
-
68
- let cachedInt32Memory0 = null;
69
-
70
- function getInt32Memory0() {
71
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
72
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
73
- }
74
- return cachedInt32Memory0;
75
- }
76
-
77
- let WASM_VECTOR_LEN = 0;
78
-
79
- const cachedTextEncoder = new TextEncoder('utf-8');
80
-
81
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
82
- ? function (arg, view) {
83
- return cachedTextEncoder.encodeInto(arg, view);
84
- }
85
- : function (arg, view) {
86
- const buf = cachedTextEncoder.encode(arg);
87
- view.set(buf);
88
- return {
89
- read: arg.length,
90
- written: buf.length
91
- };
92
- });
93
-
94
- function passStringToWasm0(arg, malloc, realloc) {
95
-
96
- if (realloc === undefined) {
97
- const buf = cachedTextEncoder.encode(arg);
98
- const ptr = malloc(buf.length);
99
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
100
- WASM_VECTOR_LEN = buf.length;
101
- return ptr;
102
- }
103
-
104
- let len = arg.length;
105
- let ptr = malloc(len);
106
-
107
- const mem = getUint8Memory0();
108
-
109
- let offset = 0;
110
-
111
- for (; offset < len; offset++) {
112
- const code = arg.charCodeAt(offset);
113
- if (code > 0x7F) break;
114
- mem[ptr + offset] = code;
115
- }
116
-
117
- if (offset !== len) {
118
- if (offset !== 0) {
119
- arg = arg.slice(offset);
120
- }
121
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
122
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
123
- const ret = encodeString(arg, view);
124
-
125
- offset += ret.written;
126
- }
127
-
128
- WASM_VECTOR_LEN = offset;
129
- return ptr;
130
- }
131
-
132
- let cachedBigInt64Memory0 = null;
133
-
134
- function getBigInt64Memory0() {
135
- if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
136
- cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
137
- }
138
- return cachedBigInt64Memory0;
139
- }
140
-
141
- function debugString(val) {
142
- // primitive types
143
- const type = typeof val;
144
- if (type == 'number' || type == 'boolean' || val == null) {
145
- return `${val}`;
146
- }
147
- if (type == 'string') {
148
- return `"${val}"`;
149
- }
150
- if (type == 'symbol') {
151
- const description = val.description;
152
- if (description == null) {
153
- return 'Symbol';
154
- } else {
155
- return `Symbol(${description})`;
156
- }
157
- }
158
- if (type == 'function') {
159
- const name = val.name;
160
- if (typeof name == 'string' && name.length > 0) {
161
- return `Function(${name})`;
162
- } else {
163
- return 'Function';
164
- }
165
- }
166
- // objects
167
- if (Array.isArray(val)) {
168
- const length = val.length;
169
- let debug = '[';
170
- if (length > 0) {
171
- debug += debugString(val[0]);
172
- }
173
- for(let i = 1; i < length; i++) {
174
- debug += ', ' + debugString(val[i]);
175
- }
176
- debug += ']';
177
- return debug;
178
- }
179
- // Test for built-in
180
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
181
- let className;
182
- if (builtInMatches.length > 1) {
183
- className = builtInMatches[1];
184
- } else {
185
- // Failed to match the standard '[object ClassName]'
186
- return toString.call(val);
187
- }
188
- if (className == 'Object') {
189
- // we're a user defined class or Object
190
- // JSON.stringify avoids problems with cycles, and is generally much
191
- // easier than looping through ownProperties of `val`.
192
- try {
193
- return 'Object(' + JSON.stringify(val) + ')';
194
- } catch (_) {
195
- return 'Object';
196
- }
197
- }
198
- // errors
199
- if (val instanceof Error) {
200
- return `${val.name}: ${val.message}\n${val.stack}`;
201
- }
202
- // TODO we could test for more things here, like `Set`s and `Map`s.
203
- return className;
204
- }
205
-
206
- function _assertClass(instance, klass) {
207
- if (!(instance instanceof klass)) {
208
- throw new Error(`expected instance of ${klass.name}`);
209
- }
210
- return instance.ptr;
211
- }
212
- /**
213
- * @param {Graph} graph
214
- * @param {any} coordinates
215
- * @returns {any}
216
- */
217
- function fdeb(graph, coordinates) {
218
- _assertClass(graph, Graph);
219
- const ret = wasm.fdeb(graph.ptr, addHeapObject(coordinates));
220
- return takeObject(ret);
221
- }
222
-
223
- let cachedFloat32Memory0 = null;
224
-
225
- function getFloat32Memory0() {
226
- if (cachedFloat32Memory0 === null || cachedFloat32Memory0.byteLength === 0) {
227
- cachedFloat32Memory0 = new Float32Array(wasm.memory.buffer);
228
- }
229
- return cachedFloat32Memory0;
230
- }
231
-
232
- let stack_pointer = 128;
233
-
234
- function addBorrowedObject(obj) {
235
- if (stack_pointer == 1) throw new Error('out of js stack');
236
- heap[--stack_pointer] = obj;
237
- return stack_pointer;
238
- }
239
- /**
240
- * @param {Graph} graph
241
- * @param {Function} groups
242
- * @param {Function} shrink_node
243
- * @param {Function} shrink_edge
244
- * @returns {any}
245
- */
246
- function coarsen(graph, groups, shrink_node, shrink_edge) {
247
- try {
248
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
249
- _assertClass(graph, Graph);
250
- wasm.coarsen(retptr, graph.ptr, addBorrowedObject(groups), addBorrowedObject(shrink_node), addBorrowedObject(shrink_edge));
251
- var r0 = getInt32Memory0()[retptr / 4 + 0];
252
- var r1 = getInt32Memory0()[retptr / 4 + 1];
253
- var r2 = getInt32Memory0()[retptr / 4 + 2];
254
- if (r2) {
255
- throw takeObject(r1);
256
- }
257
- return takeObject(r0);
258
- } finally {
259
- wasm.__wbindgen_add_to_stack_pointer(16);
260
- heap[stack_pointer++] = undefined;
261
- heap[stack_pointer++] = undefined;
262
- heap[stack_pointer++] = undefined;
263
- }
264
- }
265
-
266
- /**
267
- * @param {Graph} graph
268
- * @param {Drawing} drawing
269
- * @returns {number}
270
- */
271
- function stress(graph, drawing) {
272
- _assertClass(graph, Graph);
273
- _assertClass(drawing, Drawing);
274
- const ret = wasm.stress(graph.ptr, drawing.ptr);
275
- return ret;
276
- }
277
-
278
- /**
279
- * @param {Graph} graph
280
- * @param {Drawing} drawing
281
- * @returns {number}
282
- */
283
- function crossingNumber(graph, drawing) {
284
- _assertClass(graph, Graph);
285
- _assertClass(drawing, Drawing);
286
- const ret = wasm.crossingNumber(graph.ptr, drawing.ptr);
287
- return ret;
288
- }
289
-
290
- /**
291
- * @param {Graph} graph
292
- * @param {Drawing} drawing
293
- * @returns {number}
294
- */
295
- function neighborhoodPreservation(graph, drawing) {
296
- _assertClass(graph, Graph);
297
- _assertClass(drawing, Drawing);
298
- const ret = wasm.neighborhoodPreservation(graph.ptr, drawing.ptr);
299
- return ret;
300
- }
301
-
302
- /**
303
- * @param {Graph} graph
304
- * @param {number} min_size
305
- * @param {number} step_iteration
306
- * @param {Function} _shrink_node
307
- * @param {Function} _shrink_edge
308
- * @param {Function} _link_distance_accessor
309
- * @returns {Coordinates}
310
- */
311
- function fm3(graph, min_size, step_iteration, _shrink_node, _shrink_edge, _link_distance_accessor) {
312
- _assertClass(graph, Graph);
313
- const ret = wasm.fm3(graph.ptr, min_size, step_iteration, addHeapObject(_shrink_node), addHeapObject(_shrink_edge), addHeapObject(_link_distance_accessor));
314
- return Coordinates.__wrap(ret);
315
- }
316
-
317
- function handleError(f, args) {
318
- try {
319
- return f.apply(this, args);
320
- } catch (e) {
321
- wasm.__wbindgen_exn_store(addHeapObject(e));
322
- }
323
- }
324
-
325
- function getArrayU8FromWasm0(ptr, len) {
326
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
327
- }
328
- /**
329
- */
330
- class ClassicalMds {
331
-
332
- static __wrap(ptr) {
333
- const obj = Object.create(ClassicalMds.prototype);
334
- obj.ptr = ptr;
335
-
336
- return obj;
337
- }
338
-
339
- __destroy_into_raw() {
340
- const ptr = this.ptr;
341
- this.ptr = 0;
342
-
343
- return ptr;
344
- }
345
-
346
- free() {
347
- const ptr = this.__destroy_into_raw();
348
- wasm.__wbg_classicalmds_free(ptr);
349
- }
350
- /**
351
- */
352
- constructor() {
353
- const ret = wasm.classicalmds_new();
354
- return ClassicalMds.__wrap(ret);
355
- }
356
- /**
357
- * @param {Graph} graph
358
- * @param {Function} length
359
- * @returns {Drawing}
360
- */
361
- run(graph, length) {
362
- try {
363
- _assertClass(graph, Graph);
364
- const ret = wasm.classicalmds_run(this.ptr, graph.ptr, addBorrowedObject(length));
365
- return Drawing.__wrap(ret);
366
- } finally {
367
- heap[stack_pointer++] = undefined;
368
- }
369
- }
370
- }
371
- /**
372
- */
373
- class CollideForce {
374
-
375
- static __wrap(ptr) {
376
- const obj = Object.create(CollideForce.prototype);
377
- obj.ptr = ptr;
378
-
379
- return obj;
380
- }
381
-
382
- __destroy_into_raw() {
383
- const ptr = this.ptr;
384
- this.ptr = 0;
385
-
386
- return ptr;
387
- }
388
-
389
- free() {
390
- const ptr = this.__destroy_into_raw();
391
- wasm.__wbg_collideforce_free(ptr);
392
- }
393
- /**
394
- * @param {Graph} graph
395
- * @param {Function} f
396
- * @param {any} options
397
- */
398
- constructor(graph, f, options) {
399
- try {
400
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
401
- _assertClass(graph, Graph);
402
- wasm.collideforce_new(retptr, graph.ptr, addBorrowedObject(f), addBorrowedObject(options));
403
- var r0 = getInt32Memory0()[retptr / 4 + 0];
404
- var r1 = getInt32Memory0()[retptr / 4 + 1];
405
- var r2 = getInt32Memory0()[retptr / 4 + 2];
406
- if (r2) {
407
- throw takeObject(r1);
408
- }
409
- return CollideForce.__wrap(r0);
410
- } finally {
411
- wasm.__wbindgen_add_to_stack_pointer(16);
412
- heap[stack_pointer++] = undefined;
413
- heap[stack_pointer++] = undefined;
414
- }
415
- }
416
- /**
417
- * @param {Coordinates} context
418
- * @param {number} alpha
419
- */
420
- apply(context, alpha) {
421
- _assertClass(context, Coordinates);
422
- wasm.collideforce_apply(this.ptr, context.ptr, alpha);
423
- }
424
- }
425
- /**
426
- */
427
- class Coordinates {
428
-
429
- static __wrap(ptr) {
430
- const obj = Object.create(Coordinates.prototype);
431
- obj.ptr = ptr;
432
-
433
- return obj;
434
- }
435
-
436
- __destroy_into_raw() {
437
- const ptr = this.ptr;
438
- this.ptr = 0;
439
-
440
- return ptr;
441
- }
442
-
443
- free() {
444
- const ptr = this.__destroy_into_raw();
445
- wasm.__wbg_coordinates_free(ptr);
446
- }
447
- /**
448
- * @param {number} u
449
- * @returns {number | undefined}
450
- */
451
- x(u) {
452
- try {
453
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
454
- wasm.coordinates_x(retptr, this.ptr, u);
455
- var r0 = getInt32Memory0()[retptr / 4 + 0];
456
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
457
- return r0 === 0 ? undefined : r1;
458
- } finally {
459
- wasm.__wbindgen_add_to_stack_pointer(16);
460
- }
461
- }
462
- /**
463
- * @param {number} u
464
- * @returns {number | undefined}
465
- */
466
- y(u) {
467
- try {
468
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
469
- wasm.coordinates_y(retptr, this.ptr, u);
470
- var r0 = getInt32Memory0()[retptr / 4 + 0];
471
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
472
- return r0 === 0 ? undefined : r1;
473
- } finally {
474
- wasm.__wbindgen_add_to_stack_pointer(16);
475
- }
476
- }
477
- /**
478
- * @param {number} u
479
- * @param {number} x
480
- */
481
- setX(u, x) {
482
- wasm.coordinates_setX(this.ptr, u, x);
483
- }
484
- /**
485
- * @param {number} u
486
- * @param {number} y
487
- */
488
- setY(u, y) {
489
- wasm.coordinates_setY(this.ptr, u, y);
490
- }
491
- /**
492
- * @param {number} u
493
- * @returns {number | undefined}
494
- */
495
- vx(u) {
496
- try {
497
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
498
- wasm.coordinates_vx(retptr, this.ptr, u);
499
- var r0 = getInt32Memory0()[retptr / 4 + 0];
500
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
501
- return r0 === 0 ? undefined : r1;
502
- } finally {
503
- wasm.__wbindgen_add_to_stack_pointer(16);
504
- }
505
- }
506
- /**
507
- * @param {number} u
508
- * @returns {number | undefined}
509
- */
510
- vy(u) {
511
- try {
512
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
513
- wasm.coordinates_vy(retptr, this.ptr, u);
514
- var r0 = getInt32Memory0()[retptr / 4 + 0];
515
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
516
- return r0 === 0 ? undefined : r1;
517
- } finally {
518
- wasm.__wbindgen_add_to_stack_pointer(16);
519
- }
520
- }
521
- /**
522
- * @returns {number}
523
- */
524
- len() {
525
- const ret = wasm.coordinates_len(this.ptr);
526
- return ret >>> 0;
527
- }
528
- /**
529
- * @returns {any}
530
- */
531
- toJSON() {
532
- const ret = wasm.coordinates_toJSON(this.ptr);
533
- return takeObject(ret);
534
- }
535
- /**
536
- */
537
- centralize() {
538
- wasm.coordinates_centralize(this.ptr);
539
- }
540
- /**
541
- * @param {number} velocity_decay
542
- */
543
- updatePosition(velocity_decay) {
544
- wasm.coordinates_updatePosition(this.ptr, velocity_decay);
545
- }
546
- /**
547
- * @param {number} x0
548
- * @param {number} y0
549
- * @param {number} x1
550
- * @param {number} y1
551
- */
552
- clampRegion(x0, y0, x1, y1) {
553
- wasm.coordinates_clampRegion(this.ptr, x0, y0, x1, y1);
554
- }
555
- /**
556
- * @param {Graph} graph
557
- * @returns {Coordinates}
558
- */
559
- static initialPlacement(graph) {
560
- _assertClass(graph, Graph);
561
- const ret = wasm.coordinates_initialPlacement(graph.ptr);
562
- return Coordinates.__wrap(ret);
563
- }
564
- }
565
- /**
566
- */
567
- class DiGraph {
568
-
569
- static __wrap(ptr) {
570
- const obj = Object.create(DiGraph.prototype);
571
- obj.ptr = ptr;
572
-
573
- return obj;
574
- }
575
-
576
- __destroy_into_raw() {
577
- const ptr = this.ptr;
578
- this.ptr = 0;
579
-
580
- return ptr;
581
- }
582
-
583
- free() {
584
- const ptr = this.__destroy_into_raw();
585
- wasm.__wbg_digraph_free(ptr);
586
- }
587
- /**
588
- */
589
- constructor() {
590
- const ret = wasm.digraph_new();
591
- return DiGraph.__wrap(ret);
592
- }
593
- /**
594
- * @returns {number}
595
- */
596
- nodeCount() {
597
- const ret = wasm.digraph_nodeCount(this.ptr);
598
- return ret >>> 0;
599
- }
600
- /**
601
- * @returns {number}
602
- */
603
- edgeCount() {
604
- const ret = wasm.digraph_edgeCount(this.ptr);
605
- return ret >>> 0;
606
- }
607
- /**
608
- * @param {any} value
609
- * @returns {number}
610
- */
611
- addNode(value) {
612
- const ret = wasm.digraph_addNode(this.ptr, addHeapObject(value));
613
- return ret >>> 0;
614
- }
615
- /**
616
- * @param {number} a
617
- * @returns {any}
618
- */
619
- nodeWeight(a) {
620
- try {
621
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
622
- wasm.digraph_nodeWeight(retptr, this.ptr, a);
623
- var r0 = getInt32Memory0()[retptr / 4 + 0];
624
- var r1 = getInt32Memory0()[retptr / 4 + 1];
625
- var r2 = getInt32Memory0()[retptr / 4 + 2];
626
- if (r2) {
627
- throw takeObject(r1);
628
- }
629
- return takeObject(r0);
630
- } finally {
631
- wasm.__wbindgen_add_to_stack_pointer(16);
632
- }
633
- }
634
- /**
635
- * @param {number} a
636
- * @param {number} b
637
- * @param {any} value
638
- * @returns {number}
639
- */
640
- addEdge(a, b, value) {
641
- const ret = wasm.digraph_addEdge(this.ptr, a, b, addHeapObject(value));
642
- return ret >>> 0;
643
- }
644
- /**
645
- * @param {number} e
646
- * @returns {any}
647
- */
648
- edgeWeight(e) {
649
- try {
650
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
651
- wasm.digraph_edgeWeight(retptr, this.ptr, e);
652
- var r0 = getInt32Memory0()[retptr / 4 + 0];
653
- var r1 = getInt32Memory0()[retptr / 4 + 1];
654
- var r2 = getInt32Memory0()[retptr / 4 + 2];
655
- if (r2) {
656
- throw takeObject(r1);
657
- }
658
- return takeObject(r0);
659
- } finally {
660
- wasm.__wbindgen_add_to_stack_pointer(16);
661
- }
662
- }
663
- /**
664
- * @param {number} e
665
- * @returns {Array<any>}
666
- */
667
- edgeEndpoints(e) {
668
- try {
669
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
670
- wasm.digraph_edgeEndpoints(retptr, this.ptr, e);
671
- var r0 = getInt32Memory0()[retptr / 4 + 0];
672
- var r1 = getInt32Memory0()[retptr / 4 + 1];
673
- var r2 = getInt32Memory0()[retptr / 4 + 2];
674
- if (r2) {
675
- throw takeObject(r1);
676
- }
677
- return takeObject(r0);
678
- } finally {
679
- wasm.__wbindgen_add_to_stack_pointer(16);
680
- }
681
- }
682
- /**
683
- * @param {number} a
684
- * @returns {any}
685
- */
686
- removeNode(a) {
687
- try {
688
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
689
- wasm.digraph_removeNode(retptr, this.ptr, a);
690
- var r0 = getInt32Memory0()[retptr / 4 + 0];
691
- var r1 = getInt32Memory0()[retptr / 4 + 1];
692
- var r2 = getInt32Memory0()[retptr / 4 + 2];
693
- if (r2) {
694
- throw takeObject(r1);
695
- }
696
- return takeObject(r0);
697
- } finally {
698
- wasm.__wbindgen_add_to_stack_pointer(16);
699
- }
700
- }
701
- /**
702
- * @param {number} e
703
- * @returns {any}
704
- */
705
- removeEdge(e) {
706
- try {
707
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
708
- wasm.digraph_removeEdge(retptr, this.ptr, e);
709
- var r0 = getInt32Memory0()[retptr / 4 + 0];
710
- var r1 = getInt32Memory0()[retptr / 4 + 1];
711
- var r2 = getInt32Memory0()[retptr / 4 + 2];
712
- if (r2) {
713
- throw takeObject(r1);
714
- }
715
- return takeObject(r0);
716
- } finally {
717
- wasm.__wbindgen_add_to_stack_pointer(16);
718
- }
719
- }
720
- /**
721
- * @param {number} a
722
- * @returns {Array<any>}
723
- */
724
- neighbors(a) {
725
- const ret = wasm.digraph_neighbors(this.ptr, a);
726
- return takeObject(ret);
727
- }
728
- /**
729
- * @param {number} a
730
- * @param {number} dir
731
- * @returns {Array<any>}
732
- */
733
- neighborsDirected(a, dir) {
734
- const ret = wasm.digraph_neighborsDirected(this.ptr, a, dir);
735
- return takeObject(ret);
736
- }
737
- /**
738
- * @param {number} a
739
- * @returns {Array<any>}
740
- */
741
- neighborsUndirected(a) {
742
- const ret = wasm.digraph_neighborsUndirected(this.ptr, a);
743
- return takeObject(ret);
744
- }
745
- /**
746
- * @param {number} a
747
- * @returns {Array<any>}
748
- */
749
- edges(a) {
750
- const ret = wasm.digraph_edges(this.ptr, a);
751
- return takeObject(ret);
752
- }
753
- /**
754
- * @param {number} a
755
- * @param {number} b
756
- * @returns {boolean}
757
- */
758
- containsEdge(a, b) {
759
- const ret = wasm.digraph_containsEdge(this.ptr, a, b);
760
- return ret !== 0;
761
- }
762
- /**
763
- * @param {number} a
764
- * @param {number} b
765
- * @returns {number}
766
- */
767
- findEdge(a, b) {
768
- try {
769
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
770
- wasm.digraph_findEdge(retptr, this.ptr, a, b);
771
- var r0 = getInt32Memory0()[retptr / 4 + 0];
772
- var r1 = getInt32Memory0()[retptr / 4 + 1];
773
- var r2 = getInt32Memory0()[retptr / 4 + 2];
774
- if (r2) {
775
- throw takeObject(r1);
776
- }
777
- return r0 >>> 0;
778
- } finally {
779
- wasm.__wbindgen_add_to_stack_pointer(16);
780
- }
781
- }
782
- /**
783
- * @param {number} dir
784
- * @returns {Array<any>}
785
- */
786
- externals(dir) {
787
- const ret = wasm.digraph_externals(this.ptr, dir);
788
- return takeObject(ret);
789
- }
790
- /**
791
- * @returns {Array<any>}
792
- */
793
- nodeIndices() {
794
- const ret = wasm.digraph_nodeIndices(this.ptr);
795
- return takeObject(ret);
796
- }
797
- /**
798
- * @returns {Array<any>}
799
- */
800
- edgeIndices() {
801
- const ret = wasm.digraph_edgeIndices(this.ptr);
802
- return takeObject(ret);
803
- }
804
- /**
805
- * @param {Function} node_map
806
- * @param {Function} edge_map
807
- * @returns {DiGraph}
808
- */
809
- map(node_map, edge_map) {
810
- try {
811
- const ret = wasm.digraph_map(this.ptr, addBorrowedObject(node_map), addBorrowedObject(edge_map));
812
- return DiGraph.__wrap(ret);
813
- } finally {
814
- heap[stack_pointer++] = undefined;
815
- heap[stack_pointer++] = undefined;
816
- }
817
- }
818
- /**
819
- * @param {Function} node_map
820
- * @param {Function} edge_map
821
- * @returns {DiGraph}
822
- */
823
- filterMap(node_map, edge_map) {
824
- try {
825
- const ret = wasm.digraph_filterMap(this.ptr, addBorrowedObject(node_map), addBorrowedObject(edge_map));
826
- return DiGraph.__wrap(ret);
827
- } finally {
828
- heap[stack_pointer++] = undefined;
829
- heap[stack_pointer++] = undefined;
830
- }
831
- }
832
- }
833
- /**
834
- */
835
- class Drawing {
836
-
837
- static __wrap(ptr) {
838
- const obj = Object.create(Drawing.prototype);
839
- obj.ptr = ptr;
840
-
841
- return obj;
842
- }
843
-
844
- __destroy_into_raw() {
845
- const ptr = this.ptr;
846
- this.ptr = 0;
847
-
848
- return ptr;
849
- }
850
-
851
- free() {
852
- const ptr = this.__destroy_into_raw();
853
- wasm.__wbg_drawing_free(ptr);
854
- }
855
- /**
856
- * @param {number} u
857
- * @returns {number | undefined}
858
- */
859
- x(u) {
860
- try {
861
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
862
- wasm.drawing_x(retptr, this.ptr, u);
863
- var r0 = getInt32Memory0()[retptr / 4 + 0];
864
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
865
- return r0 === 0 ? undefined : r1;
866
- } finally {
867
- wasm.__wbindgen_add_to_stack_pointer(16);
868
- }
869
- }
870
- /**
871
- * @param {number} u
872
- * @returns {number | undefined}
873
- */
874
- y(u) {
875
- try {
876
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
877
- wasm.drawing_y(retptr, this.ptr, u);
878
- var r0 = getInt32Memory0()[retptr / 4 + 0];
879
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
880
- return r0 === 0 ? undefined : r1;
881
- } finally {
882
- wasm.__wbindgen_add_to_stack_pointer(16);
883
- }
884
- }
885
- /**
886
- * @param {number} u
887
- * @param {number} x
888
- */
889
- setX(u, x) {
890
- wasm.drawing_setX(this.ptr, u, x);
891
- }
892
- /**
893
- * @param {number} u
894
- * @param {number} y
895
- */
896
- setY(u, y) {
897
- wasm.drawing_setY(this.ptr, u, y);
898
- }
899
- /**
900
- * @returns {number}
901
- */
902
- len() {
903
- const ret = wasm.drawing_len(this.ptr);
904
- return ret >>> 0;
905
- }
906
- /**
907
- */
908
- centralize() {
909
- wasm.drawing_centralize(this.ptr);
910
- }
911
- /**
912
- * @param {number} x0
913
- * @param {number} y0
914
- * @param {number} x1
915
- * @param {number} y1
916
- */
917
- clampRegion(x0, y0, x1, y1) {
918
- wasm.drawing_clampRegion(this.ptr, x0, y0, x1, y1);
919
- }
920
- /**
921
- * @param {Graph} graph
922
- * @returns {Drawing}
923
- */
924
- static initialPlacement(graph) {
925
- _assertClass(graph, Graph);
926
- const ret = wasm.drawing_initialPlacement(graph.ptr);
927
- return Drawing.__wrap(ret);
928
- }
929
- }
930
- /**
931
- */
932
- class ForceAtlas2 {
933
-
934
- static __wrap(ptr) {
935
- const obj = Object.create(ForceAtlas2.prototype);
936
- obj.ptr = ptr;
937
-
938
- return obj;
939
- }
940
-
941
- __destroy_into_raw() {
942
- const ptr = this.ptr;
943
- this.ptr = 0;
944
-
945
- return ptr;
946
- }
947
-
948
- free() {
949
- const ptr = this.__destroy_into_raw();
950
- wasm.__wbg_forceatlas2_free(ptr);
951
- }
952
- /**
953
- * @param {Graph} graph
954
- */
955
- constructor(graph) {
956
- _assertClass(graph, Graph);
957
- const ret = wasm.forceatlas2_new(graph.ptr);
958
- return ForceAtlas2.__wrap(ret);
959
- }
960
- /**
961
- * @param {Drawing} drawing
962
- * @param {number} alpha
963
- */
964
- apply(drawing, alpha) {
965
- _assertClass(drawing, Drawing);
966
- wasm.forceatlas2_apply(this.ptr, drawing.ptr, alpha);
967
- }
968
- /**
969
- * @param {number} u
970
- * @param {Drawing} drawing
971
- * @param {number} alpha
972
- */
973
- applyToNode(u, drawing, alpha) {
974
- _assertClass(drawing, Drawing);
975
- wasm.forceatlas2_applyToNode(this.ptr, u, drawing.ptr, alpha);
976
- }
977
- }
978
- /**
979
- */
980
- class FruchtermanReingoldForce {
981
-
982
- static __wrap(ptr) {
983
- const obj = Object.create(FruchtermanReingoldForce.prototype);
984
- obj.ptr = ptr;
985
-
986
- return obj;
987
- }
988
-
989
- __destroy_into_raw() {
990
- const ptr = this.ptr;
991
- this.ptr = 0;
992
-
993
- return ptr;
994
- }
995
-
996
- free() {
997
- const ptr = this.__destroy_into_raw();
998
- wasm.__wbg_fruchtermanreingoldforce_free(ptr);
999
- }
1000
- /**
1001
- * @param {Graph} graph
1002
- * @param {number} k
1003
- * @param {number} min_distance
1004
- */
1005
- constructor(graph, k, min_distance) {
1006
- _assertClass(graph, Graph);
1007
- const ret = wasm.fruchtermanreingoldforce_new(graph.ptr, k, min_distance);
1008
- return FruchtermanReingoldForce.__wrap(ret);
1009
- }
1010
- /**
1011
- * @param {Coordinates} coordinates
1012
- * @param {number} alpha
1013
- */
1014
- apply(coordinates, alpha) {
1015
- _assertClass(coordinates, Coordinates);
1016
- wasm.fruchtermanreingoldforce_apply(this.ptr, coordinates.ptr, alpha);
1017
- }
1018
- /**
1019
- * @param {number} u
1020
- * @param {Coordinates} coordinates
1021
- * @param {number} alpha
1022
- */
1023
- applyToNode(u, coordinates, alpha) {
1024
- _assertClass(coordinates, Coordinates);
1025
- wasm.fruchtermanreingoldforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1026
- }
1027
- }
1028
- /**
1029
- */
1030
- class FullSgd {
1031
-
1032
- static __wrap(ptr) {
1033
- const obj = Object.create(FullSgd.prototype);
1034
- obj.ptr = ptr;
1035
-
1036
- return obj;
1037
- }
1038
-
1039
- __destroy_into_raw() {
1040
- const ptr = this.ptr;
1041
- this.ptr = 0;
1042
-
1043
- return ptr;
1044
- }
1045
-
1046
- free() {
1047
- const ptr = this.__destroy_into_raw();
1048
- wasm.__wbg_fullsgd_free(ptr);
1049
- }
1050
- /**
1051
- * @param {Graph} graph
1052
- * @param {Function} length
1053
- */
1054
- constructor(graph, length) {
1055
- try {
1056
- _assertClass(graph, Graph);
1057
- const ret = wasm.fullsgd_new(graph.ptr, addBorrowedObject(length));
1058
- return FullSgd.__wrap(ret);
1059
- } finally {
1060
- heap[stack_pointer++] = undefined;
1061
- }
1062
- }
1063
- /**
1064
- * @param {Rng} rng
1065
- */
1066
- shuffle(rng) {
1067
- _assertClass(rng, Rng);
1068
- wasm.fullsgd_shuffle(this.ptr, rng.ptr);
1069
- }
1070
- /**
1071
- * @param {Drawing} drawing
1072
- * @param {number} eta
1073
- */
1074
- apply(drawing, eta) {
1075
- _assertClass(drawing, Drawing);
1076
- wasm.fullsgd_apply(this.ptr, drawing.ptr, eta);
1077
- }
1078
- /**
1079
- * @param {number} t_max
1080
- * @param {number} epsilon
1081
- * @returns {SgdScheduler}
1082
- */
1083
- scheduler(t_max, epsilon) {
1084
- const ret = wasm.fullsgd_scheduler(this.ptr, t_max, epsilon);
1085
- return SgdScheduler.__wrap(ret);
1086
- }
1087
- }
1088
- /**
1089
- */
1090
- class Graph {
1091
-
1092
- static __wrap(ptr) {
1093
- const obj = Object.create(Graph.prototype);
1094
- obj.ptr = ptr;
1095
-
1096
- return obj;
1097
- }
1098
-
1099
- __destroy_into_raw() {
1100
- const ptr = this.ptr;
1101
- this.ptr = 0;
1102
-
1103
- return ptr;
1104
- }
1105
-
1106
- free() {
1107
- const ptr = this.__destroy_into_raw();
1108
- wasm.__wbg_graph_free(ptr);
1109
- }
1110
- /**
1111
- */
1112
- constructor() {
1113
- const ret = wasm.digraph_new();
1114
- return Graph.__wrap(ret);
1115
- }
1116
- /**
1117
- * @returns {number}
1118
- */
1119
- nodeCount() {
1120
- const ret = wasm.digraph_nodeCount(this.ptr);
1121
- return ret >>> 0;
1122
- }
1123
- /**
1124
- * @returns {number}
1125
- */
1126
- edgeCount() {
1127
- const ret = wasm.digraph_edgeCount(this.ptr);
1128
- return ret >>> 0;
1129
- }
1130
- /**
1131
- * @param {any} value
1132
- * @returns {number}
1133
- */
1134
- addNode(value) {
1135
- const ret = wasm.digraph_addNode(this.ptr, addHeapObject(value));
1136
- return ret >>> 0;
1137
- }
1138
- /**
1139
- * @param {number} a
1140
- * @returns {any}
1141
- */
1142
- nodeWeight(a) {
1143
- try {
1144
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1145
- wasm.digraph_nodeWeight(retptr, this.ptr, a);
1146
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1147
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1148
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1149
- if (r2) {
1150
- throw takeObject(r1);
1151
- }
1152
- return takeObject(r0);
1153
- } finally {
1154
- wasm.__wbindgen_add_to_stack_pointer(16);
1155
- }
1156
- }
1157
- /**
1158
- * @param {number} a
1159
- * @param {number} b
1160
- * @param {any} value
1161
- * @returns {number}
1162
- */
1163
- addEdge(a, b, value) {
1164
- const ret = wasm.graph_addEdge(this.ptr, a, b, addHeapObject(value));
1165
- return ret >>> 0;
1166
- }
1167
- /**
1168
- * @param {number} e
1169
- * @returns {any}
1170
- */
1171
- edgeWeight(e) {
1172
- try {
1173
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1174
- wasm.digraph_edgeWeight(retptr, this.ptr, e);
1175
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1176
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1177
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1178
- if (r2) {
1179
- throw takeObject(r1);
1180
- }
1181
- return takeObject(r0);
1182
- } finally {
1183
- wasm.__wbindgen_add_to_stack_pointer(16);
1184
- }
1185
- }
1186
- /**
1187
- * @param {number} e
1188
- * @returns {Array<any>}
1189
- */
1190
- edgeEndpoints(e) {
1191
- try {
1192
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1193
- wasm.digraph_edgeEndpoints(retptr, this.ptr, e);
1194
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1195
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1196
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1197
- if (r2) {
1198
- throw takeObject(r1);
1199
- }
1200
- return takeObject(r0);
1201
- } finally {
1202
- wasm.__wbindgen_add_to_stack_pointer(16);
1203
- }
1204
- }
1205
- /**
1206
- * @param {number} a
1207
- * @returns {any}
1208
- */
1209
- removeNode(a) {
1210
- try {
1211
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1212
- wasm.graph_removeNode(retptr, this.ptr, a);
1213
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1214
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1215
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1216
- if (r2) {
1217
- throw takeObject(r1);
1218
- }
1219
- return takeObject(r0);
1220
- } finally {
1221
- wasm.__wbindgen_add_to_stack_pointer(16);
1222
- }
1223
- }
1224
- /**
1225
- * @param {number} e
1226
- * @returns {any}
1227
- */
1228
- removeEdge(e) {
1229
- try {
1230
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1231
- wasm.graph_removeEdge(retptr, this.ptr, e);
1232
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1233
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1234
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1235
- if (r2) {
1236
- throw takeObject(r1);
1237
- }
1238
- return takeObject(r0);
1239
- } finally {
1240
- wasm.__wbindgen_add_to_stack_pointer(16);
1241
- }
1242
- }
1243
- /**
1244
- * @param {number} a
1245
- * @returns {Array<any>}
1246
- */
1247
- neighbors(a) {
1248
- const ret = wasm.graph_neighbors(this.ptr, a);
1249
- return takeObject(ret);
1250
- }
1251
- /**
1252
- * @param {number} a
1253
- * @param {number} dir
1254
- * @returns {Array<any>}
1255
- */
1256
- neighborsDirected(a, dir) {
1257
- const ret = wasm.graph_neighborsDirected(this.ptr, a, dir);
1258
- return takeObject(ret);
1259
- }
1260
- /**
1261
- * @param {number} a
1262
- * @returns {Array<any>}
1263
- */
1264
- neighborsUndirected(a) {
1265
- const ret = wasm.digraph_neighborsUndirected(this.ptr, a);
1266
- return takeObject(ret);
1267
- }
1268
- /**
1269
- * @param {number} a
1270
- * @returns {Array<any>}
1271
- */
1272
- edges(a) {
1273
- const ret = wasm.graph_edges(this.ptr, a);
1274
- return takeObject(ret);
1275
- }
1276
- /**
1277
- * @param {number} a
1278
- * @param {number} b
1279
- * @returns {boolean}
1280
- */
1281
- containsEdge(a, b) {
1282
- const ret = wasm.graph_containsEdge(this.ptr, a, b);
1283
- return ret !== 0;
1284
- }
1285
- /**
1286
- * @param {number} a
1287
- * @param {number} b
1288
- * @returns {number}
1289
- */
1290
- findEdge(a, b) {
1291
- try {
1292
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1293
- wasm.graph_findEdge(retptr, this.ptr, a, b);
1294
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1295
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1296
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1297
- if (r2) {
1298
- throw takeObject(r1);
1299
- }
1300
- return r0 >>> 0;
1301
- } finally {
1302
- wasm.__wbindgen_add_to_stack_pointer(16);
1303
- }
1304
- }
1305
- /**
1306
- * @param {number} dir
1307
- * @returns {Array<any>}
1308
- */
1309
- externals(dir) {
1310
- const ret = wasm.graph_externals(this.ptr, dir);
1311
- return takeObject(ret);
1312
- }
1313
- /**
1314
- * @returns {Array<any>}
1315
- */
1316
- nodeIndices() {
1317
- const ret = wasm.digraph_nodeIndices(this.ptr);
1318
- return takeObject(ret);
1319
- }
1320
- /**
1321
- * @returns {Array<any>}
1322
- */
1323
- edgeIndices() {
1324
- const ret = wasm.digraph_edgeIndices(this.ptr);
1325
- return takeObject(ret);
1326
- }
1327
- /**
1328
- * @param {Function} node_map
1329
- * @param {Function} edge_map
1330
- * @returns {Graph}
1331
- */
1332
- map(node_map, edge_map) {
1333
- try {
1334
- const ret = wasm.graph_map(this.ptr, addBorrowedObject(node_map), addBorrowedObject(edge_map));
1335
- return Graph.__wrap(ret);
1336
- } finally {
1337
- heap[stack_pointer++] = undefined;
1338
- heap[stack_pointer++] = undefined;
1339
- }
1340
- }
1341
- /**
1342
- * @param {Function} node_map
1343
- * @param {Function} edge_map
1344
- * @returns {Graph}
1345
- */
1346
- filterMap(node_map, edge_map) {
1347
- try {
1348
- const ret = wasm.graph_filterMap(this.ptr, addBorrowedObject(node_map), addBorrowedObject(edge_map));
1349
- return Graph.__wrap(ret);
1350
- } finally {
1351
- heap[stack_pointer++] = undefined;
1352
- heap[stack_pointer++] = undefined;
1353
- }
1354
- }
1355
- }
1356
- /**
1357
- */
1358
- class GroupLinkForce {
1359
-
1360
- static __wrap(ptr) {
1361
- const obj = Object.create(GroupLinkForce.prototype);
1362
- obj.ptr = ptr;
1363
-
1364
- return obj;
1365
- }
1366
-
1367
- __destroy_into_raw() {
1368
- const ptr = this.ptr;
1369
- this.ptr = 0;
1370
-
1371
- return ptr;
1372
- }
1373
-
1374
- free() {
1375
- const ptr = this.__destroy_into_raw();
1376
- wasm.__wbg_grouplinkforce_free(ptr);
1377
- }
1378
- /**
1379
- * @param {Graph} graph
1380
- * @param {Function} group_accessor
1381
- * @param {Function} inter_link_accessor
1382
- * @param {Function} intra_link_accessor
1383
- */
1384
- constructor(graph, group_accessor, inter_link_accessor, intra_link_accessor) {
1385
- try {
1386
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1387
- _assertClass(graph, Graph);
1388
- wasm.grouplinkforce_new(retptr, graph.ptr, addBorrowedObject(group_accessor), addBorrowedObject(inter_link_accessor), addBorrowedObject(intra_link_accessor));
1389
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1390
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1391
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1392
- if (r2) {
1393
- throw takeObject(r1);
1394
- }
1395
- return GroupLinkForce.__wrap(r0);
1396
- } finally {
1397
- wasm.__wbindgen_add_to_stack_pointer(16);
1398
- heap[stack_pointer++] = undefined;
1399
- heap[stack_pointer++] = undefined;
1400
- heap[stack_pointer++] = undefined;
1401
- }
1402
- }
1403
- /**
1404
- * @param {Coordinates} coordinates
1405
- * @param {number} alpha
1406
- */
1407
- apply(coordinates, alpha) {
1408
- _assertClass(coordinates, Coordinates);
1409
- wasm.grouplinkforce_apply(this.ptr, coordinates.ptr, alpha);
1410
- }
1411
- }
1412
- /**
1413
- */
1414
- class GroupManyBodyForce {
1415
-
1416
- static __wrap(ptr) {
1417
- const obj = Object.create(GroupManyBodyForce.prototype);
1418
- obj.ptr = ptr;
1419
-
1420
- return obj;
1421
- }
1422
-
1423
- __destroy_into_raw() {
1424
- const ptr = this.ptr;
1425
- this.ptr = 0;
1426
-
1427
- return ptr;
1428
- }
1429
-
1430
- free() {
1431
- const ptr = this.__destroy_into_raw();
1432
- wasm.__wbg_groupmanybodyforce_free(ptr);
1433
- }
1434
- /**
1435
- * @param {Graph} graph
1436
- * @param {Function} node_accessor
1437
- */
1438
- constructor(graph, node_accessor) {
1439
- try {
1440
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1441
- _assertClass(graph, Graph);
1442
- wasm.groupmanybodyforce_new(retptr, graph.ptr, addBorrowedObject(node_accessor));
1443
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1444
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1445
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1446
- if (r2) {
1447
- throw takeObject(r1);
1448
- }
1449
- return GroupManyBodyForce.__wrap(r0);
1450
- } finally {
1451
- wasm.__wbindgen_add_to_stack_pointer(16);
1452
- heap[stack_pointer++] = undefined;
1453
- }
1454
- }
1455
- /**
1456
- * @param {Coordinates} coordinates
1457
- * @param {number} alpha
1458
- */
1459
- apply(coordinates, alpha) {
1460
- _assertClass(coordinates, Coordinates);
1461
- wasm.groupmanybodyforce_apply(this.ptr, coordinates.ptr, alpha);
1462
- }
1463
- }
1464
- /**
1465
- */
1466
- class GroupPositionForce {
1467
-
1468
- static __wrap(ptr) {
1469
- const obj = Object.create(GroupPositionForce.prototype);
1470
- obj.ptr = ptr;
1471
-
1472
- return obj;
1473
- }
1474
-
1475
- __destroy_into_raw() {
1476
- const ptr = this.ptr;
1477
- this.ptr = 0;
1478
-
1479
- return ptr;
1480
- }
1481
-
1482
- free() {
1483
- const ptr = this.__destroy_into_raw();
1484
- wasm.__wbg_grouppositionforce_free(ptr);
1485
- }
1486
- /**
1487
- * @param {Graph} graph
1488
- * @param {Function} node_accessor
1489
- * @param {Function} group_accessor
1490
- */
1491
- constructor(graph, node_accessor, group_accessor) {
1492
- try {
1493
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1494
- _assertClass(graph, Graph);
1495
- wasm.grouppositionforce_new(retptr, graph.ptr, addBorrowedObject(node_accessor), addBorrowedObject(group_accessor));
1496
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1497
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1498
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1499
- if (r2) {
1500
- throw takeObject(r1);
1501
- }
1502
- return GroupPositionForce.__wrap(r0);
1503
- } finally {
1504
- wasm.__wbindgen_add_to_stack_pointer(16);
1505
- heap[stack_pointer++] = undefined;
1506
- heap[stack_pointer++] = undefined;
1507
- }
1508
- }
1509
- /**
1510
- * @param {Coordinates} coordinates
1511
- * @param {number} alpha
1512
- */
1513
- apply(coordinates, alpha) {
1514
- _assertClass(coordinates, Coordinates);
1515
- wasm.grouppositionforce_apply(this.ptr, coordinates.ptr, alpha);
1516
- }
1517
- }
1518
- /**
1519
- */
1520
- class HyperbolicSpace {
1521
-
1522
- __destroy_into_raw() {
1523
- const ptr = this.ptr;
1524
- this.ptr = 0;
1525
-
1526
- return ptr;
1527
- }
1528
-
1529
- free() {
1530
- const ptr = this.__destroy_into_raw();
1531
- wasm.__wbg_hyperbolicspace_free(ptr);
1532
- }
1533
- /**
1534
- * @param {any} a
1535
- * @param {any} b
1536
- * @returns {any}
1537
- */
1538
- static toTangentSpace(a, b) {
1539
- try {
1540
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1541
- wasm.hyperbolicspace_toTangentSpace(retptr, addHeapObject(a), addHeapObject(b));
1542
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1543
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1544
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1545
- if (r2) {
1546
- throw takeObject(r1);
1547
- }
1548
- return takeObject(r0);
1549
- } finally {
1550
- wasm.__wbindgen_add_to_stack_pointer(16);
1551
- }
1552
- }
1553
- /**
1554
- * @param {any} a
1555
- * @param {any} b
1556
- * @returns {any}
1557
- */
1558
- static fromTangentSpace(a, b) {
1559
- try {
1560
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1561
- wasm.hyperbolicspace_fromTangentSpace(retptr, addHeapObject(a), addHeapObject(b));
1562
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1563
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1564
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1565
- if (r2) {
1566
- throw takeObject(r1);
1567
- }
1568
- return takeObject(r0);
1569
- } finally {
1570
- wasm.__wbindgen_add_to_stack_pointer(16);
1571
- }
1572
- }
1573
- /**
1574
- * @param {number} i
1575
- * @param {Coordinates} riemann_space
1576
- * @param {Coordinates} tangent_space
1577
- */
1578
- static mapToTangentSpace(i, riemann_space, tangent_space) {
1579
- _assertClass(riemann_space, Coordinates);
1580
- _assertClass(tangent_space, Coordinates);
1581
- wasm.hyperbolicspace_mapToTangentSpace(i, riemann_space.ptr, tangent_space.ptr);
1582
- }
1583
- /**
1584
- * @param {number} i
1585
- * @param {Coordinates} riemann_space
1586
- * @param {Coordinates} tangent_space
1587
- * @param {number} velocity_decay
1588
- */
1589
- static updatePosition(i, riemann_space, tangent_space, velocity_decay) {
1590
- _assertClass(riemann_space, Coordinates);
1591
- _assertClass(tangent_space, Coordinates);
1592
- wasm.hyperbolicspace_updatePosition(i, riemann_space.ptr, tangent_space.ptr, velocity_decay);
1593
- }
1594
- }
1595
- /**
1596
- */
1597
- class KamadaKawai {
1598
-
1599
- static __wrap(ptr) {
1600
- const obj = Object.create(KamadaKawai.prototype);
1601
- obj.ptr = ptr;
1602
-
1603
- return obj;
1604
- }
1605
-
1606
- __destroy_into_raw() {
1607
- const ptr = this.ptr;
1608
- this.ptr = 0;
1609
-
1610
- return ptr;
1611
- }
1612
-
1613
- free() {
1614
- const ptr = this.__destroy_into_raw();
1615
- wasm.__wbg_kamadakawai_free(ptr);
1616
- }
1617
- /**
1618
- * @param {Graph} graph
1619
- * @param {Function} f
1620
- */
1621
- constructor(graph, f) {
1622
- try {
1623
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1624
- _assertClass(graph, Graph);
1625
- wasm.kamadakawai_new(retptr, graph.ptr, addBorrowedObject(f));
1626
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1627
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1628
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1629
- if (r2) {
1630
- throw takeObject(r1);
1631
- }
1632
- return KamadaKawai.__wrap(r0);
1633
- } finally {
1634
- wasm.__wbindgen_add_to_stack_pointer(16);
1635
- heap[stack_pointer++] = undefined;
1636
- }
1637
- }
1638
- /**
1639
- * @param {Drawing} drawing
1640
- * @returns {number | undefined}
1641
- */
1642
- selectNode(drawing) {
1643
- try {
1644
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1645
- _assertClass(drawing, Drawing);
1646
- wasm.kamadakawai_selectNode(retptr, this.ptr, drawing.ptr);
1647
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1648
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1649
- return r0 === 0 ? undefined : r1 >>> 0;
1650
- } finally {
1651
- wasm.__wbindgen_add_to_stack_pointer(16);
1652
- }
1653
- }
1654
- /**
1655
- * @param {number} m
1656
- * @param {Drawing} drawing
1657
- */
1658
- applyToNode(m, drawing) {
1659
- _assertClass(drawing, Drawing);
1660
- wasm.kamadakawai_applyToNode(this.ptr, m, drawing.ptr);
1661
- }
1662
- /**
1663
- * @param {Drawing} drawing
1664
- */
1665
- run(drawing) {
1666
- _assertClass(drawing, Drawing);
1667
- wasm.kamadakawai_run(this.ptr, drawing.ptr);
1668
- }
1669
- /**
1670
- * @returns {number}
1671
- */
1672
- get eps() {
1673
- const ret = wasm.kamadakawai_eps(this.ptr);
1674
- return ret;
1675
- }
1676
- /**
1677
- * @param {number} value
1678
- */
1679
- set eps(value) {
1680
- wasm.kamadakawai_set_eps(this.ptr, value);
1681
- }
1682
- }
1683
- /**
1684
- */
1685
- class LinkForce {
1686
-
1687
- static __wrap(ptr) {
1688
- const obj = Object.create(LinkForce.prototype);
1689
- obj.ptr = ptr;
1690
-
1691
- return obj;
1692
- }
1693
-
1694
- __destroy_into_raw() {
1695
- const ptr = this.ptr;
1696
- this.ptr = 0;
1697
-
1698
- return ptr;
1699
- }
1700
-
1701
- free() {
1702
- const ptr = this.__destroy_into_raw();
1703
- wasm.__wbg_linkforce_free(ptr);
1704
- }
1705
- /**
1706
- * @param {Graph} graph
1707
- * @param {Function} f
1708
- */
1709
- constructor(graph, f) {
1710
- try {
1711
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1712
- _assertClass(graph, Graph);
1713
- wasm.linkforce_new(retptr, graph.ptr, addBorrowedObject(f));
1714
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1715
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1716
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1717
- if (r2) {
1718
- throw takeObject(r1);
1719
- }
1720
- return LinkForce.__wrap(r0);
1721
- } finally {
1722
- wasm.__wbindgen_add_to_stack_pointer(16);
1723
- heap[stack_pointer++] = undefined;
1724
- }
1725
- }
1726
- /**
1727
- * @param {Coordinates} coordinates
1728
- * @param {number} alpha
1729
- */
1730
- apply(coordinates, alpha) {
1731
- _assertClass(coordinates, Coordinates);
1732
- wasm.linkforce_apply(this.ptr, coordinates.ptr, alpha);
1733
- }
1734
- /**
1735
- * @param {number} u
1736
- * @param {Coordinates} coordinates
1737
- * @param {number} alpha
1738
- */
1739
- applyToNode(u, coordinates, alpha) {
1740
- _assertClass(coordinates, Coordinates);
1741
- wasm.linkforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1742
- }
1743
- }
1744
- /**
1745
- */
1746
- class ManyBodyForce {
1747
-
1748
- static __wrap(ptr) {
1749
- const obj = Object.create(ManyBodyForce.prototype);
1750
- obj.ptr = ptr;
1751
-
1752
- return obj;
1753
- }
1754
-
1755
- __destroy_into_raw() {
1756
- const ptr = this.ptr;
1757
- this.ptr = 0;
1758
-
1759
- return ptr;
1760
- }
1761
-
1762
- free() {
1763
- const ptr = this.__destroy_into_raw();
1764
- wasm.__wbg_manybodyforce_free(ptr);
1765
- }
1766
- /**
1767
- * @param {Graph} graph
1768
- * @param {Function} f
1769
- */
1770
- constructor(graph, f) {
1771
- try {
1772
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1773
- _assertClass(graph, Graph);
1774
- wasm.manybodyforce_new(retptr, graph.ptr, addBorrowedObject(f));
1775
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1776
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1777
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1778
- if (r2) {
1779
- throw takeObject(r1);
1780
- }
1781
- return ManyBodyForce.__wrap(r0);
1782
- } finally {
1783
- wasm.__wbindgen_add_to_stack_pointer(16);
1784
- heap[stack_pointer++] = undefined;
1785
- }
1786
- }
1787
- /**
1788
- * @param {Coordinates} coordinates
1789
- * @param {number} alpha
1790
- */
1791
- apply(coordinates, alpha) {
1792
- _assertClass(coordinates, Coordinates);
1793
- wasm.manybodyforce_apply(this.ptr, coordinates.ptr, alpha);
1794
- }
1795
- /**
1796
- * @param {number} u
1797
- * @param {Coordinates} coordinates
1798
- * @param {number} alpha
1799
- */
1800
- applyToNode(u, coordinates, alpha) {
1801
- _assertClass(coordinates, Coordinates);
1802
- wasm.manybodyforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1803
- }
1804
- }
1805
- /**
1806
- */
1807
- class PivotMds {
1808
-
1809
- static __wrap(ptr) {
1810
- const obj = Object.create(PivotMds.prototype);
1811
- obj.ptr = ptr;
1812
-
1813
- return obj;
1814
- }
1815
-
1816
- __destroy_into_raw() {
1817
- const ptr = this.ptr;
1818
- this.ptr = 0;
1819
-
1820
- return ptr;
1821
- }
1822
-
1823
- free() {
1824
- const ptr = this.__destroy_into_raw();
1825
- wasm.__wbg_pivotmds_free(ptr);
1826
- }
1827
- /**
1828
- */
1829
- constructor() {
1830
- const ret = wasm.pivotmds_new();
1831
- return PivotMds.__wrap(ret);
1832
- }
1833
- /**
1834
- * @param {Graph} graph
1835
- * @param {Function} length
1836
- * @param {Array<any>} sources
1837
- * @returns {Drawing}
1838
- */
1839
- run(graph, length, sources) {
1840
- try {
1841
- _assertClass(graph, Graph);
1842
- const ret = wasm.pivotmds_run(this.ptr, graph.ptr, addBorrowedObject(length), addBorrowedObject(sources));
1843
- return Drawing.__wrap(ret);
1844
- } finally {
1845
- heap[stack_pointer++] = undefined;
1846
- heap[stack_pointer++] = undefined;
1847
- }
1848
- }
1849
- }
1850
- /**
1851
- */
1852
- class PositionForce {
1853
-
1854
- static __wrap(ptr) {
1855
- const obj = Object.create(PositionForce.prototype);
1856
- obj.ptr = ptr;
1857
-
1858
- return obj;
1859
- }
1860
-
1861
- __destroy_into_raw() {
1862
- const ptr = this.ptr;
1863
- this.ptr = 0;
1864
-
1865
- return ptr;
1866
- }
1867
-
1868
- free() {
1869
- const ptr = this.__destroy_into_raw();
1870
- wasm.__wbg_positionforce_free(ptr);
1871
- }
1872
- /**
1873
- * @param {Graph} graph
1874
- * @param {Function} f
1875
- */
1876
- constructor(graph, f) {
1877
- try {
1878
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1879
- _assertClass(graph, Graph);
1880
- wasm.positionforce_new(retptr, graph.ptr, addBorrowedObject(f));
1881
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1882
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1883
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1884
- if (r2) {
1885
- throw takeObject(r1);
1886
- }
1887
- return PositionForce.__wrap(r0);
1888
- } finally {
1889
- wasm.__wbindgen_add_to_stack_pointer(16);
1890
- heap[stack_pointer++] = undefined;
1891
- }
1892
- }
1893
- /**
1894
- * @param {Coordinates} coordinates
1895
- * @param {number} alpha
1896
- */
1897
- apply(coordinates, alpha) {
1898
- _assertClass(coordinates, Coordinates);
1899
- wasm.positionforce_apply(this.ptr, coordinates.ptr, alpha);
1900
- }
1901
- /**
1902
- * @param {number} u
1903
- * @param {Coordinates} coordinates
1904
- * @param {number} alpha
1905
- */
1906
- applyToNode(u, coordinates, alpha) {
1907
- _assertClass(coordinates, Coordinates);
1908
- wasm.positionforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1909
- }
1910
- }
1911
- /**
1912
- */
1913
- class RadialForce {
1914
-
1915
- static __wrap(ptr) {
1916
- const obj = Object.create(RadialForce.prototype);
1917
- obj.ptr = ptr;
1918
-
1919
- return obj;
1920
- }
1921
-
1922
- __destroy_into_raw() {
1923
- const ptr = this.ptr;
1924
- this.ptr = 0;
1925
-
1926
- return ptr;
1927
- }
1928
-
1929
- free() {
1930
- const ptr = this.__destroy_into_raw();
1931
- wasm.__wbg_radialforce_free(ptr);
1932
- }
1933
- /**
1934
- * @param {Graph} graph
1935
- * @param {Function} f
1936
- */
1937
- constructor(graph, f) {
1938
- try {
1939
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1940
- _assertClass(graph, Graph);
1941
- wasm.radialforce_new(retptr, graph.ptr, addHeapObject(f));
1942
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1943
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1944
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1945
- if (r2) {
1946
- throw takeObject(r1);
1947
- }
1948
- return RadialForce.__wrap(r0);
1949
- } finally {
1950
- wasm.__wbindgen_add_to_stack_pointer(16);
1951
- }
1952
- }
1953
- /**
1954
- * @param {Coordinates} coordinates
1955
- * @param {number} alpha
1956
- */
1957
- apply(coordinates, alpha) {
1958
- _assertClass(coordinates, Coordinates);
1959
- wasm.radialforce_apply(this.ptr, coordinates.ptr, alpha);
1960
- }
1961
- /**
1962
- * @param {number} u
1963
- * @param {Coordinates} coordinates
1964
- * @param {number} alpha
1965
- */
1966
- applyToNode(u, coordinates, alpha) {
1967
- _assertClass(coordinates, Coordinates);
1968
- wasm.radialforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1969
- }
1970
- }
1971
- /**
1972
- */
1973
- class Rng {
1974
-
1975
- static __wrap(ptr) {
1976
- const obj = Object.create(Rng.prototype);
1977
- obj.ptr = ptr;
1978
-
1979
- return obj;
1980
- }
1981
-
1982
- __destroy_into_raw() {
1983
- const ptr = this.ptr;
1984
- this.ptr = 0;
1985
-
1986
- return ptr;
1987
- }
1988
-
1989
- free() {
1990
- const ptr = this.__destroy_into_raw();
1991
- wasm.__wbg_rng_free(ptr);
1992
- }
1993
- /**
1994
- */
1995
- constructor() {
1996
- const ret = wasm.rng_new();
1997
- return Rng.__wrap(ret);
1998
- }
1999
- /**
2000
- * @param {bigint} seed
2001
- * @returns {Rng}
2002
- */
2003
- static seedFrom(seed) {
2004
- const ret = wasm.rng_seedFrom(seed);
2005
- return Rng.__wrap(ret);
2006
- }
2007
- }
2008
- /**
2009
- */
2010
- class SgdScheduler {
2011
-
2012
- static __wrap(ptr) {
2013
- const obj = Object.create(SgdScheduler.prototype);
2014
- obj.ptr = ptr;
2015
-
2016
- return obj;
2017
- }
2018
-
2019
- __destroy_into_raw() {
2020
- const ptr = this.ptr;
2021
- this.ptr = 0;
2022
-
2023
- return ptr;
2024
- }
2025
-
2026
- free() {
2027
- const ptr = this.__destroy_into_raw();
2028
- wasm.__wbg_sgdscheduler_free(ptr);
2029
- }
2030
- /**
2031
- * @param {Function} f
2032
- */
2033
- run(f) {
2034
- try {
2035
- wasm.sgdscheduler_run(this.ptr, addBorrowedObject(f));
2036
- } finally {
2037
- heap[stack_pointer++] = undefined;
2038
- }
2039
- }
2040
- /**
2041
- * @param {Function} f
2042
- */
2043
- step(f) {
2044
- try {
2045
- wasm.sgdscheduler_step(this.ptr, addBorrowedObject(f));
2046
- } finally {
2047
- heap[stack_pointer++] = undefined;
2048
- }
2049
- }
2050
- /**
2051
- * @returns {boolean}
2052
- */
2053
- isFinished() {
2054
- const ret = wasm.sgdscheduler_isFinished(this.ptr);
2055
- return ret !== 0;
2056
- }
2057
- }
2058
- /**
2059
- */
2060
- class Simulation {
2061
-
2062
- static __wrap(ptr) {
2063
- const obj = Object.create(Simulation.prototype);
2064
- obj.ptr = ptr;
2065
-
2066
- return obj;
2067
- }
2068
-
2069
- __destroy_into_raw() {
2070
- const ptr = this.ptr;
2071
- this.ptr = 0;
2072
-
2073
- return ptr;
2074
- }
2075
-
2076
- free() {
2077
- const ptr = this.__destroy_into_raw();
2078
- wasm.__wbg_simulation_free(ptr);
2079
- }
2080
- /**
2081
- */
2082
- constructor() {
2083
- const ret = wasm.simulation_new();
2084
- return Simulation.__wrap(ret);
2085
- }
2086
- /**
2087
- * @param {Function} f
2088
- */
2089
- run(f) {
2090
- try {
2091
- wasm.simulation_run(this.ptr, addBorrowedObject(f));
2092
- } finally {
2093
- heap[stack_pointer++] = undefined;
2094
- }
2095
- }
2096
- /**
2097
- * @param {number} n
2098
- * @param {Function} f
2099
- */
2100
- runStep(n, f) {
2101
- try {
2102
- wasm.simulation_runStep(this.ptr, n, addBorrowedObject(f));
2103
- } finally {
2104
- heap[stack_pointer++] = undefined;
2105
- }
2106
- }
2107
- /**
2108
- * @returns {boolean}
2109
- */
2110
- isFinished() {
2111
- const ret = wasm.simulation_isFinished(this.ptr);
2112
- return ret !== 0;
2113
- }
2114
- /**
2115
- * @param {number} alpha_start
2116
- */
2117
- reset(alpha_start) {
2118
- wasm.simulation_reset(this.ptr, alpha_start);
2119
- }
2120
- /**
2121
- * @returns {number}
2122
- */
2123
- get alphaStart() {
2124
- const ret = wasm.simulation_alpha(this.ptr);
2125
- return ret;
2126
- }
2127
- /**
2128
- * @param {number} value
2129
- */
2130
- set alphaStart(value) {
2131
- wasm.simulation_set_alpha(this.ptr, value);
2132
- }
2133
- /**
2134
- * @returns {number}
2135
- */
2136
- get alphaMin() {
2137
- const ret = wasm.simulation_alpha_min(this.ptr);
2138
- return ret;
2139
- }
2140
- /**
2141
- * @param {number} value
2142
- */
2143
- set alphaMin(value) {
2144
- wasm.simulation_set_alpha_min(this.ptr, value);
2145
- }
2146
- /**
2147
- * @returns {number}
2148
- */
2149
- get alphaTarget() {
2150
- const ret = wasm.simulation_alpha_target(this.ptr);
2151
- return ret;
2152
- }
2153
- /**
2154
- * @param {number} value
2155
- */
2156
- set alphaTarget(value) {
2157
- wasm.simulation_set_alpha_target(this.ptr, value);
2158
- }
2159
- /**
2160
- * @returns {number}
2161
- */
2162
- get iterations() {
2163
- const ret = wasm.simulation_iterations(this.ptr);
2164
- return ret >>> 0;
2165
- }
2166
- /**
2167
- * @param {number} value
2168
- */
2169
- set iterations(value) {
2170
- wasm.simulation_set_iterations(this.ptr, value);
2171
- }
2172
- }
2173
- /**
2174
- */
2175
- class SparseSgd {
2176
-
2177
- static __wrap(ptr) {
2178
- const obj = Object.create(SparseSgd.prototype);
2179
- obj.ptr = ptr;
2180
-
2181
- return obj;
2182
- }
2183
-
2184
- __destroy_into_raw() {
2185
- const ptr = this.ptr;
2186
- this.ptr = 0;
2187
-
2188
- return ptr;
2189
- }
2190
-
2191
- free() {
2192
- const ptr = this.__destroy_into_raw();
2193
- wasm.__wbg_sparsesgd_free(ptr);
2194
- }
2195
- /**
2196
- * @param {Graph} graph
2197
- * @param {Function} length
2198
- * @param {number} h
2199
- * @param {Rng} rng
2200
- */
2201
- constructor(graph, length, h, rng) {
2202
- try {
2203
- _assertClass(graph, Graph);
2204
- _assertClass(rng, Rng);
2205
- const ret = wasm.sparsesgd_new(graph.ptr, addBorrowedObject(length), h, rng.ptr);
2206
- return SparseSgd.__wrap(ret);
2207
- } finally {
2208
- heap[stack_pointer++] = undefined;
2209
- }
2210
- }
2211
- /**
2212
- * @param {Rng} rng
2213
- */
2214
- shuffle(rng) {
2215
- _assertClass(rng, Rng);
2216
- wasm.sparsesgd_shuffle(this.ptr, rng.ptr);
2217
- }
2218
- /**
2219
- * @param {Drawing} drawing
2220
- * @param {number} eta
2221
- */
2222
- apply(drawing, eta) {
2223
- _assertClass(drawing, Drawing);
2224
- wasm.sparsesgd_apply(this.ptr, drawing.ptr, eta);
2225
- }
2226
- /**
2227
- * @param {number} t_max
2228
- * @param {number} epsilon
2229
- * @returns {SgdScheduler}
2230
- */
2231
- scheduler(t_max, epsilon) {
2232
- const ret = wasm.sparsesgd_scheduler(this.ptr, t_max, epsilon);
2233
- return SgdScheduler.__wrap(ret);
2234
- }
2235
- }
2236
- /**
2237
- */
2238
- class SphericalSpace {
2239
-
2240
- __destroy_into_raw() {
2241
- const ptr = this.ptr;
2242
- this.ptr = 0;
2243
-
2244
- return ptr;
2245
- }
2246
-
2247
- free() {
2248
- const ptr = this.__destroy_into_raw();
2249
- wasm.__wbg_sphericalspace_free(ptr);
2250
- }
2251
- /**
2252
- * @param {any} a
2253
- * @param {any} b
2254
- * @returns {any}
2255
- */
2256
- static toTangentSpace(a, b) {
2257
- try {
2258
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2259
- wasm.sphericalspace_toTangentSpace(retptr, addHeapObject(a), addHeapObject(b));
2260
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2261
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2262
- var r2 = getInt32Memory0()[retptr / 4 + 2];
2263
- if (r2) {
2264
- throw takeObject(r1);
2265
- }
2266
- return takeObject(r0);
2267
- } finally {
2268
- wasm.__wbindgen_add_to_stack_pointer(16);
2269
- }
2270
- }
2271
- /**
2272
- * @param {any} a
2273
- * @param {any} b
2274
- * @returns {any}
2275
- */
2276
- static fromTangentSpace(a, b) {
2277
- try {
2278
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2279
- wasm.sphericalspace_fromTangentSpace(retptr, addHeapObject(a), addHeapObject(b));
2280
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2281
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2282
- var r2 = getInt32Memory0()[retptr / 4 + 2];
2283
- if (r2) {
2284
- throw takeObject(r1);
2285
- }
2286
- return takeObject(r0);
2287
- } finally {
2288
- wasm.__wbindgen_add_to_stack_pointer(16);
2289
- }
2290
- }
2291
- /**
2292
- * @param {number} i
2293
- * @param {Coordinates} riemann_space
2294
- * @param {Coordinates} tangent_space
2295
- */
2296
- static mapToTangentSpace(i, riemann_space, tangent_space) {
2297
- _assertClass(riemann_space, Coordinates);
2298
- _assertClass(tangent_space, Coordinates);
2299
- wasm.sphericalspace_mapToTangentSpace(i, riemann_space.ptr, tangent_space.ptr);
2300
- }
2301
- /**
2302
- * @param {number} i
2303
- * @param {Coordinates} riemann_space
2304
- * @param {Coordinates} tangent_space
2305
- * @param {number} velocity_decay
2306
- */
2307
- static updatePosition(i, riemann_space, tangent_space, velocity_decay) {
2308
- _assertClass(riemann_space, Coordinates);
2309
- _assertClass(tangent_space, Coordinates);
2310
- wasm.sphericalspace_updatePosition(i, riemann_space.ptr, tangent_space.ptr, velocity_decay);
2311
- }
2312
- }
2313
- /**
2314
- */
2315
- class StressMajorization {
2316
-
2317
- static __wrap(ptr) {
2318
- const obj = Object.create(StressMajorization.prototype);
2319
- obj.ptr = ptr;
2320
-
2321
- return obj;
2322
- }
2323
-
2324
- __destroy_into_raw() {
2325
- const ptr = this.ptr;
2326
- this.ptr = 0;
2327
-
2328
- return ptr;
2329
- }
2330
-
2331
- free() {
2332
- const ptr = this.__destroy_into_raw();
2333
- wasm.__wbg_stressmajorization_free(ptr);
2334
- }
2335
- /**
2336
- * @param {Graph} graph
2337
- * @param {Drawing} drawing
2338
- * @param {Function} f
2339
- */
2340
- constructor(graph, drawing, f) {
2341
- try {
2342
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2343
- _assertClass(graph, Graph);
2344
- _assertClass(drawing, Drawing);
2345
- wasm.stressmajorization_new(retptr, graph.ptr, drawing.ptr, addBorrowedObject(f));
2346
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2347
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2348
- var r2 = getInt32Memory0()[retptr / 4 + 2];
2349
- if (r2) {
2350
- throw takeObject(r1);
2351
- }
2352
- return StressMajorization.__wrap(r0);
2353
- } finally {
2354
- wasm.__wbindgen_add_to_stack_pointer(16);
2355
- heap[stack_pointer++] = undefined;
2356
- }
2357
- }
2358
- /**
2359
- * @param {Drawing} drawing
2360
- * @returns {number}
2361
- */
2362
- apply(drawing) {
2363
- _assertClass(drawing, Drawing);
2364
- const ret = wasm.stressmajorization_apply(this.ptr, drawing.ptr);
2365
- return ret;
2366
- }
2367
- /**
2368
- * @param {Drawing} drawing
2369
- */
2370
- run(drawing) {
2371
- _assertClass(drawing, Drawing);
2372
- wasm.stressmajorization_run(this.ptr, drawing.ptr);
2373
- }
2374
- }
2375
-
2376
- async function load(module, imports) {
2377
- if (typeof Response === 'function' && module instanceof Response) {
2378
- if (typeof WebAssembly.instantiateStreaming === 'function') {
2379
- try {
2380
- return await WebAssembly.instantiateStreaming(module, imports);
2381
-
2382
- } catch (e) {
2383
- if (module.headers.get('Content-Type') != 'application/wasm') {
2384
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
2385
-
2386
- } else {
2387
- throw e;
2388
- }
2389
- }
2390
- }
2391
-
2392
- const bytes = await module.arrayBuffer();
2393
- return await WebAssembly.instantiate(bytes, imports);
2394
-
2395
- } else {
2396
- const instance = await WebAssembly.instantiate(module, imports);
2397
-
2398
- if (instance instanceof WebAssembly.Instance) {
2399
- return { instance, module };
2400
-
2401
- } else {
2402
- return instance;
2403
- }
2404
- }
2405
- }
2406
-
2407
- function getImports() {
2408
- const imports = {};
2409
- imports.wbg = {};
2410
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2411
- takeObject(arg0);
2412
- };
2413
- imports.wbg.__wbindgen_number_new = function(arg0) {
2414
- const ret = arg0;
2415
- return addHeapObject(ret);
2416
- };
2417
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2418
- const ret = getStringFromWasm0(arg0, arg1);
2419
- return addHeapObject(ret);
2420
- };
2421
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
2422
- const obj = getObject(arg1);
2423
- const ret = typeof(obj) === 'number' ? obj : undefined;
2424
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
2425
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
2426
- };
2427
- imports.wbg.__wbindgen_is_null = function(arg0) {
2428
- const ret = getObject(arg0) === null;
2429
- return ret;
2430
- };
2431
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
2432
- const ret = typeof(getObject(arg0)) === 'bigint';
2433
- return ret;
2434
- };
2435
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2436
- const ret = BigInt.asUintN(64, arg0);
2437
- return addHeapObject(ret);
2438
- };
2439
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2440
- const ret = getObject(arg0) === getObject(arg1);
2441
- return ret;
2442
- };
2443
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
2444
- const ret = getObject(arg0) === undefined;
2445
- return ret;
2446
- };
2447
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2448
- const ret = getObject(arg0);
2449
- return addHeapObject(ret);
2450
- };
2451
- imports.wbg.__wbindgen_is_string = function(arg0) {
2452
- const ret = typeof(getObject(arg0)) === 'string';
2453
- return ret;
2454
- };
2455
- imports.wbg.__wbg_graph_new = function(arg0) {
2456
- const ret = Graph.__wrap(arg0);
2457
- return addHeapObject(ret);
2458
- };
2459
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2460
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2461
- return addHeapObject(ret);
2462
- };
2463
- imports.wbg.__wbindgen_is_object = function(arg0) {
2464
- const val = getObject(arg0);
2465
- const ret = typeof(val) === 'object' && val !== null;
2466
- return ret;
2467
- };
2468
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2469
- const ret = getObject(arg0) == getObject(arg1);
2470
- return ret;
2471
- };
2472
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
2473
- const v = getObject(arg0);
2474
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
2475
- return ret;
2476
- };
2477
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2478
- const obj = getObject(arg1);
2479
- const ret = typeof(obj) === 'string' ? obj : undefined;
2480
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2481
- var len0 = WASM_VECTOR_LEN;
2482
- getInt32Memory0()[arg0 / 4 + 1] = len0;
2483
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2484
- };
2485
- imports.wbg.__wbg_String_91fba7ded13ba54c = function(arg0, arg1) {
2486
- const ret = String(getObject(arg1));
2487
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2488
- const len0 = WASM_VECTOR_LEN;
2489
- getInt32Memory0()[arg0 / 4 + 1] = len0;
2490
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2491
- };
2492
- imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
2493
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2494
- };
2495
- imports.wbg.__wbg_randomFillSync_6894564c2c334c42 = function() { return handleError(function (arg0, arg1, arg2) {
2496
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
2497
- }, arguments) };
2498
- imports.wbg.__wbg_getRandomValues_805f1c3d65988a5a = function() { return handleError(function (arg0, arg1) {
2499
- getObject(arg0).getRandomValues(getObject(arg1));
2500
- }, arguments) };
2501
- imports.wbg.__wbg_crypto_e1d53a1d73fb10b8 = function(arg0) {
2502
- const ret = getObject(arg0).crypto;
2503
- return addHeapObject(ret);
2504
- };
2505
- imports.wbg.__wbg_process_038c26bf42b093f8 = function(arg0) {
2506
- const ret = getObject(arg0).process;
2507
- return addHeapObject(ret);
2508
- };
2509
- imports.wbg.__wbg_versions_ab37218d2f0b24a8 = function(arg0) {
2510
- const ret = getObject(arg0).versions;
2511
- return addHeapObject(ret);
2512
- };
2513
- imports.wbg.__wbg_node_080f4b19d15bc1fe = function(arg0) {
2514
- const ret = getObject(arg0).node;
2515
- return addHeapObject(ret);
2516
- };
2517
- imports.wbg.__wbg_msCrypto_6e7d3e1f92610cbb = function(arg0) {
2518
- const ret = getObject(arg0).msCrypto;
2519
- return addHeapObject(ret);
2520
- };
2521
- imports.wbg.__wbg_require_78a3dcfbdba9cbce = function() { return handleError(function () {
2522
- const ret = module.require;
2523
- return addHeapObject(ret);
2524
- }, arguments) };
2525
- imports.wbg.__wbindgen_is_function = function(arg0) {
2526
- const ret = typeof(getObject(arg0)) === 'function';
2527
- return ret;
2528
- };
2529
- imports.wbg.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
2530
- const ret = getObject(arg0)[arg1 >>> 0];
2531
- return addHeapObject(ret);
2532
- };
2533
- imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
2534
- const ret = getObject(arg0).length;
2535
- return ret;
2536
- };
2537
- imports.wbg.__wbg_new_b525de17f44a8943 = function() {
2538
- const ret = new Array();
2539
- return addHeapObject(ret);
2540
- };
2541
- imports.wbg.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) {
2542
- const ret = new Function(getStringFromWasm0(arg0, arg1));
2543
- return addHeapObject(ret);
2544
- };
2545
- imports.wbg.__wbg_new_f841cc6f2098f4b5 = function() {
2546
- const ret = new Map();
2547
- return addHeapObject(ret);
2548
- };
2549
- imports.wbg.__wbg_next_b7d530c04fd8b217 = function(arg0) {
2550
- const ret = getObject(arg0).next;
2551
- return addHeapObject(ret);
2552
- };
2553
- imports.wbg.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
2554
- const ret = getObject(arg0).next();
2555
- return addHeapObject(ret);
2556
- }, arguments) };
2557
- imports.wbg.__wbg_done_1ebec03bbd919843 = function(arg0) {
2558
- const ret = getObject(arg0).done;
2559
- return ret;
2560
- };
2561
- imports.wbg.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
2562
- const ret = getObject(arg0).value;
2563
- return addHeapObject(ret);
2564
- };
2565
- imports.wbg.__wbg_iterator_55f114446221aa5a = function() {
2566
- const ret = Symbol.iterator;
2567
- return addHeapObject(ret);
2568
- };
2569
- imports.wbg.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
2570
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
2571
- return addHeapObject(ret);
2572
- }, arguments) };
2573
- imports.wbg.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) {
2574
- const ret = getObject(arg0).call(getObject(arg1));
2575
- return addHeapObject(ret);
2576
- }, arguments) };
2577
- imports.wbg.__wbg_new_f9876326328f45ed = function() {
2578
- const ret = new Object();
2579
- return addHeapObject(ret);
2580
- };
2581
- imports.wbg.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () {
2582
- const ret = self.self;
2583
- return addHeapObject(ret);
2584
- }, arguments) };
2585
- imports.wbg.__wbg_window_a09ec664e14b1b81 = function() { return handleError(function () {
2586
- const ret = window.window;
2587
- return addHeapObject(ret);
2588
- }, arguments) };
2589
- imports.wbg.__wbg_globalThis_87cbb8506fecf3a9 = function() { return handleError(function () {
2590
- const ret = globalThis.globalThis;
2591
- return addHeapObject(ret);
2592
- }, arguments) };
2593
- imports.wbg.__wbg_global_c85a9259e621f3db = function() { return handleError(function () {
2594
- const ret = global.global;
2595
- return addHeapObject(ret);
2596
- }, arguments) };
2597
- imports.wbg.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
2598
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2599
- };
2600
- imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
2601
- const ret = Array.isArray(getObject(arg0));
2602
- return ret;
2603
- };
2604
- imports.wbg.__wbg_push_49c286f04dd3bf59 = function(arg0, arg1) {
2605
- const ret = getObject(arg0).push(getObject(arg1));
2606
- return ret;
2607
- };
2608
- imports.wbg.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
2609
- let result;
2610
- try {
2611
- result = getObject(arg0) instanceof ArrayBuffer;
2612
- } catch {
2613
- result = false;
2614
- }
2615
- const ret = result;
2616
- return ret;
2617
- };
2618
- imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
2619
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2620
- return addHeapObject(ret);
2621
- }, arguments) };
2622
- imports.wbg.__wbg_call_96878afb7a8201ca = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2623
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2624
- return addHeapObject(ret);
2625
- }, arguments) };
2626
- imports.wbg.__wbg_set_388c4c6422704173 = function(arg0, arg1, arg2) {
2627
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2628
- return addHeapObject(ret);
2629
- };
2630
- imports.wbg.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
2631
- const ret = Number.isSafeInteger(getObject(arg0));
2632
- return ret;
2633
- };
2634
- imports.wbg.__wbg_entries_4e1315b774245952 = function(arg0) {
2635
- const ret = Object.entries(getObject(arg0));
2636
- return addHeapObject(ret);
2637
- };
2638
- imports.wbg.__wbg_buffer_cf65c07de34b9a08 = function(arg0) {
2639
- const ret = getObject(arg0).buffer;
2640
- return addHeapObject(ret);
2641
- };
2642
- imports.wbg.__wbg_new_537b7341ce90bb31 = function(arg0) {
2643
- const ret = new Uint8Array(getObject(arg0));
2644
- return addHeapObject(ret);
2645
- };
2646
- imports.wbg.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
2647
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2648
- };
2649
- imports.wbg.__wbg_length_27a2afe8ab42b09f = function(arg0) {
2650
- const ret = getObject(arg0).length;
2651
- return ret;
2652
- };
2653
- imports.wbg.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
2654
- let result;
2655
- try {
2656
- result = getObject(arg0) instanceof Uint8Array;
2657
- } catch {
2658
- result = false;
2659
- }
2660
- const ret = result;
2661
- return ret;
2662
- };
2663
- imports.wbg.__wbg_newwithlength_b56c882b57805732 = function(arg0) {
2664
- const ret = new Uint8Array(arg0 >>> 0);
2665
- return addHeapObject(ret);
2666
- };
2667
- imports.wbg.__wbg_subarray_7526649b91a252a6 = function(arg0, arg1, arg2) {
2668
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2669
- return addHeapObject(ret);
2670
- };
2671
- imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
2672
- const v = getObject(arg1);
2673
- const ret = typeof(v) === 'bigint' ? v : undefined;
2674
- getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
2675
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
2676
- };
2677
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
2678
- const ret = debugString(getObject(arg1));
2679
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2680
- const len0 = WASM_VECTOR_LEN;
2681
- getInt32Memory0()[arg0 / 4 + 1] = len0;
2682
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2683
- };
2684
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
2685
- throw new Error(getStringFromWasm0(arg0, arg1));
2686
- };
2687
- imports.wbg.__wbindgen_memory = function() {
2688
- const ret = wasm.memory;
2689
- return addHeapObject(ret);
2690
- };
2691
-
2692
- return imports;
2693
- }
2694
-
2695
- function finalizeInit(instance, module) {
2696
- wasm = instance.exports;
2697
- init.__wbindgen_wasm_module = module;
2698
- cachedBigInt64Memory0 = null;
2699
- cachedFloat32Memory0 = null;
2700
- cachedFloat64Memory0 = null;
2701
- cachedInt32Memory0 = null;
2702
- cachedUint8Memory0 = null;
2703
-
2704
-
2705
- return wasm;
2706
- }
2707
-
2708
- function initSync(module) {
2709
- const imports = getImports();
2710
-
2711
- if (!(module instanceof WebAssembly.Module)) {
2712
- module = new WebAssembly.Module(module);
2713
- }
2714
-
2715
- const instance = new WebAssembly.Instance(module, imports);
2716
-
2717
- return finalizeInit(instance, module);
2718
- }
2719
-
2720
- async function init(input) {
2721
- if (typeof input === 'undefined') {
2722
- input = new URL('egraph_wasm_bg.wasm', (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('egraph.js', document.baseURI).href)));
2723
- }
2724
- const imports = getImports();
2725
-
2726
- if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
2727
- input = fetch(input);
2728
- }
2729
-
2730
- const { instance, module } = await load(await input, imports);
2731
-
2732
- return finalizeInit(instance, module);
2733
- }
2734
-
2735
- exports.ClassicalMds = ClassicalMds;
2736
- exports.CollideForce = CollideForce;
2737
- exports.Coordinates = Coordinates;
2738
- exports.DiGraph = DiGraph;
2739
- exports.Drawing = Drawing;
2740
- exports.ForceAtlas2 = ForceAtlas2;
2741
- exports.FruchtermanReingoldForce = FruchtermanReingoldForce;
2742
- exports.FullSgd = FullSgd;
2743
- exports.Graph = Graph;
2744
- exports.GroupLinkForce = GroupLinkForce;
2745
- exports.GroupManyBodyForce = GroupManyBodyForce;
2746
- exports.GroupPositionForce = GroupPositionForce;
2747
- exports.HyperbolicSpace = HyperbolicSpace;
2748
- exports.KamadaKawai = KamadaKawai;
2749
- exports.LinkForce = LinkForce;
2750
- exports.ManyBodyForce = ManyBodyForce;
2751
- exports.PivotMds = PivotMds;
2752
- exports.PositionForce = PositionForce;
2753
- exports.RadialForce = RadialForce;
2754
- exports.Rng = Rng;
2755
- exports.SgdScheduler = SgdScheduler;
2756
- exports.Simulation = Simulation;
2757
- exports.SparseSgd = SparseSgd;
2758
- exports.SphericalSpace = SphericalSpace;
2759
- exports.StressMajorization = StressMajorization;
2760
- exports.coarsen = coarsen;
2761
- exports.crossingNumber = crossingNumber;
2762
- exports.fdeb = fdeb;
2763
- exports.fm3 = fm3;
2764
- exports.init = init;
2765
- exports.initSync = initSync;
2766
- exports.neighborhoodPreservation = neighborhoodPreservation;
2767
- exports.stress = stress;
2768
-
2769
- Object.defineProperty(exports, '__esModule', { value: true });
2770
-
2771
- })));