algorithm
algorithm copied to clipboard
常用的图算法 JS 实现,提供给 G6 及 Graphin 用于图分析场景使用。
目前 louvain 的实现非常慢: https://stackblitz.com/edit/stackblitz-starters-f7egtw?file=index.js ``` Graphology x 173,947 ops/sec ±0.22% (98 runs sampled) NGraph x 60,245 ops/sec ±0.24% (99 runs sampled) @antv/algorithm x 436 ops/sec ±0.53% (85 runs sampled) ```
feat: add edgePath and allEdgePaths to the output of dijkstra;
使用 G6 dagre 图时, 单独运行正常, 作为子应用嵌入到 qiankun 中时, 会有报错, 大概定位到是 proxy sandbox https://github.com/antvis/algorithm/blob/c5731a7601f39af9016a4ce26454de170bd9298d/packages/graph/src/workers/index.worker.ts#L11
[1] ../node_modules/@antv/algorithm/es/gaddi.js 498:59-72 [1] "export '__spreadArray' was not found in 'tslib' [1] at HarmonyImportSpecifierDependency._getErrors (/Users/fanzhou/Documents/code/tcv/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11) [1] at HarmonyImportSpecifierDependency.getWarnings (/Users/fanzhou/Documents/code/tcv/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15) [1] at Compilation.reportDependencyErrorsAndWarnings (/Users/fanzhou/Documents/code/tcv/node_modules/webpack/lib/Compilation.js:1454:24) [1] at /Users/fanzhou/Documents/code/tcv/node_modules/webpack/lib/Compilation.js:1258:10 [1] at AsyncSeriesHook.eval [as...
  
开发配置错误
```bash npm i npm run bootsrap ``` 后 build 和 test 均无法执行  并且 packages/graph 内部并未安装 node_modules 在包内安装后可以正常 build:umd 但是 test 会挂起无法执行  另外 lerna.json 中配置为了 tnpm,是否考虑换为 yarn 

1. 规范化API,目前API有算法21个,异步算法19个,数据结构1个。算法 API 调用方式统一传入一个对象参数,同步算法至少有 `graphData`属性,异步算法可传`workerScriptURL`属性。以 `getOutDegree` 为例: ```javascript const result = getOutDegree({ graphData, nodeId, }) getOutDegreeAsync({ graphData, nodeId, workerScriptURL, }).then(result => { console.log(result) }) ``` 目前支持API如下表: 序号 | 算法名 |...
@antv/algorithm 打包错误,导致 Graphin 无法正常的被运行 。 