egraph 6.0.0-alpha.8 → 6.0.0-alpha.9

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/pkg/index.js CHANGED
@@ -1,13 +1,14 @@
1
1
  /* @ts-self-types="./index.d.ts" */
2
2
  import init, {
3
- Layout2d as _Layout2d,
4
- LayoutNd as _LayoutNd,
3
+ AdjustedPatchNigDetail,
5
4
  AmgPcgBatchResult,
6
5
  AmgPcgSolveResult,
7
6
  AmgPcgSolver,
8
7
  AnisotropicLaplacianResult,
8
+ ArenaOctree3d as _ArenaOctree3d,
9
9
  BackboneResult,
10
10
  BackboneSolver,
11
+ ChebyshevDogKernel,
11
12
  ClassDensityResult,
12
13
  ClusterAreaReport,
13
14
  ClusterRefineSolver,
@@ -18,33 +19,39 @@ import init, {
18
19
  CrossingSummary,
19
20
  CsrGraph,
20
21
  CsrMatrix,
22
+ DatasetInfo,
21
23
  DelaunayResult,
24
+ DijkstraWorkspace,
22
25
  DogStats,
23
26
  DogVaradhanLandmarks,
27
+ DynamicKdTree as _DynamicKdTree,
24
28
  EffectiveResistanceResult,
25
29
  EigenResult,
26
- FdebSolver,
30
+ FdebSolver as _FdebSolver,
27
31
  FitFieldStats,
28
32
  ForbidOverlapRemoval,
29
- ForceAtlas2Solver,
30
- FruchtermanReingoldSolver,
33
+ ForceAtlas2Solver as _ForceAtlas2Solver,
34
+ FruchtermanReingoldSolver as _FruchtermanReingoldSolver,
31
35
  GTreeOverlapRemoval,
32
36
  GemSolver,
33
37
  GripSolver,
34
38
  GroupInABoxSolver,
35
- GuMapSolver,
39
+ GuMapSolver as _GuMapSolver,
36
40
  HybridKnnResult,
37
41
  IbUmapSolver,
38
- KMeansResult,
39
- KamadaKawaiSolver,
42
+ KMeansResult as _KMeansResult,
43
+ KamadaKawaiSolver as _KamadaKawaiSolver,
40
44
  KnnGraph,
45
+ LabelPropagationResult as _LabelPropagationResult,
41
46
  LargestConnectedComponentResult,
47
+ Layout2d as _Layout2d,
42
48
  LayoutDegeneracy,
43
- LeidenResult,
44
- LinLogSolver,
45
- LouvainResult,
46
- ManifoldLayout2d,
47
- MaxentStressSolver,
49
+ LayoutNd as _LayoutNd,
50
+ LeidenResult as _LeidenResult,
51
+ LinLogSolver as _LinLogSolver,
52
+ LouvainResult as _LouvainResult,
53
+ ManifoldLayout2d as _ManifoldLayout2d,
54
+ MaxentStressSolver as _MaxentStressSolver,
48
55
  MetricReport,
49
56
  MinimumAngleSummary,
50
57
  NorMetricsResult,
@@ -55,6 +62,7 @@ import init, {
55
62
  PrismOverlapRemoval,
56
63
  ResistanceCurvatureFlowResult,
57
64
  ResistanceCurvatureStep,
65
+ RhghLandmarks,
58
66
  RhghLandmarksResult,
59
67
  RtaEvaluation,
60
68
  ScreenedPoissonField2d,
@@ -63,49 +71,171 @@ import init, {
63
71
  SelLayoutSolver,
64
72
  SeparationConstraint,
65
73
  SfcLayoutSolver,
66
- SgdSolver,
74
+ SgdSolver as _SgdSolver,
67
75
  Sparse12HopPairs,
68
76
  SparseBarrierStats,
69
77
  SparseProbabilities,
70
78
  SpatialIntruderRefiner,
71
79
  SpatialRefinerRoundStats,
72
80
  SpatialRefinerStats,
81
+ SpectralClusteringResult as _SpectralClusteringResult,
73
82
  SpectralEmbeddingResult,
74
83
  SpectralMomentStats,
75
- StressMajorizationSolver,
84
+ StressEvaluation,
85
+ StressMajorizationSolver as _StressMajorizationSolver,
76
86
  TFdpSolver,
77
87
  TorusCrossing,
78
- TsNetSolver,
88
+ TsNetSolver as _TsNetSolver,
89
+ TsNetStage,
90
+ TwinDeclutterer,
79
91
  TwoHopCsr,
80
92
  TwoHopKnnResult,
81
- YifanHuSolver,
93
+ YifanHuSolver as _YifanHuSolver,
94
+ _calinskiHarabaszScore2d,
95
+ _calinskiHarabaszScoreManifold,
96
+ _calinskiHarabaszScoreNd,
97
+ _cqHac2d,
98
+ _cqHacManifold,
99
+ _cqHacNd,
100
+ _cqKmeans2d,
101
+ _cqKmeansManifold,
102
+ _cqKmeansNd,
103
+ _crossingEdgesTorus2d,
104
+ _crossingEdgesTorusManifold,
105
+ _daviesBouldinScore2d,
106
+ _daviesBouldinScoreManifold,
107
+ _daviesBouldinScoreNd,
108
+ _dggPreservation2d,
109
+ _dggPreservationManifold,
110
+ _dggPreservationNd,
111
+ _distanceConsistency2d,
112
+ _distanceConsistencyManifold,
113
+ _distanceConsistencyNd,
114
+ _distributionConsistency2d,
115
+ _distributionConsistencyManifold,
116
+ _distributionConsistencyNd,
117
+ _drngPreservation2d,
118
+ _drngPreservationManifold,
119
+ _drngPreservationNd,
120
+ _evaluateMetrics2d,
121
+ _evaluateMetrics2dWithOriginal,
122
+ _evaluateMetricsManifold,
123
+ _evaluateMetricsNd,
124
+ _gabrielGraphEdges2d,
125
+ _gabrielGraphEdgesManifold,
126
+ _gabrielGraphEdgesNd,
127
+ _gabrielGraphProperty2d,
128
+ _gabrielGraphPropertyManifold,
129
+ _gabrielGraphPropertyNd,
130
+ _idealEdgeLengths2d,
131
+ _idealEdgeLengthsManifold,
132
+ _idealEdgeLengthsNd,
133
+ _idealEdgeLengthsWithUnit2d,
134
+ _idealEdgeLengthsWithUnitManifold,
135
+ _idealEdgeLengthsWithUnitNd,
136
+ _landmarkStratifiedRta2d,
137
+ _landmarkStratifiedRtaDetail2d,
138
+ _landmarkStratifiedRtaDetailManifold,
139
+ _landmarkStratifiedRtaDetailNd,
140
+ _landmarkStratifiedRtaFromLandmarks2d,
141
+ _landmarkStratifiedRtaFromLandmarksManifold,
142
+ _landmarkStratifiedRtaFromLandmarksNd,
143
+ _landmarkStratifiedRtaManifold,
144
+ _landmarkStratifiedRtaNd,
145
+ _layoutDegeneracy2d,
146
+ _layoutDegeneracyManifold,
147
+ _layoutDegeneracyNd,
148
+ _neighborhoodHit2d,
149
+ _neighborhoodHitManifold,
150
+ _neighborhoodHitNd,
151
+ _neighborhoodPreservation1Hop2d,
152
+ _neighborhoodPreservation1HopManifold,
153
+ _neighborhoodPreservation1HopNd,
154
+ _neighborhoodPreservation2Hop2d,
155
+ _neighborhoodPreservation2HopManifold,
156
+ _neighborhoodPreservation2HopNd,
157
+ _nodeResolution2d,
158
+ _nodeResolutionManifold,
159
+ _nodeResolutionNd,
160
+ _pairwiseDistanceOverlapError2d,
161
+ _pairwiseDistanceOverlapErrorManifold,
162
+ _pairwiseDistanceOverlapErrorNd,
163
+ _relativeNeighborhoodEdges2d,
164
+ _relativeNeighborhoodEdgesManifold,
165
+ _relativeNeighborhoodEdgesNd,
166
+ _sampledNp12d,
167
+ _sampledNp1Manifold,
168
+ _sampledNp1Nd,
169
+ _sampledNp22d,
170
+ _sampledNp2Manifold,
171
+ _sampledNp2Nd,
172
+ _sampledScaleNormalizedStress2d,
173
+ _sampledScaleNormalizedStressManifold,
174
+ _sampledScaleNormalizedStressNd,
175
+ _scaleNormalizedStress2d,
176
+ _scaleNormalizedStressDetail2d,
177
+ _scaleNormalizedStressDetailManifold,
178
+ _scaleNormalizedStressDetailNd,
179
+ _scaleNormalizedStressFromDistances2d,
180
+ _scaleNormalizedStressFromDistancesManifold,
181
+ _scaleNormalizedStressFromDistancesNd,
182
+ _scaleNormalizedStressManifold,
183
+ _scaleNormalizedStressNd,
184
+ _sepmeGab2d,
185
+ _sepmeGabManifold,
186
+ _sepmeGabNd,
187
+ _sepmeGong2d,
188
+ _sepmeGongManifold,
189
+ _sepmeGongNd,
190
+ _sepmeKnng2d,
191
+ _sepmeKnngManifold,
192
+ _sepmeKnngNd,
193
+ _sepmeRng2d,
194
+ _sepmeRngManifold,
195
+ _sepmeRngNd,
196
+ _silhouetteScore2d,
197
+ _silhouetteScoreManifold,
198
+ _silhouetteScoreNd,
199
+ _torusCrossingNumber2d,
200
+ _torusCrossingNumberManifold,
201
+ _torusLayoutEdgeSegments2d,
202
+ _torusLayoutEdgeSegmentsManifold,
203
+ adaptiveChebyshevDegree,
204
+ adaptiveChebyshevDegreeScaled,
82
205
  adjustedPatchNig,
206
+ adjustedPatchNigDetail,
83
207
  adjustedPatchNigMultiscale,
84
208
  alignClusteredCentroids,
85
209
  allPairsBfs,
86
- angularResolutionV6,
210
+ allPairsDijkstra,
211
+ angularResolution,
87
212
  anisotropicLaplacian,
88
213
  applyRelativeDistanceFloor,
89
- aspectRatioV6,
214
+ aspectRatio,
90
215
  assignLayers,
91
216
  bfsSingleSource,
92
217
  buildCapped12hopKnn,
218
+ buildDogTerms,
93
219
  buildGumap12hopPriorityCsr,
94
220
  buildHybridAdaptiveKnn,
95
221
  buildPure2hopKnn,
222
+ buildRegularizedDogTerms,
96
223
  buildRerankKnn,
97
- calinskiHarabaszScore,
98
224
  chebyshevDogJlEmbedding,
99
225
  chebyshevDogJlEmbeddingMatrix,
100
226
  chebyshevHeatSpmv,
101
227
  chebyshevHeatSpmvMatrix,
102
228
  classDensityMeasure,
229
+ classicalMds,
103
230
  classicalMds2d,
231
+ classicalMdsFromDistances,
104
232
  clusterAreaFaithfulness,
105
233
  clusterAreaFaithfulnessDetail,
106
234
  coarseBackboneInit,
107
235
  coarsenGraph,
236
+ combinatorialLaplacian,
108
237
  compute2hopNeighborhoodSizes,
238
+ computeChebyshevBandpassCoefficients,
109
239
  computeDiffusionEmbedding,
110
240
  computeEffectiveResistances,
111
241
  computeFuzzySimplicialSet,
@@ -114,64 +244,71 @@ import init, {
114
244
  computeMedian2hopPerplexity,
115
245
  computeNodewise2hopPerplexities,
116
246
  computePivotedRhghLandmarks,
247
+ computePivotedRhghLandmarksResult,
117
248
  computeRegularizedDogVaradhanLandmarks,
118
249
  computeRegularizedDogVaradhanLandmarksFromMatrix,
119
250
  computeResistanceEmbedding,
120
- cqHac,
121
- cqKmeans,
122
251
  crossingEdges,
123
- crossingEdgesTorus,
252
+ crossingEdgesHyperbolic,
253
+ crossingEdgesSpherical,
124
254
  crossingSummary,
125
255
  crosslessness,
126
256
  cycleEdges,
127
- daviesBouldinScore,
257
+ datasetCatalog,
258
+ datasetInfo,
259
+ declutterTwins2d,
128
260
  delaunayToCsr,
129
261
  delaunayTriangulation,
130
- dggPreservation,
131
- distanceConsistency,
132
- distributionConsistency,
133
- drngPreservation,
262
+ dijkstraSingleSource,
134
263
  edgeAngle,
135
- evaluateMetrics,
136
264
  extract1hop2hopCsr,
137
265
  extractQuadrilateralBackbone,
138
266
  extractSparse1hop2hopPairs,
267
+ extractSparse1hop2hopPairsWithMode,
139
268
  findAbParams,
140
- gabrielGraphEdges,
141
- gabrielGraphPropertyV6,
269
+ generateHyperbolicTree,
142
270
  generateLayeredConstraints,
271
+ generateLayeredDag,
272
+ generateSbmGraph,
273
+ generateSphericalGrid,
274
+ generateSphericalIcosphere,
275
+ generateTorusGrid,
276
+ generateWeightedGraph,
277
+ geodesicDistortion,
143
278
  graph12hopRowNormalizedProbabilities,
279
+ graph12hopRowNormalizedProbabilitiesWithOptions,
144
280
  graphRowNormalizedProbabilities,
145
281
  hde,
146
282
  hdeNd,
147
- idealEdgeLengthsV6,
148
- idealEdgeLengthsWithUnit,
283
+ hyperbolicCrossingNumber,
149
284
  initSync,
150
285
  kmeansPlusPlus,
151
286
  korenSpectralInit,
152
287
  labelPropagation,
153
- landmarkStratifiedRta,
154
- landmarkStratifiedRtaDetail,
155
- landmarkStratifiedRtaFromLandmarks,
156
- layoutDegeneracy,
288
+ laplacian,
157
289
  leidenCommunities,
290
+ listDatasets,
291
+ lorentzDistance,
292
+ lorentzEinsteinMidpoint,
293
+ lorentzExpMap,
294
+ lorentzLogMap,
295
+ lorentzToPoincarePoint,
158
296
  louvainCoarsen,
159
297
  louvainCommunities,
160
298
  minimumAngle,
161
299
  minimumAngleSummary,
162
- neighborhoodHit,
163
- neighborhoodPreservation1Hop,
164
- neighborhoodPreservation2HopV6,
165
- nodeResolutionV6,
166
300
  norMetrics,
167
301
  norMetricsWithoutGraph,
168
302
  normalizeLayout2d,
169
- pairwiseDistanceOverlapError,
170
303
  parseCsrCsv,
171
304
  partialBfsKnn,
172
305
  partitionAgreement,
306
+ pivotMds,
307
+ pivotMdsFromDistances,
173
308
  pivotMdsInit,
309
+ pivotMdsWithPivots,
174
310
  poincareDistance,
311
+ poincareEinsteinMidpoint,
175
312
  poincareMobiusAdd,
176
313
  prismDistortion,
177
314
  prismDistortionWithEdges,
@@ -180,41 +317,38 @@ import init, {
180
317
  projectClusteredLayoutWithRadii,
181
318
  projectClusteredRectangleNoOverlap2d,
182
319
  projectLayoutAxis,
320
+ projectPsdSpectralFilter,
183
321
  projectRectangleNoOverlap2d,
322
+ randomWalkLaplacian,
184
323
  rdMds,
185
324
  rectangleOverlaps,
186
325
  refineClusterLayout,
187
- relativeNeighborhoodEdges,
188
326
  removeCycles,
189
327
  representativeMds,
190
328
  resistanceCurvatureFlow,
191
329
  robustNormalizeLayout2d,
192
330
  sampledCrossingNumber,
193
331
  sampledCrosslessness,
194
- sampledNp1,
195
- sampledNp2,
196
- sampledScaleNormalizedStress,
197
- scaleNormalizedStress,
198
- scaleNormalizedStressFromDistances,
199
332
  selectMaxminSpPivots,
200
- sepmeGab,
201
- sepmeGong,
202
- sepmeKnng,
203
- sepmeRng,
204
333
  setPanicHook,
205
- silhouetteScore,
334
+ shiftedNormalizedLaplacian,
206
335
  smallestLaplacianEigenpairs,
207
336
  spectralClustering,
208
337
  spectralMomentStats,
338
+ sphericalCrossingNumber,
209
339
  sphericalDistance,
210
340
  sprawlterNn,
211
341
  sprawlterNnRadii,
212
342
  squarifiedTreemap,
213
343
  sweepCrossingAngle,
214
344
  sweepCrossingNumber,
345
+ symmetricEigenJacobi,
346
+ symmetricNormalizedLaplacian,
215
347
  symmetrizeRowNormalized,
216
- torusCrossingNumber,
217
348
  torusDistance,
349
+ torusEdgeSegments,
350
+ torusSpectralPhaseInit,
351
+ transitiveReduction,
218
352
  wasmMemory,
219
353
  wasm_start,
220
354
  wrapTorusPoint,
@@ -241,10 +375,77 @@ function attachCoordsView(LayoutClass) {
241
375
  return LayoutClass;
242
376
  }
243
377
 
378
+ function attachTypedView(ResultClass, methodName, ptrFn, lenFn, TypedCtor, cacheKey) {
379
+ if (typeof ResultClass?.prototype?.[ptrFn] === "function") {
380
+ ResultClass.prototype[methodName] = function () {
381
+ const buf = wasmMemory().buffer;
382
+ const ptr = this[ptrFn]();
383
+ const len = this[lenFn]();
384
+ const bufKey = cacheKey + "Buf";
385
+ if (
386
+ !this[cacheKey] ||
387
+ this[bufKey] !== buf ||
388
+ this[cacheKey].byteOffset !== ptr ||
389
+ this[cacheKey].length !== len
390
+ ) {
391
+ this[cacheKey] = new TypedCtor(buf, ptr, len);
392
+ this[bufKey] = buf;
393
+ }
394
+ return this[cacheKey];
395
+ };
396
+ }
397
+ return ResultClass;
398
+ }
399
+
400
+ function attachSolverDispatch(SolverClass, { supportsNd = false, supportsManifold = false } = {}) {
401
+ const proto = SolverClass.prototype;
402
+ proto.step = function step(layout) {
403
+ if (layout instanceof _Layout2d) return this._step2d(layout);
404
+ if (supportsNd && layout instanceof _LayoutNd) return this._stepNd(layout);
405
+ if (supportsManifold && layout instanceof _ManifoldLayout2d) return this._stepManifold(layout);
406
+ throw new TypeError(`${SolverClass.name}.step: unsupported layout type`);
407
+ };
408
+ proto.runSteps = function runSteps(layout, steps) {
409
+ if (layout instanceof _Layout2d) return this._runSteps2d(layout, steps);
410
+ if (supportsNd && layout instanceof _LayoutNd) return this._runStepsNd(layout, steps);
411
+ if (supportsManifold && layout instanceof _ManifoldLayout2d) {
412
+ return this._runStepsManifold(layout, steps);
413
+ }
414
+ throw new TypeError(`${SolverClass.name}.runSteps: unsupported layout type`);
415
+ };
416
+ proto.run = function run(layout) {
417
+ if (layout instanceof _Layout2d) return this._run2d(layout);
418
+ if (supportsNd && layout instanceof _LayoutNd) return this._runNd(layout);
419
+ if (supportsManifold && layout instanceof _ManifoldLayout2d) return this._runManifold(layout);
420
+ throw new TypeError(`${SolverClass.name}.run: unsupported layout type`);
421
+ };
422
+ return SolverClass;
423
+ }
424
+
425
+ function dispatchLayout3(name, fn2d, fnNd, fnManifold) {
426
+ return function (layout, ...args) {
427
+ if (layout instanceof _Layout2d) return fn2d(layout, ...args);
428
+ if (fnNd && layout instanceof _LayoutNd) return fnNd(layout, ...args);
429
+ if (fnManifold && layout instanceof _ManifoldLayout2d) return fnManifold(layout, ...args);
430
+ throw new TypeError(`${name}: unsupported layout type`);
431
+ };
432
+ }
433
+
434
+ function dispatchGraphLayout3(name, fn2d, fnNd, fnManifold) {
435
+ return function (graph, layout, ...args) {
436
+ if (layout instanceof _Layout2d) return fn2d(graph, layout, ...args);
437
+ if (fnNd && layout instanceof _LayoutNd) return fnNd(graph, layout, ...args);
438
+ if (fnManifold && layout instanceof _ManifoldLayout2d) return fnManifold(graph, layout, ...args);
439
+ throw new TypeError(`${name}: unsupported layout type`);
440
+ };
441
+ }
442
+
244
443
  /**
245
444
  * Runs a cooperative iterative solver progressively within a per-frame time budget,
246
445
  * yielding back to the browser event loop via `requestAnimationFrame` (or `setTimeout`
247
446
  * in Node.js) between batches.
447
+ *
448
+ * Accepts `Layout2d`, `LayoutNd`, or `ManifoldLayout2d` polymorphically.
248
449
  */
249
450
  export function runProgressive(solver, layout, onFrame, options = {}) {
250
451
  const {
@@ -370,13 +571,138 @@ export function runProgressive(solver, layout, onFrame, options = {}) {
370
571
 
371
572
  export const Layout2d = attachCoordsView(_Layout2d);
372
573
  export const LayoutNd = attachCoordsView(_LayoutNd);
574
+ export const ManifoldLayout2d = attachCoordsView(_ManifoldLayout2d);
575
+
576
+ export const LouvainResult = attachTypedView(_LouvainResult, "labelsView", "labelsPtr", "labelsLen", Uint32Array, "_labelsView");
577
+ export const LeidenResult = attachTypedView(_LeidenResult, "labelsView", "labelsPtr", "labelsLen", Uint32Array, "_labelsView");
578
+ export const LabelPropagationResult = attachTypedView(_LabelPropagationResult, "labelsView", "labelsPtr", "labelsLen", Uint32Array, "_labelsView");
579
+ export const SpectralClusteringResult = attachTypedView(_SpectralClusteringResult, "labelsView", "labelsPtr", "labelsLen", Uint32Array, "_labelsView");
580
+ export const KMeansResult = attachTypedView(
581
+ attachTypedView(_KMeansResult, "labelsView", "labelsPtr", "labelsLen", Uint32Array, "_labelsView"),
582
+ "centroidsView",
583
+ "centroidsPtr",
584
+ "centroidsLen",
585
+ Float64Array,
586
+ "_centroidsView",
587
+ );
588
+
589
+ export const SgdSolver = attachSolverDispatch(_SgdSolver, { supportsNd: true, supportsManifold: true });
590
+ SgdSolver.prototype.runScheduleWindow = function runScheduleWindow(layout, startIter, count) {
591
+ if (layout instanceof _Layout2d) return this._runScheduleWindow2d(layout, startIter, count);
592
+ if (layout instanceof _ManifoldLayout2d) return this._runScheduleWindowManifold(layout, startIter, count);
593
+ throw new TypeError("SgdSolver.runScheduleWindow: expected Layout2d or ManifoldLayout2d");
594
+ };
595
+
596
+ export const TsNetSolver = attachSolverDispatch(_TsNetSolver, { supportsNd: true, supportsManifold: true });
597
+ export const GuMapSolver = attachSolverDispatch(_GuMapSolver, { supportsNd: true, supportsManifold: true });
598
+ export const FruchtermanReingoldSolver = attachSolverDispatch(_FruchtermanReingoldSolver, { supportsNd: true, supportsManifold: true });
599
+
600
+ export const StressMajorizationSolver = attachSolverDispatch(_StressMajorizationSolver, { supportsNd: true, supportsManifold: true });
601
+ StressMajorizationSolver.prototype.computeStress = function computeStress(layout) {
602
+ if (layout instanceof _Layout2d) return this._computeStress2d(layout);
603
+ if (layout instanceof _LayoutNd) return this._computeStressNd(layout);
604
+ if (layout instanceof _ManifoldLayout2d) return this._computeStressManifold(layout);
605
+ throw new TypeError("StressMajorizationSolver.computeStress: unsupported layout type");
606
+ };
607
+
608
+ export const KamadaKawaiSolver = attachSolverDispatch(_KamadaKawaiSolver, { supportsNd: true, supportsManifold: true });
609
+ KamadaKawaiSolver.prototype.computeStress = function computeStress(layout) {
610
+ if (layout instanceof _Layout2d) return this._computeStress2d(layout);
611
+ if (layout instanceof _LayoutNd) return this._computeStressNd(layout);
612
+ if (layout instanceof _ManifoldLayout2d) return this._computeStressManifold(layout);
613
+ throw new TypeError("KamadaKawaiSolver.computeStress: unsupported layout type");
614
+ };
615
+
616
+ export const LinLogSolver = attachSolverDispatch(_LinLogSolver, { supportsNd: true });
617
+ LinLogSolver.prototype.energy = function energy(layout) {
618
+ if (layout instanceof _Layout2d) return this._energy2d(layout);
619
+ if (layout instanceof _LayoutNd) return this._energyNd(layout);
620
+ throw new TypeError("LinLogSolver.energy: expected Layout2d or LayoutNd");
621
+ };
622
+
623
+ export const ForceAtlas2Solver = attachSolverDispatch(_ForceAtlas2Solver, { supportsNd: true });
624
+ export const YifanHuSolver = attachSolverDispatch(_YifanHuSolver, { supportsNd: true });
625
+ export const MaxentStressSolver = attachSolverDispatch(_MaxentStressSolver, { supportsNd: true });
626
+ export const FdebSolver = attachSolverDispatch(_FdebSolver, { supportsNd: true });
627
+
628
+ export const ArenaOctree3d = _ArenaOctree3d;
629
+ ArenaOctree3d.prototype.build = function build(coordsOrLayout) {
630
+ if (coordsOrLayout instanceof _LayoutNd) return this.buildNd(coordsOrLayout);
631
+ return this._buildFlat(coordsOrLayout);
632
+ };
633
+ ArenaOctree3d.prototype.buildWeighted = function buildWeighted(coordsOrLayout, masses) {
634
+ if (coordsOrLayout instanceof _LayoutNd) return this.buildWeightedNd(coordsOrLayout, masses);
635
+ return this._buildWeightedFlat(coordsOrLayout, masses);
636
+ };
637
+
638
+ export const DynamicKdTree = new Proxy(_DynamicKdTree, {
639
+ construct(target, args) {
640
+ if (args.length === 1 && args[0] instanceof _LayoutNd) {
641
+ return target.fromLayoutNd(args[0]);
642
+ }
643
+ return Reflect.construct(target, args);
644
+ },
645
+ });
646
+
647
+ export function evaluateMetrics(graph, layout, targets, ...args) {
648
+ if (layout instanceof _LayoutNd) return _evaluateMetricsNd(graph, layout, targets, ...args);
649
+ if (layout instanceof _ManifoldLayout2d) return _evaluateMetricsManifold(graph, layout, targets, ...args);
650
+ if (layout instanceof _Layout2d) {
651
+ const opt = args.length === 1 && args[0] && typeof args[0] === "object" && !Array.isArray(args[0]) ? args[0] : null;
652
+ if (opt && opt.originalLayout != null) {
653
+ return _evaluateMetrics2dWithOriginal(graph, layout, targets, opt, opt.originalLayout);
654
+ }
655
+ return _evaluateMetrics2d(graph, layout, targets, ...args);
656
+ }
657
+ throw new TypeError("evaluateMetrics: unsupported layout type");
658
+ }
659
+
660
+ export const scaleNormalizedStress = dispatchGraphLayout3("scaleNormalizedStress", _scaleNormalizedStress2d, _scaleNormalizedStressNd, _scaleNormalizedStressManifold);
661
+ export const scaleNormalizedStressDetail = dispatchGraphLayout3("scaleNormalizedStressDetail", _scaleNormalizedStressDetail2d, _scaleNormalizedStressDetailNd, _scaleNormalizedStressDetailManifold);
662
+ export const sampledScaleNormalizedStress = dispatchGraphLayout3("sampledScaleNormalizedStress", _sampledScaleNormalizedStress2d, _sampledScaleNormalizedStressNd, _sampledScaleNormalizedStressManifold);
663
+ export const scaleNormalizedStressFromDistances = dispatchLayout3("scaleNormalizedStressFromDistances", _scaleNormalizedStressFromDistances2d, _scaleNormalizedStressFromDistancesNd, _scaleNormalizedStressFromDistancesManifold);
664
+ export const neighborhoodPreservation1Hop = dispatchGraphLayout3("neighborhoodPreservation1Hop", _neighborhoodPreservation1Hop2d, _neighborhoodPreservation1HopNd, _neighborhoodPreservation1HopManifold);
665
+ export const neighborhoodPreservation2Hop = dispatchGraphLayout3("neighborhoodPreservation2Hop", _neighborhoodPreservation2Hop2d, _neighborhoodPreservation2HopNd, _neighborhoodPreservation2HopManifold);
666
+ export const sampledNp1 = dispatchGraphLayout3("sampledNp1", _sampledNp12d, _sampledNp1Nd, _sampledNp1Manifold);
667
+ export const sampledNp2 = dispatchGraphLayout3("sampledNp2", _sampledNp22d, _sampledNp2Nd, _sampledNp2Manifold);
668
+ export const gabrielGraphProperty = dispatchGraphLayout3("gabrielGraphProperty", _gabrielGraphProperty2d, _gabrielGraphPropertyNd, _gabrielGraphPropertyManifold);
669
+ export const nodeResolution = dispatchLayout3("nodeResolution", _nodeResolution2d, _nodeResolutionNd, _nodeResolutionManifold);
670
+ export const drngPreservation = dispatchGraphLayout3("drngPreservation", _drngPreservation2d, _drngPreservationNd, _drngPreservationManifold);
671
+ export const dggPreservation = dispatchGraphLayout3("dggPreservation", _dggPreservation2d, _dggPreservationNd, _dggPreservationManifold);
672
+ export const idealEdgeLengths = dispatchGraphLayout3("idealEdgeLengths", _idealEdgeLengths2d, _idealEdgeLengthsNd, _idealEdgeLengthsManifold);
673
+ export const idealEdgeLengthsWithUnit = dispatchGraphLayout3("idealEdgeLengthsWithUnit", _idealEdgeLengthsWithUnit2d, _idealEdgeLengthsWithUnitNd, _idealEdgeLengthsWithUnitManifold);
674
+ export const layoutDegeneracy = dispatchGraphLayout3("layoutDegeneracy", _layoutDegeneracy2d, _layoutDegeneracyNd, _layoutDegeneracyManifold);
675
+ export const gabrielGraphEdges = dispatchLayout3("gabrielGraphEdges", _gabrielGraphEdges2d, _gabrielGraphEdgesNd, _gabrielGraphEdgesManifold);
676
+ export const relativeNeighborhoodEdges = dispatchLayout3("relativeNeighborhoodEdges", _relativeNeighborhoodEdges2d, _relativeNeighborhoodEdgesNd, _relativeNeighborhoodEdgesManifold);
677
+ export const landmarkStratifiedRta = dispatchGraphLayout3("landmarkStratifiedRta", _landmarkStratifiedRta2d, _landmarkStratifiedRtaNd, _landmarkStratifiedRtaManifold);
678
+ export const landmarkStratifiedRtaDetail = dispatchGraphLayout3("landmarkStratifiedRtaDetail", _landmarkStratifiedRtaDetail2d, _landmarkStratifiedRtaDetailNd, _landmarkStratifiedRtaDetailManifold);
679
+ export const landmarkStratifiedRtaFromLandmarks = dispatchLayout3("landmarkStratifiedRtaFromLandmarks", _landmarkStratifiedRtaFromLandmarks2d, _landmarkStratifiedRtaFromLandmarksNd, _landmarkStratifiedRtaFromLandmarksManifold);
680
+ export const torusCrossingNumber = dispatchGraphLayout3("torusCrossingNumber", _torusCrossingNumber2d, null, _torusCrossingNumberManifold);
681
+ export const crossingEdgesTorus = dispatchGraphLayout3("crossingEdgesTorus", _crossingEdgesTorus2d, null, _crossingEdgesTorusManifold);
682
+ export const torusLayoutEdgeSegments = dispatchGraphLayout3("torusLayoutEdgeSegments", _torusLayoutEdgeSegments2d, null, _torusLayoutEdgeSegmentsManifold);
683
+ export const cqKmeans = dispatchLayout3("cqKmeans", _cqKmeans2d, _cqKmeansNd, _cqKmeansManifold);
684
+ export const cqHac = dispatchLayout3("cqHac", _cqHac2d, _cqHacNd, _cqHacManifold);
685
+ export const distanceConsistency = dispatchLayout3("distanceConsistency", _distanceConsistency2d, _distanceConsistencyNd, _distanceConsistencyManifold);
686
+ export const distributionConsistency = dispatchLayout3("distributionConsistency", _distributionConsistency2d, _distributionConsistencyNd, _distributionConsistencyManifold);
687
+ export const sepmeKnng = dispatchLayout3("sepmeKnng", _sepmeKnng2d, _sepmeKnngNd, _sepmeKnngManifold);
688
+ export const sepmeRng = dispatchLayout3("sepmeRng", _sepmeRng2d, _sepmeRngNd, _sepmeRngManifold);
689
+ export const sepmeGab = dispatchLayout3("sepmeGab", _sepmeGab2d, _sepmeGabNd, _sepmeGabManifold);
690
+ export const sepmeGong = dispatchLayout3("sepmeGong", _sepmeGong2d, _sepmeGongNd, _sepmeGongManifold);
691
+ export const neighborhoodHit = dispatchLayout3("neighborhoodHit", _neighborhoodHit2d, _neighborhoodHitNd, _neighborhoodHitManifold);
692
+ export const silhouetteScore = dispatchLayout3("silhouetteScore", _silhouetteScore2d, _silhouetteScoreNd, _silhouetteScoreManifold);
693
+ export const calinskiHarabaszScore = dispatchLayout3("calinskiHarabaszScore", _calinskiHarabaszScore2d, _calinskiHarabaszScoreNd, _calinskiHarabaszScoreManifold);
694
+ export const daviesBouldinScore = dispatchLayout3("daviesBouldinScore", _daviesBouldinScore2d, _daviesBouldinScoreNd, _daviesBouldinScoreManifold);
695
+ export const pairwiseDistanceOverlapError = dispatchLayout3("pairwiseDistanceOverlapError", _pairwiseDistanceOverlapError2d, _pairwiseDistanceOverlapErrorNd, _pairwiseDistanceOverlapErrorManifold);
696
+
373
697
  export {
698
+ AdjustedPatchNigDetail,
374
699
  AmgPcgBatchResult,
375
700
  AmgPcgSolveResult,
376
701
  AmgPcgSolver,
377
702
  AnisotropicLaplacianResult,
378
703
  BackboneResult,
379
704
  BackboneSolver,
705
+ ChebyshevDogKernel,
380
706
  ClassDensityResult,
381
707
  ClusterAreaReport,
382
708
  ClusterRefineSolver,
@@ -387,33 +713,24 @@ export {
387
713
  CrossingSummary,
388
714
  CsrGraph,
389
715
  CsrMatrix,
716
+ DatasetInfo,
390
717
  DelaunayResult,
718
+ DijkstraWorkspace,
391
719
  DogStats,
392
720
  DogVaradhanLandmarks,
393
721
  EffectiveResistanceResult,
394
722
  EigenResult,
395
- FdebSolver,
396
723
  FitFieldStats,
397
724
  ForbidOverlapRemoval,
398
- ForceAtlas2Solver,
399
- FruchtermanReingoldSolver,
400
725
  GTreeOverlapRemoval,
401
726
  GemSolver,
402
727
  GripSolver,
403
728
  GroupInABoxSolver,
404
- GuMapSolver,
405
729
  HybridKnnResult,
406
730
  IbUmapSolver,
407
- KMeansResult,
408
- KamadaKawaiSolver,
409
731
  KnnGraph,
410
732
  LargestConnectedComponentResult,
411
733
  LayoutDegeneracy,
412
- LeidenResult,
413
- LinLogSolver,
414
- LouvainResult,
415
- ManifoldLayout2d,
416
- MaxentStressSolver,
417
734
  MetricReport,
418
735
  MinimumAngleSummary,
419
736
  NorMetricsResult,
@@ -424,6 +741,7 @@ export {
424
741
  PrismOverlapRemoval,
425
742
  ResistanceCurvatureFlowResult,
426
743
  ResistanceCurvatureStep,
744
+ RhghLandmarks,
427
745
  RhghLandmarksResult,
428
746
  RtaEvaluation,
429
747
  ScreenedPoissonField2d,
@@ -432,7 +750,6 @@ export {
432
750
  SelLayoutSolver,
433
751
  SeparationConstraint,
434
752
  SfcLayoutSolver,
435
- SgdSolver,
436
753
  Sparse12HopPairs,
437
754
  SparseBarrierStats,
438
755
  SparseProbabilities,
@@ -441,40 +758,49 @@ export {
441
758
  SpatialRefinerStats,
442
759
  SpectralEmbeddingResult,
443
760
  SpectralMomentStats,
444
- StressMajorizationSolver,
761
+ StressEvaluation,
445
762
  TFdpSolver,
446
763
  TorusCrossing,
447
- TsNetSolver,
764
+ TsNetStage,
765
+ TwinDeclutterer,
448
766
  TwoHopCsr,
449
767
  TwoHopKnnResult,
450
- YifanHuSolver,
768
+ adaptiveChebyshevDegree,
769
+ adaptiveChebyshevDegreeScaled,
451
770
  adjustedPatchNig,
771
+ adjustedPatchNigDetail,
452
772
  adjustedPatchNigMultiscale,
453
773
  alignClusteredCentroids,
454
774
  allPairsBfs,
455
- angularResolutionV6,
775
+ allPairsDijkstra,
776
+ angularResolution,
456
777
  anisotropicLaplacian,
457
778
  applyRelativeDistanceFloor,
458
- aspectRatioV6,
779
+ aspectRatio,
459
780
  assignLayers,
460
781
  bfsSingleSource,
461
782
  buildCapped12hopKnn,
783
+ buildDogTerms,
462
784
  buildGumap12hopPriorityCsr,
463
785
  buildHybridAdaptiveKnn,
464
786
  buildPure2hopKnn,
787
+ buildRegularizedDogTerms,
465
788
  buildRerankKnn,
466
- calinskiHarabaszScore,
467
789
  chebyshevDogJlEmbedding,
468
790
  chebyshevDogJlEmbeddingMatrix,
469
791
  chebyshevHeatSpmv,
470
792
  chebyshevHeatSpmvMatrix,
471
793
  classDensityMeasure,
794
+ classicalMds,
472
795
  classicalMds2d,
796
+ classicalMdsFromDistances,
473
797
  clusterAreaFaithfulness,
474
798
  clusterAreaFaithfulnessDetail,
475
799
  coarseBackboneInit,
476
800
  coarsenGraph,
801
+ combinatorialLaplacian,
477
802
  compute2hopNeighborhoodSizes,
803
+ computeChebyshevBandpassCoefficients,
478
804
  computeDiffusionEmbedding,
479
805
  computeEffectiveResistances,
480
806
  computeFuzzySimplicialSet,
@@ -483,64 +809,71 @@ export {
483
809
  computeMedian2hopPerplexity,
484
810
  computeNodewise2hopPerplexities,
485
811
  computePivotedRhghLandmarks,
812
+ computePivotedRhghLandmarksResult,
486
813
  computeRegularizedDogVaradhanLandmarks,
487
814
  computeRegularizedDogVaradhanLandmarksFromMatrix,
488
815
  computeResistanceEmbedding,
489
- cqHac,
490
- cqKmeans,
491
816
  crossingEdges,
492
- crossingEdgesTorus,
817
+ crossingEdgesHyperbolic,
818
+ crossingEdgesSpherical,
493
819
  crossingSummary,
494
820
  crosslessness,
495
821
  cycleEdges,
496
- daviesBouldinScore,
822
+ datasetCatalog,
823
+ datasetInfo,
824
+ declutterTwins2d,
497
825
  delaunayToCsr,
498
826
  delaunayTriangulation,
499
- dggPreservation,
500
- distanceConsistency,
501
- distributionConsistency,
502
- drngPreservation,
827
+ dijkstraSingleSource,
503
828
  edgeAngle,
504
- evaluateMetrics,
505
829
  extract1hop2hopCsr,
506
830
  extractQuadrilateralBackbone,
507
831
  extractSparse1hop2hopPairs,
832
+ extractSparse1hop2hopPairsWithMode,
508
833
  findAbParams,
509
- gabrielGraphEdges,
510
- gabrielGraphPropertyV6,
834
+ generateHyperbolicTree,
511
835
  generateLayeredConstraints,
836
+ generateLayeredDag,
837
+ generateSbmGraph,
838
+ generateSphericalGrid,
839
+ generateSphericalIcosphere,
840
+ generateTorusGrid,
841
+ generateWeightedGraph,
842
+ geodesicDistortion,
512
843
  graph12hopRowNormalizedProbabilities,
844
+ graph12hopRowNormalizedProbabilitiesWithOptions,
513
845
  graphRowNormalizedProbabilities,
514
846
  hde,
515
847
  hdeNd,
516
- idealEdgeLengthsV6,
517
- idealEdgeLengthsWithUnit,
848
+ hyperbolicCrossingNumber,
518
849
  initSync,
519
850
  kmeansPlusPlus,
520
851
  korenSpectralInit,
521
852
  labelPropagation,
522
- landmarkStratifiedRta,
523
- landmarkStratifiedRtaDetail,
524
- landmarkStratifiedRtaFromLandmarks,
525
- layoutDegeneracy,
853
+ laplacian,
526
854
  leidenCommunities,
855
+ listDatasets,
856
+ lorentzDistance,
857
+ lorentzEinsteinMidpoint,
858
+ lorentzExpMap,
859
+ lorentzLogMap,
860
+ lorentzToPoincarePoint,
527
861
  louvainCoarsen,
528
862
  louvainCommunities,
529
863
  minimumAngle,
530
864
  minimumAngleSummary,
531
- neighborhoodHit,
532
- neighborhoodPreservation1Hop,
533
- neighborhoodPreservation2HopV6,
534
- nodeResolutionV6,
535
865
  norMetrics,
536
866
  norMetricsWithoutGraph,
537
867
  normalizeLayout2d,
538
- pairwiseDistanceOverlapError,
539
868
  parseCsrCsv,
540
869
  partialBfsKnn,
541
870
  partitionAgreement,
871
+ pivotMds,
872
+ pivotMdsFromDistances,
542
873
  pivotMdsInit,
874
+ pivotMdsWithPivots,
543
875
  poincareDistance,
876
+ poincareEinsteinMidpoint,
544
877
  poincareMobiusAdd,
545
878
  prismDistortion,
546
879
  prismDistortionWithEdges,
@@ -549,41 +882,38 @@ export {
549
882
  projectClusteredLayoutWithRadii,
550
883
  projectClusteredRectangleNoOverlap2d,
551
884
  projectLayoutAxis,
885
+ projectPsdSpectralFilter,
552
886
  projectRectangleNoOverlap2d,
887
+ randomWalkLaplacian,
553
888
  rdMds,
554
889
  rectangleOverlaps,
555
890
  refineClusterLayout,
556
- relativeNeighborhoodEdges,
557
891
  removeCycles,
558
892
  representativeMds,
559
893
  resistanceCurvatureFlow,
560
894
  robustNormalizeLayout2d,
561
895
  sampledCrossingNumber,
562
896
  sampledCrosslessness,
563
- sampledNp1,
564
- sampledNp2,
565
- sampledScaleNormalizedStress,
566
- scaleNormalizedStress,
567
- scaleNormalizedStressFromDistances,
568
897
  selectMaxminSpPivots,
569
- sepmeGab,
570
- sepmeGong,
571
- sepmeKnng,
572
- sepmeRng,
573
898
  setPanicHook,
574
- silhouetteScore,
899
+ shiftedNormalizedLaplacian,
575
900
  smallestLaplacianEigenpairs,
576
901
  spectralClustering,
577
902
  spectralMomentStats,
903
+ sphericalCrossingNumber,
578
904
  sphericalDistance,
579
905
  sprawlterNn,
580
906
  sprawlterNnRadii,
581
907
  squarifiedTreemap,
582
908
  sweepCrossingAngle,
583
909
  sweepCrossingNumber,
910
+ symmetricEigenJacobi,
911
+ symmetricNormalizedLaplacian,
584
912
  symmetrizeRowNormalized,
585
- torusCrossingNumber,
586
913
  torusDistance,
914
+ torusEdgeSegments,
915
+ torusSpectralPhaseInit,
916
+ transitiveReduction,
587
917
  wasmMemory,
588
918
  wasm_start,
589
919
  wrapTorusPoint,