egraph 6.0.0-beta.5 → 6.0.0-rc.2
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/README.md +1 -1
- package/package.json +1 -1
- package/pkg/README.md +1 -1
- package/pkg/egraph_wasm.d.ts +429 -43
- package/pkg/egraph_wasm.js +1906 -283
- package/pkg/egraph_wasm_bg.wasm +0 -0
- package/pkg/index.d.ts +586 -62
- package/pkg/index.js +97 -16
package/pkg/index.js
CHANGED
|
@@ -23,6 +23,8 @@ import init, {
|
|
|
23
23
|
CoarseEdgeLengthMode,
|
|
24
24
|
CoarsenedGraphResult,
|
|
25
25
|
CoarsenedHierarchyResult,
|
|
26
|
+
CoseRepulsionBackend,
|
|
27
|
+
CoseSolver,
|
|
26
28
|
CrossingPair,
|
|
27
29
|
CrossingSummary,
|
|
28
30
|
CsrMatrix,
|
|
@@ -37,7 +39,11 @@ import init, {
|
|
|
37
39
|
EdgePolylines as _EdgePolylines,
|
|
38
40
|
EffectiveResistanceResult,
|
|
39
41
|
EigenResult,
|
|
42
|
+
FcoseDraftGenerator,
|
|
43
|
+
FcoseQuality,
|
|
44
|
+
FcoseSolver,
|
|
40
45
|
FdebSolver,
|
|
46
|
+
FieldFftStats,
|
|
41
47
|
FieldRepulsionBackend,
|
|
42
48
|
FieldRepulsionKernel,
|
|
43
49
|
FitFieldStats,
|
|
@@ -99,7 +105,7 @@ import init, {
|
|
|
99
105
|
PivotMdsReportResult,
|
|
100
106
|
PrismDistortion,
|
|
101
107
|
PrismOverlapRemoval,
|
|
102
|
-
RdMds,
|
|
108
|
+
RdMds as _RdMds,
|
|
103
109
|
ResistanceCurvatureFlowResult,
|
|
104
110
|
ResistanceCurvatureStep,
|
|
105
111
|
RhghLandmarks,
|
|
@@ -163,10 +169,38 @@ import init, {
|
|
|
163
169
|
_daviesBouldinScore3d,
|
|
164
170
|
_daviesBouldinScoreManifold,
|
|
165
171
|
_daviesBouldinScoreNd,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
_degreeConstrainedGabrielGraphEdges2d,
|
|
173
|
+
_degreeConstrainedGabrielGraphEdges3d,
|
|
174
|
+
_degreeConstrainedGabrielGraphEdgesManifold,
|
|
175
|
+
_degreeConstrainedGabrielGraphEdgesNd,
|
|
176
|
+
_degreeConstrainedGabrielGraphPreservation2d,
|
|
177
|
+
_degreeConstrainedGabrielGraphPreservation3d,
|
|
178
|
+
_degreeConstrainedGabrielGraphPreservationManifold,
|
|
179
|
+
_degreeConstrainedGabrielGraphPreservationNd,
|
|
180
|
+
_degreeConstrainedRelativeNeighborhoodEdges2d,
|
|
181
|
+
_degreeConstrainedRelativeNeighborhoodEdges3d,
|
|
182
|
+
_degreeConstrainedRelativeNeighborhoodEdgesManifold,
|
|
183
|
+
_degreeConstrainedRelativeNeighborhoodEdgesNd,
|
|
184
|
+
_degreeConstrainedRelativeNeighborhoodPreservation2d,
|
|
185
|
+
_degreeConstrainedRelativeNeighborhoodPreservation3d,
|
|
186
|
+
_degreeConstrainedRelativeNeighborhoodPreservationManifold,
|
|
187
|
+
_degreeConstrainedRelativeNeighborhoodPreservationNd,
|
|
188
|
+
_degreeGabrielGraphEdges2d,
|
|
189
|
+
_degreeGabrielGraphEdges3d,
|
|
190
|
+
_degreeGabrielGraphEdgesManifold,
|
|
191
|
+
_degreeGabrielGraphEdgesNd,
|
|
192
|
+
_degreeGabrielGraphPreservation2d,
|
|
193
|
+
_degreeGabrielGraphPreservation3d,
|
|
194
|
+
_degreeGabrielGraphPreservationManifold,
|
|
195
|
+
_degreeGabrielGraphPreservationNd,
|
|
196
|
+
_degreeRelativeNeighborhoodEdges2d,
|
|
197
|
+
_degreeRelativeNeighborhoodEdges3d,
|
|
198
|
+
_degreeRelativeNeighborhoodEdgesManifold,
|
|
199
|
+
_degreeRelativeNeighborhoodEdgesNd,
|
|
200
|
+
_degreeRelativeNeighborhoodPreservation2d,
|
|
201
|
+
_degreeRelativeNeighborhoodPreservation3d,
|
|
202
|
+
_degreeRelativeNeighborhoodPreservationManifold,
|
|
203
|
+
_degreeRelativeNeighborhoodPreservationNd,
|
|
170
204
|
_distanceConsistency2d,
|
|
171
205
|
_distanceConsistency3d,
|
|
172
206
|
_distanceConsistencyManifold,
|
|
@@ -175,10 +209,6 @@ import init, {
|
|
|
175
209
|
_distributionConsistency3d,
|
|
176
210
|
_distributionConsistencyManifold,
|
|
177
211
|
_distributionConsistencyNd,
|
|
178
|
-
_drngPreservation2d,
|
|
179
|
-
_drngPreservation3d,
|
|
180
|
-
_drngPreservationManifold,
|
|
181
|
-
_drngPreservationNd,
|
|
182
212
|
_evaluateMetrics2d,
|
|
183
213
|
_evaluateMetrics2dWithOriginal,
|
|
184
214
|
_evaluateMetrics3d,
|
|
@@ -188,6 +218,10 @@ import init, {
|
|
|
188
218
|
_gabrielGraphEdges3d,
|
|
189
219
|
_gabrielGraphEdgesManifold,
|
|
190
220
|
_gabrielGraphEdgesNd,
|
|
221
|
+
_gabrielGraphPreservation2d,
|
|
222
|
+
_gabrielGraphPreservation3d,
|
|
223
|
+
_gabrielGraphPreservationManifold,
|
|
224
|
+
_gabrielGraphPreservationNd,
|
|
191
225
|
_gabrielGraphProperty2d,
|
|
192
226
|
_gabrielGraphProperty3d,
|
|
193
227
|
_gabrielGraphPropertyManifold,
|
|
@@ -240,6 +274,10 @@ import init, {
|
|
|
240
274
|
_relativeNeighborhoodEdges3d,
|
|
241
275
|
_relativeNeighborhoodEdgesManifold,
|
|
242
276
|
_relativeNeighborhoodEdgesNd,
|
|
277
|
+
_relativeNeighborhoodPreservation2d,
|
|
278
|
+
_relativeNeighborhoodPreservation3d,
|
|
279
|
+
_relativeNeighborhoodPreservationManifold,
|
|
280
|
+
_relativeNeighborhoodPreservationNd,
|
|
243
281
|
_sampledNp12d,
|
|
244
282
|
_sampledNp13d,
|
|
245
283
|
_sampledNp1Manifold,
|
|
@@ -301,6 +339,7 @@ import init, {
|
|
|
301
339
|
applyRelativeDistanceFloor,
|
|
302
340
|
aspectRatio,
|
|
303
341
|
assignLayers,
|
|
342
|
+
augmentGraphWithClusterParents,
|
|
304
343
|
bfsSingleSource,
|
|
305
344
|
buildCapped12hopKnn,
|
|
306
345
|
buildDogTerms,
|
|
@@ -780,6 +819,16 @@ PivotMds.prototype.generateWithReport = function generateWithReport(graph) {
|
|
|
780
819
|
}
|
|
781
820
|
return this._generateWithReportDist();
|
|
782
821
|
};
|
|
822
|
+
export const RdMds = _RdMds;
|
|
823
|
+
RdMds.prototype.generate = function generate(graph) {
|
|
824
|
+
if (graph != null) {
|
|
825
|
+
if (!(graph instanceof Graph)) {
|
|
826
|
+
throw makeDispatchError("InvalidInput", "RdMds.generate(graph): expected a Graph instance");
|
|
827
|
+
}
|
|
828
|
+
return this._generateGraph(graph);
|
|
829
|
+
}
|
|
830
|
+
return this._generateEigenpairs();
|
|
831
|
+
};
|
|
783
832
|
export const GuMapSolver = attachSolverDispatch(_GuMapSolver, allTargetFlags);
|
|
784
833
|
export const FruchtermanReingoldSolver = attachSolverDispatch(_FruchtermanReingoldSolver, allTargetFlags);
|
|
785
834
|
export const KamadaKawaiSolver = attachSolverDispatch(_KamadaKawaiSolver, allTargetFlags);
|
|
@@ -828,12 +877,30 @@ export const DynamicKdTree = new Proxy(_DynamicKdTree, {
|
|
|
828
877
|
});
|
|
829
878
|
|
|
830
879
|
export function evaluateMetrics(graph, layout, targets, ...args) {
|
|
831
|
-
|
|
832
|
-
if (layout instanceof
|
|
833
|
-
|
|
880
|
+
const opt = args[0] && typeof args[0] === "object" && !Array.isArray(args[0]) ? args[0] : null;
|
|
881
|
+
if (layout instanceof _Layout3d) {
|
|
882
|
+
if (opt && opt.originalLayout != null) {
|
|
883
|
+
throw makeDispatchError("UnsupportedOperation", "evaluateMetrics: originalLayout is only supported for Layout2d");
|
|
884
|
+
}
|
|
885
|
+
return _evaluateMetrics3d(graph, layout, targets, ...args);
|
|
886
|
+
}
|
|
887
|
+
if (layout instanceof _LayoutNd) {
|
|
888
|
+
if (opt && opt.originalLayout != null) {
|
|
889
|
+
throw makeDispatchError("UnsupportedOperation", "evaluateMetrics: originalLayout is only supported for Layout2d");
|
|
890
|
+
}
|
|
891
|
+
return _evaluateMetricsNd(graph, layout, targets, ...args);
|
|
892
|
+
}
|
|
893
|
+
if (layout instanceof _ManifoldLayout2d) {
|
|
894
|
+
if (opt && opt.originalLayout != null) {
|
|
895
|
+
throw makeDispatchError("UnsupportedOperation", "evaluateMetrics: originalLayout is only supported for Layout2d");
|
|
896
|
+
}
|
|
897
|
+
return _evaluateMetricsManifold(graph, layout, targets, ...args);
|
|
898
|
+
}
|
|
834
899
|
if (layout instanceof _Layout2d) {
|
|
835
|
-
const opt = args.length === 1 && args[0] && typeof args[0] === "object" && !Array.isArray(args[0]) ? args[0] : null;
|
|
836
900
|
if (opt && opt.originalLayout != null) {
|
|
901
|
+
if (!(opt.originalLayout instanceof _Layout2d)) {
|
|
902
|
+
throw makeDispatchError("InvalidInput", "evaluateMetrics: options.originalLayout must be a Layout2d instance");
|
|
903
|
+
}
|
|
837
904
|
return _evaluateMetrics2dWithOriginal(graph, layout, targets, opt, opt.originalLayout);
|
|
838
905
|
}
|
|
839
906
|
return _evaluateMetrics2d(graph, layout, targets, ...args);
|
|
@@ -851,8 +918,16 @@ export const sampledNp1 = dispatchGraphLayout4("sampledNp1", _sampledNp12d, _sam
|
|
|
851
918
|
export const sampledNp2 = dispatchGraphLayout4("sampledNp2", _sampledNp22d, _sampledNp23d, _sampledNp2Nd, _sampledNp2Manifold);
|
|
852
919
|
export const gabrielGraphProperty = dispatchGraphLayout4("gabrielGraphProperty", _gabrielGraphProperty2d, _gabrielGraphProperty3d, _gabrielGraphPropertyNd, _gabrielGraphPropertyManifold);
|
|
853
920
|
export const nodeResolution = dispatchLayout4("nodeResolution", _nodeResolution2d, _nodeResolution3d, _nodeResolutionNd, _nodeResolutionManifold);
|
|
854
|
-
export const
|
|
855
|
-
export const
|
|
921
|
+
export const relativeNeighborhoodPreservation = dispatchGraphLayout4("relativeNeighborhoodPreservation", _relativeNeighborhoodPreservation2d, _relativeNeighborhoodPreservation3d, _relativeNeighborhoodPreservationNd, _relativeNeighborhoodPreservationManifold);
|
|
922
|
+
export const gabrielGraphPreservation = dispatchGraphLayout4("gabrielGraphPreservation", _gabrielGraphPreservation2d, _gabrielGraphPreservation3d, _gabrielGraphPreservationNd, _gabrielGraphPreservationManifold);
|
|
923
|
+
export const degreeGabrielGraphPreservation = dispatchGraphLayout4("degreeGabrielGraphPreservation", _degreeGabrielGraphPreservation2d, _degreeGabrielGraphPreservation3d, _degreeGabrielGraphPreservationNd, _degreeGabrielGraphPreservationManifold);
|
|
924
|
+
export const degreeGabrielGraphEdges = dispatchGraphLayout4("degreeGabrielGraphEdges", _degreeGabrielGraphEdges2d, _degreeGabrielGraphEdges3d, _degreeGabrielGraphEdgesNd, _degreeGabrielGraphEdgesManifold);
|
|
925
|
+
export const degreeRelativeNeighborhoodPreservation = dispatchGraphLayout4("degreeRelativeNeighborhoodPreservation", _degreeRelativeNeighborhoodPreservation2d, _degreeRelativeNeighborhoodPreservation3d, _degreeRelativeNeighborhoodPreservationNd, _degreeRelativeNeighborhoodPreservationManifold);
|
|
926
|
+
export const degreeRelativeNeighborhoodEdges = dispatchGraphLayout4("degreeRelativeNeighborhoodEdges", _degreeRelativeNeighborhoodEdges2d, _degreeRelativeNeighborhoodEdges3d, _degreeRelativeNeighborhoodEdgesNd, _degreeRelativeNeighborhoodEdgesManifold);
|
|
927
|
+
export const degreeConstrainedGabrielGraphPreservation = dispatchGraphLayout4("degreeConstrainedGabrielGraphPreservation", _degreeConstrainedGabrielGraphPreservation2d, _degreeConstrainedGabrielGraphPreservation3d, _degreeConstrainedGabrielGraphPreservationNd, _degreeConstrainedGabrielGraphPreservationManifold);
|
|
928
|
+
export const degreeConstrainedGabrielGraphEdges = dispatchGraphLayout4("degreeConstrainedGabrielGraphEdges", _degreeConstrainedGabrielGraphEdges2d, _degreeConstrainedGabrielGraphEdges3d, _degreeConstrainedGabrielGraphEdgesNd, _degreeConstrainedGabrielGraphEdgesManifold);
|
|
929
|
+
export const degreeConstrainedRelativeNeighborhoodPreservation = dispatchGraphLayout4("degreeConstrainedRelativeNeighborhoodPreservation", _degreeConstrainedRelativeNeighborhoodPreservation2d, _degreeConstrainedRelativeNeighborhoodPreservation3d, _degreeConstrainedRelativeNeighborhoodPreservationNd, _degreeConstrainedRelativeNeighborhoodPreservationManifold);
|
|
930
|
+
export const degreeConstrainedRelativeNeighborhoodEdges = dispatchGraphLayout4("degreeConstrainedRelativeNeighborhoodEdges", _degreeConstrainedRelativeNeighborhoodEdges2d, _degreeConstrainedRelativeNeighborhoodEdges3d, _degreeConstrainedRelativeNeighborhoodEdgesNd, _degreeConstrainedRelativeNeighborhoodEdgesManifold);
|
|
856
931
|
export const idealEdgeLengths = dispatchGraphLayout4("idealEdgeLengths", _idealEdgeLengths2d, _idealEdgeLengths3d, _idealEdgeLengthsNd, _idealEdgeLengthsManifold);
|
|
857
932
|
export const idealEdgeLengthsWithUnit = dispatchGraphLayout4("idealEdgeLengthsWithUnit", _idealEdgeLengthsWithUnit2d, _idealEdgeLengthsWithUnit3d, _idealEdgeLengthsWithUnitNd, _idealEdgeLengthsWithUnitManifold);
|
|
858
933
|
export const layoutDegeneracy = dispatchGraphLayout4("layoutDegeneracy", _layoutDegeneracy2d, _layoutDegeneracy3d, _layoutDegeneracyNd, _layoutDegeneracyManifold);
|
|
@@ -901,6 +976,8 @@ export {
|
|
|
901
976
|
CoarseEdgeLengthMode,
|
|
902
977
|
CoarsenedGraphResult,
|
|
903
978
|
CoarsenedHierarchyResult,
|
|
979
|
+
CoseRepulsionBackend,
|
|
980
|
+
CoseSolver,
|
|
904
981
|
CrossingPair,
|
|
905
982
|
CrossingSummary,
|
|
906
983
|
CsrMatrix,
|
|
@@ -912,7 +989,11 @@ export {
|
|
|
912
989
|
DogVaradhanLandmarks,
|
|
913
990
|
EffectiveResistanceResult,
|
|
914
991
|
EigenResult,
|
|
992
|
+
FcoseDraftGenerator,
|
|
993
|
+
FcoseQuality,
|
|
994
|
+
FcoseSolver,
|
|
915
995
|
FdebSolver,
|
|
996
|
+
FieldFftStats,
|
|
916
997
|
FieldRepulsionBackend,
|
|
917
998
|
FieldRepulsionKernel,
|
|
918
999
|
FitFieldStats,
|
|
@@ -956,7 +1037,6 @@ export {
|
|
|
956
1037
|
PivotMdsReportResult,
|
|
957
1038
|
PrismDistortion,
|
|
958
1039
|
PrismOverlapRemoval,
|
|
959
|
-
RdMds,
|
|
960
1040
|
ResistanceCurvatureFlowResult,
|
|
961
1041
|
ResistanceCurvatureStep,
|
|
962
1042
|
RhghLandmarks,
|
|
@@ -1007,6 +1087,7 @@ export {
|
|
|
1007
1087
|
applyRelativeDistanceFloor,
|
|
1008
1088
|
aspectRatio,
|
|
1009
1089
|
assignLayers,
|
|
1090
|
+
augmentGraphWithClusterParents,
|
|
1010
1091
|
bfsSingleSource,
|
|
1011
1092
|
buildCapped12hopKnn,
|
|
1012
1093
|
buildDogTerms,
|