@graphty/cytoscape-extensions 0.0.6 → 0.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphty/cytoscape-extensions",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Graphty layouts, algorithms, graph generators, sample datasets and file import/export as Cytoscape.js extensions",
5
5
  "author": "Adam Powers <apowers@ato.ms>",
6
6
  "type": "module",
@@ -71,9 +71,9 @@
71
71
  },
72
72
  "homepage": "https://github.com/graphty-org/graphty-monorepo/tree/master/cytoscape-extensions#readme",
73
73
  "dependencies": {
74
- "@graphty/graph-io": "^0.3.33",
75
74
  "@graphty/graph-samples": "^0.1.26",
76
- "@graphty/webgpu-graph-algorithms": "^0.6.42"
75
+ "@graphty/graph-io": "^0.3.34",
76
+ "@graphty/webgpu-graph-algorithms": "^0.6.44"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "@graphty/algorithms": "^3.0.0",
@@ -102,9 +102,9 @@
102
102
  "typescript": "^5.9.3",
103
103
  "vite": "^7.0.5",
104
104
  "vitest": "4.1.11",
105
- "@graphty/algorithms": "^3.3.13",
105
+ "@graphty/algorithms": "^3.4.1",
106
106
  "@graphty/graph-format": "^1.3.11",
107
- "@graphty/layout": "^2.2.14"
107
+ "@graphty/layout": "^2.3.1"
108
108
  },
109
109
  "scripts": {
110
110
  "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && vite build --config vite.bundle.config.ts --mode cdn --logLevel warn && vite build --config vite.bundle.config.ts --logLevel warn",
@@ -74,7 +74,7 @@ export const OPTION_NAMES: Readonly<Record<string, readonly string[]>> = {
74
74
  "weight",
75
75
  ],
76
76
  graphtyHasCycle: ["directed", "gpu"],
77
- graphtyHierarchicalClustering: ["directed", "gpu", "linkage"],
77
+ graphtyHierarchicalClustering: ["directed", "gpu", "linkage", "maxNodes"],
78
78
  graphtyHits: ["directed", "field", "gpu", "maxIterations", "normalized", "tolerance", "weight"],
79
79
  graphtyIsBipartite: ["arcs", "directed", "field", "gpu"],
80
80
  graphtyIsGraphIsomorphic: ["directed", "edgeMatch", "gpu", "nodeMatch", "other"],
@@ -170,7 +170,16 @@ export const OPTION_NAMES: Readonly<Record<string, readonly string[]>> = {
170
170
  "seed",
171
171
  "tolerance",
172
172
  ],
173
- graphtyTeraHAC: ["directed", "distanceThreshold", "field", "gpu", "linkage", "numClusters", "useGraphDistance"],
173
+ graphtyTeraHAC: [
174
+ "directed",
175
+ "distanceThreshold",
176
+ "field",
177
+ "gpu",
178
+ "linkage",
179
+ "maxNodes",
180
+ "numClusters",
181
+ "useGraphDistance",
182
+ ],
174
183
  graphtyTopAdamicAdarCandidatesForNode: ["candidates", "directed", "gpu", "includeExisting", "root", "topK"],
175
184
  graphtyTopCandidatesForNode: ["candidates", "directed", "gpu", "includeExisting", "root", "topK"],
176
185
  graphtyTopologicalSort: ["directed", "gpu"],
package/src/algorithms.ts CHANGED
@@ -1607,12 +1607,13 @@ const IMPLS = {
1607
1607
  adamicAdarScore(c.s, req(c, o.source, "source"), req(c, o.target, "target"), { directed: c.s.directed }),
1608
1608
  commonNeighborsPrediction: (
1609
1609
  c: Ctx,
1610
- _o: AlgorithmOptions & Omit<LinkPredictionOptions, "directed"> = {},
1611
- ): PredictedLink[] => links(c, commonNeighborsPrediction(c.s, { ...c.rest, directed: c.s.directed })),
1610
+ _o: AlgorithmOptions & Omit<LinkPredictionOptions, "directed" | "uniquePairs"> = {},
1611
+ ): PredictedLink[] =>
1612
+ links(c, commonNeighborsPrediction(c.s, { ...c.rest, directed: c.s.directed, uniquePairs: true })),
1612
1613
  adamicAdarPrediction: (
1613
1614
  c: Ctx,
1614
- _o: AlgorithmOptions & Omit<LinkPredictionOptions, "directed"> = {},
1615
- ): PredictedLink[] => links(c, adamicAdarPrediction(c.s, { ...c.rest, directed: c.s.directed })),
1615
+ _o: AlgorithmOptions & Omit<LinkPredictionOptions, "directed" | "uniquePairs"> = {},
1616
+ ): PredictedLink[] => links(c, adamicAdarPrediction(c.s, { ...c.rest, directed: c.s.directed, uniquePairs: true })),
1616
1617
  commonNeighborsForPairs: (c: Ctx, o: AlgorithmOptions & PairsOptions): number[] =>
1617
1618
  Array.from(commonNeighborsForPairs(c.s, pairsOf(c, o.pairs, "pairs"), { directed: c.s.directed })),
1618
1619
  adamicAdarForPairs: (c: Ctx, o: AlgorithmOptions & PairsOptions): number[] =>