algorithm icon indicating copy to clipboard operation
algorithm copied to clipboard

常用的图算法 JS 实现,提供给 G6 及 Graphin 用于图分析场景使用。

Results 9 algorithm issues
Sort by recently updated
recently updated
newest added

目前 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...

![image](https://user-images.githubusercontent.com/8201647/151354660-5dba7117-4c6a-4a69-9163-4e88f6a198e3.png) ![image](https://user-images.githubusercontent.com/8201647/151354578-f582e0d4-af07-466d-b75b-d485579fc79e.png) ![image](https://user-images.githubusercontent.com/8201647/151354758-0af931ba-64f0-446d-bb61-bbeb3e779f2b.png)

```bash npm i npm run bootsrap ``` 后 build 和 test 均无法执行 ![image](https://user-images.githubusercontent.com/47357585/133137556-70ddc5ce-2772-45ec-9841-59912a457983.png) 并且 packages/graph 内部并未安装 node_modules 在包内安装后可以正常 build:umd 但是 test 会挂起无法执行 ![image](https://user-images.githubusercontent.com/47357585/133137889-3ce80b65-b94d-49a8-83b5-c7db72ba7f13.png) 另外 lerna.json 中配置为了 tnpm,是否考虑换为 yarn ![image](https://user-images.githubusercontent.com/47357585/133138307-78db1126-8a38-4e5c-8d5e-07c1a1509c2b.png)

![image](https://user-images.githubusercontent.com/21599896/124261689-aa47a780-db63-11eb-9f06-274184c82e74.png)

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如下表: 序号 | 算法名 |...

PR: unreviewed

@antv/algorithm 打包错误,导致 Graphin 无法正常的被运行 。 ![Screenshot 2021-04-14 at 11 44 14 AM](https://user-images.githubusercontent.com/25884538/114835517-3cad9a00-9e04-11eb-9d13-b7ac77f66c34.png)