dag.js:具有边缘标记的简单DAG(有向无环图)

时间:2021-05-13 18:25:30
【文件属性】:
文件名称:dag.js:具有边缘标记的简单DAG(有向无环图)
文件大小:50KB
文件格式:ZIP
更新时间:2021-05-13 18:25:30
JavaScript dag.js 具有边缘标记的简单DAG(有向无环图)模块。 安装 $ npm install dagjs 用法 let Dag = require ( 'dagjs' ) ; let dag = new Dag ( ) ; // ... 例子 添加边: let dag = new Dag ( ) ; // add(from, to, tags, weight) dag . add ( 'Mike' , 'Josh' , 'follows' , 3 ) ; dag . add ( 'Mary' , 'Josh' , [ 'follows' , 'likes' ] , 50 ) ; dag . add ( 'Josh' , 'John' , [ 'follows' , 'admires' ] ) ; dag . add ( 'Mike' , 'Mary' , 'likes' , 100 )
【文件预览】:
dag.js-master
----.travis.yml(84B)
----cycle-error.js(192B)
----index.js(13KB)
----package.json(1KB)
----test()
--------.line-dag.js(1KB)
--------neighbouring.js(3KB)
--------index.js(26B)
--------remove.js(3KB)
--------.contract.js(1KB)
--------tag.js(2KB)
--------add.js(3KB)
--------.eslintrc.js(235B)
--------.subdag.js(1KB)
--------clone.js(2KB)
--------.sort.js(1KB)
----gulpfile.js(369B)
----LICENSE(1KB)
----package-lock.json(158KB)
----.npmignore(16B)
----.eslintrc.js(196B)
----.gitignore(1KB)
----README.md(2KB)
----.editorconfig(232B)

网友评论