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

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