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.
Binary file
@@ -1,648 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * @param {Graph} graph
5
- * @param {Function} groups
6
- * @param {Function} shrink_node
7
- * @param {Function} shrink_edge
8
- * @returns {any}
9
- */
10
- export function coarsen(graph: Graph, groups: Function, shrink_node: Function, shrink_edge: Function): any;
11
- /**
12
- * @param {Graph} graph
13
- * @param {any} coordinates
14
- * @returns {any}
15
- */
16
- export function fdeb(graph: Graph, coordinates: any): any;
17
- /**
18
- * @param {Graph} graph
19
- * @param {number} min_size
20
- * @param {number} step_iteration
21
- * @param {Function} _shrink_node
22
- * @param {Function} _shrink_edge
23
- * @param {Function} _link_distance_accessor
24
- * @returns {Coordinates}
25
- */
26
- export function fm3(graph: Graph, min_size: number, step_iteration: number, _shrink_node: Function, _shrink_edge: Function, _link_distance_accessor: Function): Coordinates;
27
- /**
28
- * @param {Graph} graph
29
- * @param {Coordinates} coordinates
30
- * @param {Function} _length
31
- * @param {number} eps
32
- * @param {number} width
33
- * @param {number} height
34
- * @returns {any}
35
- */
36
- export function kamadaKawai(graph: Graph, coordinates: Coordinates, _length: Function, eps: number, width: number, height: number): any;
37
- /**
38
- */
39
- export class CollideForce {
40
- free(): void;
41
- /**
42
- * @param {Graph} graph
43
- * @param {Function} f
44
- * @param {any} options
45
- */
46
- constructor(graph: Graph, f: Function, options: any);
47
- /**
48
- * @param {Coordinates} context
49
- * @param {number} alpha
50
- */
51
- apply(context: Coordinates, alpha: number): void;
52
- }
53
- /**
54
- */
55
- export class Coordinates {
56
- free(): void;
57
- /**
58
- * @param {number} u
59
- * @returns {number | undefined}
60
- */
61
- x(u: number): number | undefined;
62
- /**
63
- * @param {number} u
64
- * @returns {number | undefined}
65
- */
66
- y(u: number): number | undefined;
67
- /**
68
- * @param {number} u
69
- * @param {number} x
70
- */
71
- setX(u: number, x: number): void;
72
- /**
73
- * @param {number} u
74
- * @param {number} y
75
- */
76
- setY(u: number, y: number): void;
77
- /**
78
- * @param {number} u
79
- * @returns {number | undefined}
80
- */
81
- vx(u: number): number | undefined;
82
- /**
83
- * @param {number} u
84
- * @returns {number | undefined}
85
- */
86
- vy(u: number): number | undefined;
87
- /**
88
- * @returns {number}
89
- */
90
- len(): number;
91
- /**
92
- * @returns {any}
93
- */
94
- toJSON(): any;
95
- /**
96
- */
97
- centralize(): void;
98
- /**
99
- * @param {number} velocity_decay
100
- */
101
- updatePosition(velocity_decay: number): void;
102
- /**
103
- * @param {number} x0
104
- * @param {number} y0
105
- * @param {number} x1
106
- * @param {number} y1
107
- */
108
- clampRegion(x0: number, y0: number, x1: number, y1: number): void;
109
- /**
110
- * @param {Graph} graph
111
- * @returns {Coordinates}
112
- */
113
- static initialPlacement(graph: Graph): Coordinates;
114
- }
115
- /**
116
- */
117
- export class FruchtermanReingoldForce {
118
- free(): void;
119
- /**
120
- * @param {Graph} graph
121
- * @param {number} k
122
- * @param {number} min_distance
123
- */
124
- constructor(graph: Graph, k: number, min_distance: number);
125
- /**
126
- * @param {Coordinates} coordinates
127
- * @param {number} alpha
128
- */
129
- apply(coordinates: Coordinates, alpha: number): void;
130
- /**
131
- * @param {number} u
132
- * @param {Coordinates} coordinates
133
- * @param {number} alpha
134
- */
135
- applyToNode(u: number, coordinates: Coordinates, alpha: number): void;
136
- }
137
- /**
138
- */
139
- export class Graph {
140
- free(): void;
141
- /**
142
- */
143
- constructor();
144
- /**
145
- * @returns {number}
146
- */
147
- nodeCount(): number;
148
- /**
149
- * @returns {number}
150
- */
151
- edgeCount(): number;
152
- /**
153
- * @param {any} value
154
- * @returns {number}
155
- */
156
- addNode(value: any): number;
157
- /**
158
- * @param {number} a
159
- * @returns {any}
160
- */
161
- nodeWeight(a: number): any;
162
- /**
163
- * @param {number} a
164
- * @param {number} b
165
- * @param {any} value
166
- * @returns {number}
167
- */
168
- addEdge(a: number, b: number, value: any): number;
169
- /**
170
- * @param {number} e
171
- * @returns {any}
172
- */
173
- edgeWeight(e: number): any;
174
- /**
175
- * @param {number} e
176
- * @returns {Array<any>}
177
- */
178
- edgeEndpoints(e: number): Array<any>;
179
- /**
180
- * @param {number} a
181
- * @returns {any}
182
- */
183
- removeNode(a: number): any;
184
- /**
185
- * @param {number} e
186
- * @returns {any}
187
- */
188
- removeEdge(e: number): any;
189
- /**
190
- * @param {number} a
191
- * @returns {Array<any>}
192
- */
193
- neighbors(a: number): Array<any>;
194
- /**
195
- * @param {number} a
196
- * @param {number} dir
197
- * @returns {Array<any>}
198
- */
199
- neighborsDirected(a: number, dir: number): Array<any>;
200
- /**
201
- * @param {number} a
202
- * @returns {Array<any>}
203
- */
204
- neighborsUndirected(a: number): Array<any>;
205
- /**
206
- * @param {number} a
207
- * @returns {Array<any>}
208
- */
209
- edges(a: number): Array<any>;
210
- /**
211
- * @param {number} a
212
- * @param {number} b
213
- * @returns {boolean}
214
- */
215
- containsEdge(a: number, b: number): boolean;
216
- /**
217
- * @param {number} a
218
- * @param {number} b
219
- * @returns {number}
220
- */
221
- findEdge(a: number, b: number): number;
222
- /**
223
- * @param {number} dir
224
- * @returns {Array<any>}
225
- */
226
- externals(dir: number): Array<any>;
227
- /**
228
- * @returns {Array<any>}
229
- */
230
- nodeIndices(): Array<any>;
231
- /**
232
- * @returns {Array<any>}
233
- */
234
- edgeIndices(): Array<any>;
235
- /**
236
- * @param {Function} node_map
237
- * @param {Function} edge_map
238
- * @returns {Graph}
239
- */
240
- map(node_map: Function, edge_map: Function): Graph;
241
- /**
242
- * @param {Function} node_map
243
- * @param {Function} edge_map
244
- * @returns {Graph}
245
- */
246
- filterMap(node_map: Function, edge_map: Function): Graph;
247
- }
248
- /**
249
- */
250
- export class GroupLinkForce {
251
- free(): void;
252
- /**
253
- * @param {Graph} graph
254
- * @param {Function} group_accessor
255
- * @param {Function} inter_link_accessor
256
- * @param {Function} intra_link_accessor
257
- */
258
- constructor(graph: Graph, group_accessor: Function, inter_link_accessor: Function, intra_link_accessor: Function);
259
- /**
260
- * @param {Coordinates} coordinates
261
- * @param {number} alpha
262
- */
263
- apply(coordinates: Coordinates, alpha: number): void;
264
- }
265
- /**
266
- */
267
- export class GroupManyBodyForce {
268
- free(): void;
269
- /**
270
- * @param {Graph} graph
271
- * @param {Function} node_accessor
272
- */
273
- constructor(graph: Graph, node_accessor: Function);
274
- /**
275
- * @param {Coordinates} coordinates
276
- * @param {number} alpha
277
- */
278
- apply(coordinates: Coordinates, alpha: number): void;
279
- }
280
- /**
281
- */
282
- export class GroupPositionForce {
283
- free(): void;
284
- /**
285
- * @param {Graph} graph
286
- * @param {Function} node_accessor
287
- * @param {Function} group_accessor
288
- */
289
- constructor(graph: Graph, node_accessor: Function, group_accessor: Function);
290
- /**
291
- * @param {Coordinates} coordinates
292
- * @param {number} alpha
293
- */
294
- apply(coordinates: Coordinates, alpha: number): void;
295
- }
296
- /**
297
- */
298
- export class HyperbolicSpace {
299
- free(): void;
300
- /**
301
- * @param {any} a
302
- * @param {any} b
303
- * @returns {any}
304
- */
305
- static toTangentSpace(a: any, b: any): any;
306
- /**
307
- * @param {any} a
308
- * @param {any} b
309
- * @returns {any}
310
- */
311
- static fromTangentSpace(a: any, b: any): any;
312
- /**
313
- * @param {number} i
314
- * @param {Coordinates} riemann_space
315
- * @param {Coordinates} tangent_space
316
- */
317
- static mapToTangentSpace(i: number, riemann_space: Coordinates, tangent_space: Coordinates): void;
318
- /**
319
- * @param {number} i
320
- * @param {Coordinates} riemann_space
321
- * @param {Coordinates} tangent_space
322
- * @param {number} velocity_decay
323
- */
324
- static updatePosition(i: number, riemann_space: Coordinates, tangent_space: Coordinates, velocity_decay: number): void;
325
- }
326
- /**
327
- */
328
- export class KamadaKawai {
329
- free(): void;
330
- /**
331
- * @param {Graph} graph
332
- * @param {Function} f
333
- */
334
- constructor(graph: Graph, f: Function);
335
- /**
336
- * @param {Coordinates} coordinates
337
- * @returns {number | undefined}
338
- */
339
- selectNode(coordinates: Coordinates): number | undefined;
340
- /**
341
- * @param {number} m
342
- * @param {Coordinates} coordinates
343
- */
344
- applyToNode(m: number, coordinates: Coordinates): void;
345
- /**
346
- * @param {Coordinates} coordinates
347
- */
348
- run(coordinates: Coordinates): void;
349
- }
350
- /**
351
- */
352
- export class LinkForce {
353
- free(): void;
354
- /**
355
- * @param {Graph} graph
356
- * @param {Function} f
357
- */
358
- constructor(graph: Graph, f: Function);
359
- /**
360
- * @param {Coordinates} coordinates
361
- * @param {number} alpha
362
- */
363
- apply(coordinates: Coordinates, alpha: number): void;
364
- /**
365
- * @param {number} u
366
- * @param {Coordinates} coordinates
367
- * @param {number} alpha
368
- */
369
- applyToNode(u: number, coordinates: Coordinates, alpha: number): void;
370
- }
371
- /**
372
- */
373
- export class ManyBodyForce {
374
- free(): void;
375
- /**
376
- * @param {Graph} graph
377
- * @param {Function} f
378
- */
379
- constructor(graph: Graph, f: Function);
380
- /**
381
- * @param {Coordinates} coordinates
382
- * @param {number} alpha
383
- */
384
- apply(coordinates: Coordinates, alpha: number): void;
385
- /**
386
- * @param {number} u
387
- * @param {Coordinates} coordinates
388
- * @param {number} alpha
389
- */
390
- applyToNode(u: number, coordinates: Coordinates, alpha: number): void;
391
- }
392
- /**
393
- */
394
- export class PositionForce {
395
- free(): void;
396
- /**
397
- * @param {Graph} graph
398
- * @param {Function} f
399
- */
400
- constructor(graph: Graph, f: Function);
401
- /**
402
- * @param {Coordinates} coordinates
403
- * @param {number} alpha
404
- */
405
- apply(coordinates: Coordinates, alpha: number): void;
406
- /**
407
- * @param {number} u
408
- * @param {Coordinates} coordinates
409
- * @param {number} alpha
410
- */
411
- applyToNode(u: number, coordinates: Coordinates, alpha: number): void;
412
- }
413
- /**
414
- */
415
- export class RadialForce {
416
- free(): void;
417
- /**
418
- * @param {Graph} graph
419
- * @param {Function} f
420
- */
421
- constructor(graph: Graph, f: Function);
422
- /**
423
- * @param {Coordinates} coordinates
424
- * @param {number} alpha
425
- */
426
- apply(coordinates: Coordinates, alpha: number): void;
427
- /**
428
- * @param {number} u
429
- * @param {Coordinates} coordinates
430
- * @param {number} alpha
431
- */
432
- applyToNode(u: number, coordinates: Coordinates, alpha: number): void;
433
- }
434
- /**
435
- */
436
- export class Simulation {
437
- free(): void;
438
- /**
439
- */
440
- constructor();
441
- /**
442
- * @param {Function} f
443
- */
444
- run(f: Function): void;
445
- /**
446
- * @param {number} n
447
- * @param {Function} f
448
- */
449
- runStep(n: number, f: Function): void;
450
- /**
451
- * @returns {boolean}
452
- */
453
- isFinished(): boolean;
454
- /**
455
- * @param {number} alpha_start
456
- */
457
- reset(alpha_start: number): void;
458
- /**
459
- * @returns {number}
460
- */
461
- alphaMin: number;
462
- /**
463
- * @returns {number}
464
- */
465
- alphaStart: number;
466
- /**
467
- * @returns {number}
468
- */
469
- alphaTarget: number;
470
- /**
471
- * @returns {number}
472
- */
473
- iterations: number;
474
- }
475
- /**
476
- */
477
- export class SphericalSpace {
478
- free(): void;
479
- /**
480
- * @param {any} a
481
- * @param {any} b
482
- * @returns {any}
483
- */
484
- static toTangentSpace(a: any, b: any): any;
485
- /**
486
- * @param {any} a
487
- * @param {any} b
488
- * @returns {any}
489
- */
490
- static fromTangentSpace(a: any, b: any): any;
491
- /**
492
- * @param {number} i
493
- * @param {Coordinates} riemann_space
494
- * @param {Coordinates} tangent_space
495
- */
496
- static mapToTangentSpace(i: number, riemann_space: Coordinates, tangent_space: Coordinates): void;
497
- /**
498
- * @param {number} i
499
- * @param {Coordinates} riemann_space
500
- * @param {Coordinates} tangent_space
501
- * @param {number} velocity_decay
502
- */
503
- static updatePosition(i: number, riemann_space: Coordinates, tangent_space: Coordinates, velocity_decay: number): void;
504
- }
505
- /**
506
- */
507
- export class StressMajorization {
508
- free(): void;
509
- /**
510
- * @param {Graph} graph
511
- * @param {Coordinates} coordinates
512
- * @param {Function} f
513
- */
514
- constructor(graph: Graph, coordinates: Coordinates, f: Function);
515
- /**
516
- * @param {Coordinates} coordinates
517
- * @returns {number}
518
- */
519
- apply(coordinates: Coordinates): number;
520
- /**
521
- * @param {Coordinates} coordinates
522
- */
523
- run(coordinates: Coordinates): void;
524
- }
525
-
526
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
527
-
528
- export interface InitOutput {
529
- readonly memory: WebAssembly.Memory;
530
- readonly coarsen: (a: number, b: number, c: number, d: number) => number;
531
- readonly __wbg_stressmajorization_free: (a: number) => void;
532
- readonly stressmajorization_new: (a: number, b: number, c: number) => number;
533
- readonly stressmajorization_apply: (a: number, b: number) => number;
534
- readonly stressmajorization_run: (a: number, b: number) => void;
535
- readonly fdeb: (a: number, b: number) => number;
536
- readonly fm3: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
537
- readonly hyperbolicspace_toTangentSpace: (a: number, b: number) => number;
538
- readonly hyperbolicspace_fromTangentSpace: (a: number, b: number) => number;
539
- readonly hyperbolicspace_mapToTangentSpace: (a: number, b: number, c: number) => void;
540
- readonly hyperbolicspace_updatePosition: (a: number, b: number, c: number, d: number) => void;
541
- readonly sphericalspace_toTangentSpace: (a: number, b: number) => number;
542
- readonly sphericalspace_fromTangentSpace: (a: number, b: number) => number;
543
- readonly sphericalspace_mapToTangentSpace: (a: number, b: number, c: number) => void;
544
- readonly sphericalspace_updatePosition: (a: number, b: number, c: number, d: number) => void;
545
- readonly __wbg_hyperbolicspace_free: (a: number) => void;
546
- readonly __wbg_sphericalspace_free: (a: number) => void;
547
- readonly __wbg_coordinates_free: (a: number) => void;
548
- readonly coordinates_x: (a: number, b: number, c: number) => void;
549
- readonly coordinates_y: (a: number, b: number, c: number) => void;
550
- readonly coordinates_setX: (a: number, b: number, c: number) => void;
551
- readonly coordinates_setY: (a: number, b: number, c: number) => void;
552
- readonly coordinates_vx: (a: number, b: number, c: number) => void;
553
- readonly coordinates_vy: (a: number, b: number, c: number) => void;
554
- readonly coordinates_len: (a: number) => number;
555
- readonly coordinates_toJSON: (a: number) => number;
556
- readonly coordinates_centralize: (a: number) => void;
557
- readonly coordinates_updatePosition: (a: number, b: number) => void;
558
- readonly coordinates_clampRegion: (a: number, b: number, c: number, d: number, e: number) => void;
559
- readonly coordinates_initialPlacement: (a: number) => number;
560
- readonly __wbg_grouplinkforce_free: (a: number) => void;
561
- readonly grouplinkforce_new: (a: number, b: number, c: number, d: number) => number;
562
- readonly grouplinkforce_apply: (a: number, b: number, c: number) => void;
563
- readonly __wbg_groupmanybodyforce_free: (a: number) => void;
564
- readonly groupmanybodyforce_new: (a: number, b: number) => number;
565
- readonly groupmanybodyforce_apply: (a: number, b: number, c: number) => void;
566
- readonly __wbg_grouppositionforce_free: (a: number) => void;
567
- readonly grouppositionforce_new: (a: number, b: number, c: number) => number;
568
- readonly grouppositionforce_apply: (a: number, b: number, c: number) => void;
569
- readonly __wbg_graph_free: (a: number) => void;
570
- readonly graph_new: () => number;
571
- readonly graph_nodeCount: (a: number) => number;
572
- readonly graph_edgeCount: (a: number) => number;
573
- readonly graph_addNode: (a: number, b: number) => number;
574
- readonly graph_nodeWeight: (a: number, b: number) => number;
575
- readonly graph_addEdge: (a: number, b: number, c: number, d: number) => number;
576
- readonly graph_edgeWeight: (a: number, b: number) => number;
577
- readonly graph_edgeEndpoints: (a: number, b: number) => number;
578
- readonly graph_removeNode: (a: number, b: number) => number;
579
- readonly graph_removeEdge: (a: number, b: number) => number;
580
- readonly graph_neighbors: (a: number, b: number) => number;
581
- readonly graph_neighborsDirected: (a: number, b: number, c: number) => number;
582
- readonly graph_neighborsUndirected: (a: number, b: number) => number;
583
- readonly graph_edges: (a: number, b: number) => number;
584
- readonly graph_containsEdge: (a: number, b: number, c: number) => number;
585
- readonly graph_findEdge: (a: number, b: number, c: number) => number;
586
- readonly graph_externals: (a: number, b: number) => number;
587
- readonly graph_nodeIndices: (a: number) => number;
588
- readonly graph_edgeIndices: (a: number) => number;
589
- readonly graph_map: (a: number, b: number, c: number) => number;
590
- readonly graph_filterMap: (a: number, b: number, c: number) => number;
591
- readonly __wbg_simulation_free: (a: number) => void;
592
- readonly simulation_new: () => number;
593
- readonly simulation_run: (a: number, b: number) => void;
594
- readonly simulation_runStep: (a: number, b: number, c: number) => void;
595
- readonly simulation_isFinished: (a: number) => number;
596
- readonly simulation_reset: (a: number, b: number) => void;
597
- readonly simulation_alpha: (a: number) => number;
598
- readonly simulation_set_alpha: (a: number, b: number) => void;
599
- readonly simulation_alpha_min: (a: number) => number;
600
- readonly simulation_set_alpha_min: (a: number, b: number) => void;
601
- readonly simulation_alpha_target: (a: number) => number;
602
- readonly simulation_set_alpha_target: (a: number, b: number) => void;
603
- readonly simulation_iterations: (a: number) => number;
604
- readonly simulation_set_iterations: (a: number, b: number) => void;
605
- readonly __wbg_collideforce_free: (a: number) => void;
606
- readonly collideforce_new: (a: number, b: number, c: number) => number;
607
- readonly collideforce_apply: (a: number, b: number, c: number) => void;
608
- readonly __wbg_linkforce_free: (a: number) => void;
609
- readonly linkforce_new: (a: number, b: number) => number;
610
- readonly linkforce_apply: (a: number, b: number, c: number) => void;
611
- readonly linkforce_applyToNode: (a: number, b: number, c: number, d: number) => void;
612
- readonly __wbg_manybodyforce_free: (a: number) => void;
613
- readonly manybodyforce_new: (a: number, b: number) => number;
614
- readonly manybodyforce_apply: (a: number, b: number, c: number) => void;
615
- readonly manybodyforce_applyToNode: (a: number, b: number, c: number, d: number) => void;
616
- readonly __wbg_positionforce_free: (a: number) => void;
617
- readonly positionforce_new: (a: number, b: number) => number;
618
- readonly positionforce_apply: (a: number, b: number, c: number) => void;
619
- readonly positionforce_applyToNode: (a: number, b: number, c: number, d: number) => void;
620
- readonly __wbg_radialforce_free: (a: number) => void;
621
- readonly radialforce_new: (a: number, b: number) => number;
622
- readonly radialforce_apply: (a: number, b: number, c: number) => void;
623
- readonly radialforce_applyToNode: (a: number, b: number, c: number, d: number) => void;
624
- readonly __wbg_fruchtermanreingoldforce_free: (a: number) => void;
625
- readonly fruchtermanreingoldforce_new: (a: number, b: number, c: number) => number;
626
- readonly fruchtermanreingoldforce_apply: (a: number, b: number, c: number) => void;
627
- readonly fruchtermanreingoldforce_applyToNode: (a: number, b: number, c: number, d: number) => void;
628
- readonly kamadaKawai: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
629
- readonly __wbg_kamadakawai_free: (a: number) => void;
630
- readonly kamadakawai_new: (a: number, b: number) => number;
631
- readonly kamadakawai_selectNode: (a: number, b: number, c: number) => void;
632
- readonly kamadakawai_applyToNode: (a: number, b: number, c: number) => void;
633
- readonly kamadakawai_run: (a: number, b: number) => void;
634
- readonly __wbindgen_malloc: (a: number) => number;
635
- readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
636
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
637
- readonly __wbindgen_exn_store: (a: number) => void;
638
- }
639
-
640
- /**
641
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
642
- * for everything else, calls `WebAssembly.instantiate` directly.
643
- *
644
- * @param {InitInput | Promise<InitInput>} module_or_path
645
- *
646
- * @returns {Promise<InitOutput>}
647
- */
648
- export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;