egraph 6.0.0-rc.1 → 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 +374 -41
- package/pkg/egraph_wasm.js +1621 -135
- package/pkg/egraph_wasm_bg.wasm +0 -0
- package/pkg/index.d.ts +521 -60
- package/pkg/index.js +84 -14
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,6 +39,9 @@ import init, {
|
|
|
37
39
|
EdgePolylines as _EdgePolylines,
|
|
38
40
|
EffectiveResistanceResult,
|
|
39
41
|
EigenResult,
|
|
42
|
+
FcoseDraftGenerator,
|
|
43
|
+
FcoseQuality,
|
|
44
|
+
FcoseSolver,
|
|
40
45
|
FdebSolver,
|
|
41
46
|
FieldFftStats,
|
|
42
47
|
FieldRepulsionBackend,
|
|
@@ -164,10 +169,38 @@ import init, {
|
|
|
164
169
|
_daviesBouldinScore3d,
|
|
165
170
|
_daviesBouldinScoreManifold,
|
|
166
171
|
_daviesBouldinScoreNd,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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,
|
|
171
204
|
_distanceConsistency2d,
|
|
172
205
|
_distanceConsistency3d,
|
|
173
206
|
_distanceConsistencyManifold,
|
|
@@ -176,10 +209,6 @@ import init, {
|
|
|
176
209
|
_distributionConsistency3d,
|
|
177
210
|
_distributionConsistencyManifold,
|
|
178
211
|
_distributionConsistencyNd,
|
|
179
|
-
_drngPreservation2d,
|
|
180
|
-
_drngPreservation3d,
|
|
181
|
-
_drngPreservationManifold,
|
|
182
|
-
_drngPreservationNd,
|
|
183
212
|
_evaluateMetrics2d,
|
|
184
213
|
_evaluateMetrics2dWithOriginal,
|
|
185
214
|
_evaluateMetrics3d,
|
|
@@ -189,6 +218,10 @@ import init, {
|
|
|
189
218
|
_gabrielGraphEdges3d,
|
|
190
219
|
_gabrielGraphEdgesManifold,
|
|
191
220
|
_gabrielGraphEdgesNd,
|
|
221
|
+
_gabrielGraphPreservation2d,
|
|
222
|
+
_gabrielGraphPreservation3d,
|
|
223
|
+
_gabrielGraphPreservationManifold,
|
|
224
|
+
_gabrielGraphPreservationNd,
|
|
192
225
|
_gabrielGraphProperty2d,
|
|
193
226
|
_gabrielGraphProperty3d,
|
|
194
227
|
_gabrielGraphPropertyManifold,
|
|
@@ -241,6 +274,10 @@ import init, {
|
|
|
241
274
|
_relativeNeighborhoodEdges3d,
|
|
242
275
|
_relativeNeighborhoodEdgesManifold,
|
|
243
276
|
_relativeNeighborhoodEdgesNd,
|
|
277
|
+
_relativeNeighborhoodPreservation2d,
|
|
278
|
+
_relativeNeighborhoodPreservation3d,
|
|
279
|
+
_relativeNeighborhoodPreservationManifold,
|
|
280
|
+
_relativeNeighborhoodPreservationNd,
|
|
244
281
|
_sampledNp12d,
|
|
245
282
|
_sampledNp13d,
|
|
246
283
|
_sampledNp1Manifold,
|
|
@@ -302,6 +339,7 @@ import init, {
|
|
|
302
339
|
applyRelativeDistanceFloor,
|
|
303
340
|
aspectRatio,
|
|
304
341
|
assignLayers,
|
|
342
|
+
augmentGraphWithClusterParents,
|
|
305
343
|
bfsSingleSource,
|
|
306
344
|
buildCapped12hopKnn,
|
|
307
345
|
buildDogTerms,
|
|
@@ -839,12 +877,30 @@ export const DynamicKdTree = new Proxy(_DynamicKdTree, {
|
|
|
839
877
|
});
|
|
840
878
|
|
|
841
879
|
export function evaluateMetrics(graph, layout, targets, ...args) {
|
|
842
|
-
|
|
843
|
-
if (layout instanceof
|
|
844
|
-
|
|
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
|
+
}
|
|
845
899
|
if (layout instanceof _Layout2d) {
|
|
846
|
-
const opt = args.length === 1 && args[0] && typeof args[0] === "object" && !Array.isArray(args[0]) ? args[0] : null;
|
|
847
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
|
+
}
|
|
848
904
|
return _evaluateMetrics2dWithOriginal(graph, layout, targets, opt, opt.originalLayout);
|
|
849
905
|
}
|
|
850
906
|
return _evaluateMetrics2d(graph, layout, targets, ...args);
|
|
@@ -862,8 +918,16 @@ export const sampledNp1 = dispatchGraphLayout4("sampledNp1", _sampledNp12d, _sam
|
|
|
862
918
|
export const sampledNp2 = dispatchGraphLayout4("sampledNp2", _sampledNp22d, _sampledNp23d, _sampledNp2Nd, _sampledNp2Manifold);
|
|
863
919
|
export const gabrielGraphProperty = dispatchGraphLayout4("gabrielGraphProperty", _gabrielGraphProperty2d, _gabrielGraphProperty3d, _gabrielGraphPropertyNd, _gabrielGraphPropertyManifold);
|
|
864
920
|
export const nodeResolution = dispatchLayout4("nodeResolution", _nodeResolution2d, _nodeResolution3d, _nodeResolutionNd, _nodeResolutionManifold);
|
|
865
|
-
export const
|
|
866
|
-
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);
|
|
867
931
|
export const idealEdgeLengths = dispatchGraphLayout4("idealEdgeLengths", _idealEdgeLengths2d, _idealEdgeLengths3d, _idealEdgeLengthsNd, _idealEdgeLengthsManifold);
|
|
868
932
|
export const idealEdgeLengthsWithUnit = dispatchGraphLayout4("idealEdgeLengthsWithUnit", _idealEdgeLengthsWithUnit2d, _idealEdgeLengthsWithUnit3d, _idealEdgeLengthsWithUnitNd, _idealEdgeLengthsWithUnitManifold);
|
|
869
933
|
export const layoutDegeneracy = dispatchGraphLayout4("layoutDegeneracy", _layoutDegeneracy2d, _layoutDegeneracy3d, _layoutDegeneracyNd, _layoutDegeneracyManifold);
|
|
@@ -912,6 +976,8 @@ export {
|
|
|
912
976
|
CoarseEdgeLengthMode,
|
|
913
977
|
CoarsenedGraphResult,
|
|
914
978
|
CoarsenedHierarchyResult,
|
|
979
|
+
CoseRepulsionBackend,
|
|
980
|
+
CoseSolver,
|
|
915
981
|
CrossingPair,
|
|
916
982
|
CrossingSummary,
|
|
917
983
|
CsrMatrix,
|
|
@@ -923,6 +989,9 @@ export {
|
|
|
923
989
|
DogVaradhanLandmarks,
|
|
924
990
|
EffectiveResistanceResult,
|
|
925
991
|
EigenResult,
|
|
992
|
+
FcoseDraftGenerator,
|
|
993
|
+
FcoseQuality,
|
|
994
|
+
FcoseSolver,
|
|
926
995
|
FdebSolver,
|
|
927
996
|
FieldFftStats,
|
|
928
997
|
FieldRepulsionBackend,
|
|
@@ -1018,6 +1087,7 @@ export {
|
|
|
1018
1087
|
applyRelativeDistanceFloor,
|
|
1019
1088
|
aspectRatio,
|
|
1020
1089
|
assignLayers,
|
|
1090
|
+
augmentGraphWithClusterParents,
|
|
1021
1091
|
bfsSingleSource,
|
|
1022
1092
|
buildCapped12hopKnn,
|
|
1023
1093
|
buildDogTerms,
|