{"_id":"js-graph-algorithms","_rev":"16-bf8823e277b49fbf465724efdba66b9e","name":"js-graph-algorithms","description":"Package implements data structures and algorithms for processing various types of graphs","dist-tags":{"latest":"1.0.18"},"versions":{"1.0.5":{"name":"js-graph-algorithms","version":"1.0.5","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"1715f89b9fc5200599a0d320e5c24aefc7d08a62","_id":"js-graph-algorithms@1.0.5","_shasum":"546f66187a147f1c0ca84597bc52a648303a0784","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"546f66187a147f1c0ca84597bc52a648303a0784","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.5.tgz","integrity":"sha512-xPAy2H0I9kjzBK0bofkjrljYUQMnmApIG18D9OIh1qEnmKubJnTEWNMnc0vQLSQ3jmyNJiZApqQPlDq/vAIXcQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGpt2vSTPQzYImV0MWqeRJ032va061neOaH/XrYl+JBSAiBPWp1qXujGhc+A7eCs0lt8wyKkrCmEYrTWAjazWc1E7g=="}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.5.tgz_1495888657102_0.32568110548891127"}},"1.0.6":{"name":"js-graph-algorithms","version":"1.0.6","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"8f5dfb3ad023e54c8ff567ff49faa0c273a97639","_id":"js-graph-algorithms@1.0.6","_shasum":"175e58e8485b358a335c5e3b0be5d17b25b9ba34","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"175e58e8485b358a335c5e3b0be5d17b25b9ba34","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.6.tgz","integrity":"sha512-60LC7S4Ylr9FYTCo7u5HQxe/AHbHETVAKbPLsxtjZnNRzhpWipEz7MusaQiuMUl9e2mO+toCxSEd+AB+MEq4nA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJmhf+vHiprmgotR9yDymvpcLvl4o/J0rjYngeQwXA4AiEA4/18zPtecgYsve5MV3xgy3DbayxbaDxsdWMeDssU+BQ="}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.6.tgz_1495889204762_0.3620450657326728"}},"1.0.7":{"name":"js-graph-algorithms","version":"1.0.7","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"2525702b87c19fe50493152e53dac8f0f9f6368e","_id":"js-graph-algorithms@1.0.7","_shasum":"bf50f8ff181dad6d619ec071e8b4f6fa8621d1a6","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"bf50f8ff181dad6d619ec071e8b4f6fa8621d1a6","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.7.tgz","integrity":"sha512-IvS5ZhSLCjsyo/H+2xJ1jhl5XSQzyGWkNJh8ZVf+p9AVtSck/SMb2Zl/V9Vl3gBjhfBp14QKAWkk2DJ8cZCiDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIErvc5Sfgj/b7Tout7Mx30zR8NEh/1QiS79eFwyg5C9BAiEAt5FQJtQ6y/EASkA8BQD7jRAwYfde80MuUBSbAXFvTeI="}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.7.tgz_1495889968677_0.4810948851518333"}},"1.0.8":{"name":"js-graph-algorithms","version":"1.0.8","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"79c75c4ee5826ad9b65e1e93af7afb7e66d97fb6","_id":"js-graph-algorithms@1.0.8","_shasum":"4b4e72aee4bb1281e67bb60f693cf07384e84044","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"4b4e72aee4bb1281e67bb60f693cf07384e84044","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.8.tgz","integrity":"sha512-U+X7oW9N+t8edPgKYaJXfgA1IYQWa4i5Hx2az7Yijq/dCs6hdmZd0PgPMhRzj3xX7qNMU5taWDpMNh26iPjoIw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN5lmiCEke+3WfBm28ULztiA4ra7aToeJTq1e364B1rwIhAJP35HkYaiwHEZUnK4oP2bAmBPK0WD7C7S02wKvMG9/k"}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.8.tgz_1495959913613_0.6179750587325543"}},"1.0.9":{"name":"js-graph-algorithms","version":"1.0.9","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"fee26e0644d8bf0dfdb24371346b5e40e1be9d8b","_id":"js-graph-algorithms@1.0.9","_shasum":"ca0afe463522abed66c1960862ca0d7923479e57","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"ca0afe463522abed66c1960862ca0d7923479e57","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.9.tgz","integrity":"sha512-iS3liP37sQQLHoDSqIe3y2yv1HvMFJbRvI5+sBdMFp8RXnwbLfZcKJheKu69JYb3GU3NKIHCEP9/JiJgST8TOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7ojWJHmvLEYPKak2V/PcFaPhq1TrTLM7yi55lf1TVAwIhAIvjjoYEs1xq/zGqJ0ho090s/J0s9OfNa+oPd9fayVH9"}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.9.tgz_1496195102785_0.7358069692272693"}},"1.0.10":{"name":"js-graph-algorithms","version":"1.0.10","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"7f3976ded9bcebcfaa5d42d53f44f56f0b37068b","_id":"js-graph-algorithms@1.0.10","_shasum":"c09b5051b94e4abae9ec51b1ceb1b3c4e30df217","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"c09b5051b94e4abae9ec51b1ceb1b3c4e30df217","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.10.tgz","integrity":"sha512-QwvTyMb6sl3+b1coFMZxMHllzwKi7b8n1Ndumd0HL591QptSPorE1UCNFT7cHBiME3wzrIe9CKZMsLvPWoa1zg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsQVAUO2hxYKAwkn9zLuWJBjc5tvAoiPEfsLCDoDtgmQIhALK7o8Px1uZaaEoY0d+XPPOxxhyZCr2+eWYpCanWq60X"}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.10.tgz_1497022504220_0.16522500826977193"}},"1.0.11":{"name":"js-graph-algorithms","version":"1.0.11","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"36faf4168bac048ed5485d2ff37bec1a401f642b","_id":"js-graph-algorithms@1.0.11","_shasum":"a6382f3f8664249daabb943f0f33c37173a896ab","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"a6382f3f8664249daabb943f0f33c37173a896ab","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.11.tgz","integrity":"sha512-XdABuL81mNDTHhQCtJvzLjpQX4TsixKB0tSkmWdf2EJDcdpFHdMamP8pYrhQZXngLr7OEPvkQgWH3pu3S3megw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQ1wavbt/Uswk2GBQvecXgi7FXpsVn36zFLeYupWRF2gIgEuB1Ifz2C2je/kbkmey9uutzpwAjCWEPg1YnPN3nDKw="}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.11.tgz_1497022880820_0.5259531487245113"}},"1.0.13":{"name":"js-graph-algorithms","version":"1.0.13","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","typings":"src/jsgraphs.d.ts","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"4261ea96b65c5e321f97c04ca4ad44cbafc1478c","_id":"js-graph-algorithms@1.0.13","_shasum":"bb0d18467736e111668052e2814d4f72eb7342eb","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"bb0d18467736e111668052e2814d4f72eb7342eb","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.13.tgz","integrity":"sha512-Np8S5idnxXkhF8EiEOrrYUKDiyaQD9qAjRsi6yN03nhTF/xt5Q3ToGz2QJw6Pyoet/LlucK+g5x2QqDYMTTwtA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/JYTlBSDJSDBzGeUnEaMJdlx/ai02hBAyJTk+kCXErAiBInHvOEvNeTLqMLQgo7hRstgyNbbgZI8INQHxmC8uiWg=="}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.13.tgz_1503905786317_0.9131657069083303"}},"1.0.14":{"name":"js-graph-algorithms","version":"1.0.14","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","typings":"src/jsgraphs.d.ts","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"9de451f9d32b236b24c82ad5453215d25fcbbeb7","_id":"js-graph-algorithms@1.0.14","_shasum":"96cfad27ef2713962462f4c9163e86767879e784","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"96cfad27ef2713962462f4c9163e86767879e784","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.14.tgz","integrity":"sha512-Jo1IFDwTKTvrBpzD+2bORsR4SCpPIULbx605jlACAcefp7PMhBZahGv6umtwXvD9g5KHSvtkcB/Wj3o3Oo3Pog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5qmAT2f0cXSaoKWiKoX75dUcygEjLYw95/bbxRVBqjwIhAOy0BT4zZJ+qw8M1qWN/VsaH5S6zkFqcXizIlep/tTmm"}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.14.tgz_1503966774043_0.8234933626372367"}},"1.0.15":{"name":"js-graph-algorithms","version":"1.0.15","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"./src/jsgraphs.js","typings":"src/jsgraphs.d.ts","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"e2e1baf491e82376a3f90cbb8bc85e503cec45d0","_id":"js-graph-algorithms@1.0.15","_shasum":"f7f37ab6e4f3072089ad4c39c34124508ee9e69e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"f7f37ab6e4f3072089ad4c39c34124508ee9e69e","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.15.tgz","integrity":"sha512-siOx0yFZ2dhrwR3fsxCYXGGZ+NixABZRs5KVGW0d5nxa4UwoPcXLzKp9+mZqosMBLAhidZyMHDeGPXs2hcxtng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTYSDyphYj6eEkHdRX68+HHK/t7EMKtjXXu6Uv6T2tYgIhALXRtpBp+56xlO46x47PDsZdjudA/tCMSpuZDBWuXEon"}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.15.tgz_1504934142956_0.7743762151803821"}},"1.0.16":{"name":"js-graph-algorithms","version":"1.0.16","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","typings":"src/jsgraphs.d.ts","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"e3f1bc5f451aaa08fdaa36344711dae91d596c4a","_id":"js-graph-algorithms@1.0.16","_shasum":"ad8d758950c89d849028aae5aab2ad1f452d9930","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"ad8d758950c89d849028aae5aab2ad1f452d9930","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.16.tgz","integrity":"sha512-mQhEKh1Qpxg6JzNXOB9K7+XK32+3ZtyZD2XwT12cRNodp/e8dPCju+5Ku+r/3loLc5IZeGd1zi1e6aIsIN/ikg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH70mRNAT8Vnq4SOmbgTN696uOe6oCgM7/U12BT2tiUrAiAGj42tbFrnJaOaGlp2Xe4+5qnH/9asKWd+UlL0PnY3bQ=="}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.16.tgz_1504934228992_0.9931882314849645"}},"1.0.17":{"name":"js-graph-algorithms","version":"1.0.17","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","typings":"src/jsgraphs.d.ts","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"d6f9ba50a08b36e2ca7f8679fe29adf5a8ae4b12","_id":"js-graph-algorithms@1.0.17","_shasum":"96b4e6c222d88e2a084301e012be3a768ff4864b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"96b4e6c222d88e2a084301e012be3a768ff4864b","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.17.tgz","integrity":"sha512-0rPKhcleBoEpVMSgfyUPktOQYTWE8xwryDOEHV5zAm0ENoC+Bq4LeVxyKaVrQexFI3156h3d2VwwgfmKJw1FHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDa3JiDJ3hOz9WcI2rgWuB4mfIf91mf/P7ebuPtwDzIpgIhAIFKympTNA35rfB2yiObPaIKduVR+FlDgQjp6Zv95NLt"}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.17.tgz_1511909562717_0.7934210412204266"}},"1.0.18":{"name":"js-graph-algorithms","version":"1.0.18","description":"Package implements data structures and algorithms for processing various types of graphs","author":{"name":"Xianshun Chen"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"license":"MIT","main":"index.js","typings":"src/jsgraphs.d.ts","directories":{"test":"test"},"scripts":{"test":"mocha test","cover":"istanbul cover _mocha","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"bin":{"js-graphs":"./src/jsgraphs.js"},"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"dependencies":{},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","grunt":"^1.0.1","grunt-contrib-uglify":"^3.0.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","istanbul":"^0.4.5","mocha":"^3.4.1"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","gitHead":"0ae89888184fde8c4afc34f514212ba186f658b3","_id":"js-graph-algorithms@1.0.18","_shasum":"f96ec87bf194f5c0a31365fa0e1d07b7b962d891","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"chen0040","email":"xs0040@gmail.com"},"dist":{"shasum":"f96ec87bf194f5c0a31365fa0e1d07b7b962d891","tarball":"https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.18.tgz","integrity":"sha512-Gu1wtWzXBzGeye/j9BuyplGHscwqKRZodp/0M1vyBc19RJpblSwKGu099KwwaTx9cRIV+Qupk8xUMfEiGfFqSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRRuk34RBO3tWn9WPPVaUmV9ma0zqi7RUkrFHBnrBJhwIgGHSwtJC6zRKII6EUqOqOyLN181iFeGwIlFGYJdZoG4Q="}]},"maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-graph-algorithms-1.0.18.tgz_1511909953714_0.8711285276804119"}}},"readme":"# js-graph-algorithms\nPackage provides javascript implementation of algorithms for graph processing\n\n[![Build Status](https://travis-ci.org/chen0040/js-graph-algorithms.svg?branch=master)](https://travis-ci.org/chen0040/js-graph-algorithms) [![Coverage Status](https://coveralls.io/repos/github/chen0040/js-graph-algorithms/badge.svg?branch=master)](https://coveralls.io/github/chen0040/js-graph-algorithms?branch=master) \n\n# Features\n\n* Depth First Search (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-dfs.html))\n* Breadth First Search\n* Connected Components for undirected graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-connected-components.html))\n* Topoloical Sort (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-topo-sort.html))\n* Strongly Connected Components for directed graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-strongly-connected-components.html))\n* Minimum Spanning Tree for weighted graph (Kruskal, Prim Lazy, Prim Eager) (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-kruskal.html))\n* Shortest Paths (Dijkstra, Bellman-Ford, Topological Sort on DAG) (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-dijkstra.html))\n* MaxFlow-MinCut (Ford-Fulkerson) (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-ford-fulkerson.html))\n\n# Install\n\n```bash\nnpm install js-graph-algorithms\n```\n\n# Usage\n\n### Create an undirected unweighted graph\n\nThe sample code below shows how to create a undirected and unweighted graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-graph.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\n\nvar g = new jsgraphs.Graph(6); // 6 is the number vertices in the graph\ng.addEdge(0, 5); // add undirected edge connecting vertex 0 to vertex 5\ng.addEdge(2, 4);\ng.addEdge(2, 3);\ng.addEdge(1, 2);\ng.addEdge(0, 1);\ng.addEdge(3, 4);\ng.addEdge(3, 5);\ng.addEdge(0, 2);\n\ng.node(2).label = 'Hello'; // assigned 'Hello' as label for node 2\ng.edge(0, 2).label = 'World'; // edge between 0 and 2\n\nconsole.log(g.V); // display 6, which is the number of vertices in g\nconsole.log(g.adj(0)); // display [5, 1, 2], which is the adjacent list to vertex 0\n```\n\n### Create directed unweighted graph\n\nThe sample code below shows how to create a direted and unweighted graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-digraph.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\n\nvar g = new jsgraphs.DiGraph(13); // 13 is the number vertices in the graph\ng.addEdge(4,  2); // add directed edge from 4 to 2\ng.addEdge(2,  3);\ng.addEdge(3,  2);\ng.addEdge(6,  0);\ng.addEdge(0,  1);\ng.addEdge(2,  0);\ng.addEdge(11, 12);\ng.addEdge(12,  9);\ng.addEdge(9, 10);\ng.addEdge(9, 11);\ng.addEdge(7,  9);\ng.addEdge(10, 12);\ng.addEdge(11,  4);\ng.addEdge(4,  3);\ng.addEdge(3,  5);\ng.addEdge(6,  8);\ng.addEdge(8,  6);\ng.addEdge(5,  4);\ng.addEdge(0,  5);\ng.addEdge(6,  4);\ng.addEdge(6,  9);\ng.addEdge(7,  6);\n\ng.node(2).label = 'Hello'; // assign 'Hello' as label for node 2\ng.edge(0, 5).label = 'World'; // edge from 0 to 5\n\nconsole.log(g.V); // display 13, which is the number of vertices in g\nconsole.log(g.adj(0)); // display the adjacency list which are vertices directed from vertex 0\n```\n\n### Create undirected weighted graph\n\nThe sample code below shows show to create undirected weighted graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-weighted-graph.html)):\n\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.WeightedGraph(8); // 8 is the number vertices in the graph\ng.addEdge(new jsgraphs.Edge(0, 7, 0.16));\ng.addEdge(new jsgraphs.Edge(2, 3, 0.17));\ng.addEdge(new jsgraphs.Edge(1, 7, 0.19));\ng.addEdge(new jsgraphs.Edge(0, 2, 0.26));\ng.addEdge(new jsgraphs.Edge(5, 7, 0.28));\ng.addEdge(new jsgraphs.Edge(1, 3, 0.29));\ng.addEdge(new jsgraphs.Edge(1, 5, 0.32));\ng.addEdge(new jsgraphs.Edge(2, 7, 0.34));\ng.addEdge(new jsgraphs.Edge(4, 5, 0.35));\ng.addEdge(new jsgraphs.Edge(1, 2, 0.36));\ng.addEdge(new jsgraphs.Edge(4, 7, 0.37));\ng.addEdge(new jsgraphs.Edge(0, 4, 0.38));\ng.addEdge(new jsgraphs.Edge(6, 2, 0.4));\ng.addEdge(new jsgraphs.Edge(3, 6, 0.52));\ng.addEdge(new jsgraphs.Edge(6, 0, 0.58));\ng.addEdge(new jsgraphs.Edge(6, 4, 0.93));\n\ng.node(2).label = 'Hello'; // assign 'Hello' as label for node 2\ng.edge(4, 5).label = 'World'; // edge between node 4 and 5\n\nconsole.log(g.V); // display 13, which is the number of vertices in g\nconsole.log(g.adj(0)); // display the adjacency list which are undirected edges connected to vertex 0\n```\n\n### Create directed weighted graph\n\nThe sample code below shows show to create directed weighted graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-weighted-digraph.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.WeightedDiGraph(8); // 8 is the number vertices in the graph\ng.addEdge(new jsgraphs.Edge(0, 7, 0.16));\ng.addEdge(new jsgraphs.Edge(2, 3, 0.17));\ng.addEdge(new jsgraphs.Edge(1, 7, 0.19));\ng.addEdge(new jsgraphs.Edge(0, 2, 0.26));\ng.addEdge(new jsgraphs.Edge(5, 7, 0.28));\ng.addEdge(new jsgraphs.Edge(1, 3, 0.29));\ng.addEdge(new jsgraphs.Edge(1, 5, 0.32));\ng.addEdge(new jsgraphs.Edge(2, 7, 0.34));\ng.addEdge(new jsgraphs.Edge(4, 5, 0.35));\ng.addEdge(new jsgraphs.Edge(1, 2, 0.36));\ng.addEdge(new jsgraphs.Edge(4, 7, 0.37));\ng.addEdge(new jsgraphs.Edge(0, 4, 0.38));\ng.addEdge(new jsgraphs.Edge(6, 2, 0.4));\ng.addEdge(new jsgraphs.Edge(3, 6, 0.52));\ng.addEdge(new jsgraphs.Edge(6, 0, 0.58));\ng.addEdge(new jsgraphs.Edge(6, 4, 0.93));\n\ng.node(2).label = 'Hello';\ng.edge(4, 5).label = 'World'; // edge from node 4 to node 5\n\nconsole.log(g.V); // display 13, which is the number of vertices in g\nconsole.log(g.adj(0)); // display the adjacency list which are directed edges from vertex 0\n```\n\n### Depth First Search\n\nThe sample code below show how to perform depth first search of an undirected graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-dfs.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\n\nvar g = new jsgraphs.Graph(6);\ng.addEdge(0, 5);\ng.addEdge(2, 4);\ng.addEdge(2, 3);\ng.addEdge(1, 2);\ng.addEdge(0, 1);\ng.addEdge(3, 4);\ng.addEdge(3, 5);\ng.addEdge(0, 2);\nvar s = 0;\nvar dfs = new jsgraphs.DepthFirstSearch(g, s);\n\n\nfor(var v=0; v < g.V; ++v) {\n if(dfs.hasPathTo(v)) {\n    console.log(s + \" is connected to \" + v);\n    console.log(\"path: \" + dfs.pathTo(v));\n } else {\n     console.log('No path from ' + s + ' to ' + v);\n }\n} \n```\n\n### Connected Components\n\nThe sample code below show how to obtain the number of connected components in an undirected graph  (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-connected-components.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\n\nvar g = new jsgraphs.Graph(13);\ng.addEdge(0, 5);\ng.addEdge(4, 3);\ng.addEdge(0, 1);\ng.addEdge(9, 12);\ng.addEdge(6, 4);\ng.addEdge(5, 4);\ng.addEdge(0, 2);\ng.addEdge(11, 12);\ng.addEdge(9,10);\ng.addEdge(0, 6);\ng.addEdge(7, 8);\ng.addEdge(9, 11);\ng.addEdge(5, 3); \n\nvar cc = new jsgraphs.ConnectedComponents(g);\nconsole.log(cc.componentCount()); // display 3\nfor (var v = 0; v < g.V; ++v) {\n    console.log('id[' + v + ']: ' + cc.componentId(v));\n}\n```\n\n### Topological Sort\n\nThe sample code below show how to obtain the reverse post order of a topological sort in a directed acyclic graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-topo-sort.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\n\nvar dag = new jsgraphs.DiGraph(7); // must be directed acyclic graph\n\ndag.addEdge(0, 5);\ndag.addEdge(0, 2);\ndag.addEdge(0, 1);\ndag.addEdge(3, 6);\ndag.addEdge(3, 5);\ndag.addEdge(3, 4);\ndag.addEdge(5, 4);\ndag.addEdge(6, 4);\ndag.addEdge(6, 0);\ndag.addEdge(3, 2);\ndag.addEdge(1, 4);\n\nvar ts = new jsgraphs.TopologicalSort(dag);\n\nvar order = ts.order();\nconsole.log(order); // display array which is the topological sort order\n\n```\n\n### Strongly Connected Components for Directed Graph\n\nThe sample code below show how to obtain the strongly connected components from a directed graph (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-strongly-connected-components.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\n\nvar graph = new jsgraphs.DiGraph(13);\ngraph.addEdge(4, 2);\ngraph.addEdge(2, 3);\ngraph.addEdge(3, 2);\ngraph.addEdge(6, 0);\ngraph.addEdge(0, 1);\ngraph.addEdge(2, 0);\ngraph.addEdge(11, 12);\ngraph.addEdge(12, 9);\ngraph.addEdge(9, 10);\ngraph.addEdge(9, 11);\ngraph.addEdge(8, 9);\ngraph.addEdge(10, 12);\ngraph.addEdge(11, 4);\ngraph.addEdge(4, 3);\ngraph.addEdge(3, 5);\ngraph.addEdge(7, 8);\ngraph.addEdge(8, 7);\ngraph.addEdge(5, 4);\ngraph.addEdge(0, 5);\ngraph.addEdge(6, 4);\ngraph.addEdge(6, 9);\ngraph.addEdge(7, 6);\nvar scc = new jsgraphs.StronglyConnectedComponents(graph);\nconsole.log(scc.componentCount()); // display 5\nfor (var v = 0; v < graph.V; ++v) {\n    console.log('id[' + v + ']: ' + scc.componentId(v));\n}\n```\n\n### Use Kruskal algorithm to find the minimum spanning tree of a weighted graph\n\nThe sample code below show how to obtain the minimum spanning tree from a weighted graph using Kruskal algorithm (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-kruskal.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.WeightedGraph(8);\n\ng.addEdge(new jsgraphs.Edge(0, 7, 0.16));\ng.addEdge(new jsgraphs.Edge(2, 3, 0.17));\ng.addEdge(new jsgraphs.Edge(1, 7, 0.19));\ng.addEdge(new jsgraphs.Edge(0, 2, 0.26));\ng.addEdge(new jsgraphs.Edge(5, 7, 0.28));\ng.addEdge(new jsgraphs.Edge(1, 3, 0.29));\ng.addEdge(new jsgraphs.Edge(1, 5, 0.32));\ng.addEdge(new jsgraphs.Edge(2, 7, 0.34));\ng.addEdge(new jsgraphs.Edge(4, 5, 0.35));\ng.addEdge(new jsgraphs.Edge(1, 2, 0.36));\ng.addEdge(new jsgraphs.Edge(4, 7, 0.37));\ng.addEdge(new jsgraphs.Edge(0, 4, 0.38));\ng.addEdge(new jsgraphs.Edge(6, 2, 0.4));\ng.addEdge(new jsgraphs.Edge(3, 6, 0.52));\ng.addEdge(new jsgraphs.Edge(6, 0, 0.58));\ng.addEdge(new jsgraphs.Edge(6, 4, 0.93));\n\nvar kruskal = new jsgraphs.KruskalMST(g); \nvar mst = kruskal.mst;\nfor(var i=0; i < mst.length; ++i) {\n    var e = mst[i];\n    var v = e.either();\n    var w = e.other(v);\n    console.log('(' + v + ', ' + w + '): ' + e.weight);\n}\n```\n\n### Use Lazy Prim algorithm to find the minimum spanning tree of a weighted graph\n\nThe sample code below show how to obtain the minimum spanning tree from a weighted graph using Lazy Prim algorithm (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-lazy-prim.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.WeightedGraph(8);\n\ng.addEdge(new jsgraphs.Edge(0, 7, 0.16));\ng.addEdge(new jsgraphs.Edge(2, 3, 0.17));\ng.addEdge(new jsgraphs.Edge(1, 7, 0.19));\ng.addEdge(new jsgraphs.Edge(0, 2, 0.26));\ng.addEdge(new jsgraphs.Edge(5, 7, 0.28));\ng.addEdge(new jsgraphs.Edge(1, 3, 0.29));\ng.addEdge(new jsgraphs.Edge(1, 5, 0.32));\ng.addEdge(new jsgraphs.Edge(2, 7, 0.34));\ng.addEdge(new jsgraphs.Edge(4, 5, 0.35));\ng.addEdge(new jsgraphs.Edge(1, 2, 0.36));\ng.addEdge(new jsgraphs.Edge(4, 7, 0.37));\ng.addEdge(new jsgraphs.Edge(0, 4, 0.38));\ng.addEdge(new jsgraphs.Edge(6, 2, 0.4));\ng.addEdge(new jsgraphs.Edge(3, 6, 0.52));\ng.addEdge(new jsgraphs.Edge(6, 0, 0.58));\ng.addEdge(new jsgraphs.Edge(6, 4, 0.93));\n\nvar prim = new jsgraphs.LazyPrimMST(g); \nvar mst = prim.mst;\nfor(var i=0; i < mst.length; ++i) {\n    var e = mst[i];\n    var v = e.either();\n    var w = e.other(v);\n    console.log('(' + v + ', ' + w + '): ' + e.weight);\n}\n```\n\n### Use Eager Prim algorithm to find the minimum spanning tree of a weighted graph\n\nThe sample code below show how to obtain the minimum spanning tree from a weighted graph using Eager Prim algorithm (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-eager-prim.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.WeightedGraph(8);\n\ng.addEdge(new jsgraphs.Edge(0, 7, 0.16));\ng.addEdge(new jsgraphs.Edge(2, 3, 0.17));\ng.addEdge(new jsgraphs.Edge(1, 7, 0.19));\ng.addEdge(new jsgraphs.Edge(0, 2, 0.26));\ng.addEdge(new jsgraphs.Edge(5, 7, 0.28));\ng.addEdge(new jsgraphs.Edge(1, 3, 0.29));\ng.addEdge(new jsgraphs.Edge(1, 5, 0.32));\ng.addEdge(new jsgraphs.Edge(2, 7, 0.34));\ng.addEdge(new jsgraphs.Edge(4, 5, 0.35));\ng.addEdge(new jsgraphs.Edge(1, 2, 0.36));\ng.addEdge(new jsgraphs.Edge(4, 7, 0.37));\ng.addEdge(new jsgraphs.Edge(0, 4, 0.38));\ng.addEdge(new jsgraphs.Edge(6, 2, 0.4));\ng.addEdge(new jsgraphs.Edge(3, 6, 0.52));\ng.addEdge(new jsgraphs.Edge(6, 0, 0.58));\ng.addEdge(new jsgraphs.Edge(6, 4, 0.93));\n\nvar prim = new jsgraphs.EagerPrimMST(g); \nvar mst = prim.mst;\nfor(var i=0; i < mst.length; ++i) {\n    var e = mst[i];\n    var v = e.either();\n    var w = e.other(v);\n    console.log('(' + v + ', ' + w + '): ' + e.weight);\n}\n```\n\n### Find the shortest paths using Dijkstra\n\nThe sample code below show how to obtain the shortest paths from a starting point 0 on a weighted directed graph using Dijkstra (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-dijkstra.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.WeightedDiGraph(8);\ng.addEdge(new jsgraphs.Edge(0, 1, 5.0));\ng.addEdge(new jsgraphs.Edge(0, 4, 9.0));\ng.addEdge(new jsgraphs.Edge(0, 7, 8.0));\ng.addEdge(new jsgraphs.Edge(1, 2, 12.0));\ng.addEdge(new jsgraphs.Edge(1, 3, 15.0));\ng.addEdge(new jsgraphs.Edge(1, 7, 4.0));\ng.addEdge(new jsgraphs.Edge(2, 3, 3.0));\ng.addEdge(new jsgraphs.Edge(2, 6, 11.0));\ng.addEdge(new jsgraphs.Edge(3, 6, 9.0));\ng.addEdge(new jsgraphs.Edge(4, 5, 5.0));\ng.addEdge(new jsgraphs.Edge(4, 6, 20.0));\ng.addEdge(new jsgraphs.Edge(4, 7, 5.0));\ng.addEdge(new jsgraphs.Edge(5, 2, 1.0));\ng.addEdge(new jsgraphs.Edge(5, 6, 13.0));\ng.addEdge(new jsgraphs.Edge(7, 5, 6.0));\ng.addEdge(new jsgraphs.Edge(7, 2, 7.0));  \n\n\nvar dijkstra = new jsgraphs.Dijkstra(g, 0);\n\nfor(var v = 1; v < g.V; ++v){\n    if(dijkstra.hasPathTo(v)){\n        var path = dijkstra.pathTo(v);\n        console.log('=====path from 0 to ' + v + ' start==========');\n        for(var i = 0; i < path.length; ++i) {\n            var e = path[i];\n            console.log(e.from() + ' => ' + e.to() + ': ' + e.weight);\n        }\n        console.log('=====path from 0 to ' + v + ' end==========');\n        console.log('=====distance: '  + dijkstra.distanceTo(v) + '=========');\n    }\n}\n```\n\n### Find the shortest paths using Bellman-Ford\n\nThe sample code below show how to obtain the shortest paths from a starting point 0 on a weighted directed graph using Bellman-Ford:\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.WeightedDiGraph(8);\ng.addEdge(new jsgraphs.Edge(0, 1, 5.0));\ng.addEdge(new jsgraphs.Edge(0, 4, 9.0));\ng.addEdge(new jsgraphs.Edge(0, 7, 8.0));\ng.addEdge(new jsgraphs.Edge(1, 2, 12.0));\ng.addEdge(new jsgraphs.Edge(1, 3, 15.0));\ng.addEdge(new jsgraphs.Edge(1, 7, 4.0));\ng.addEdge(new jsgraphs.Edge(2, 3, 3.0));\ng.addEdge(new jsgraphs.Edge(2, 6, 11.0));\ng.addEdge(new jsgraphs.Edge(3, 6, 9.0));\ng.addEdge(new jsgraphs.Edge(4, 5, 5.0));\ng.addEdge(new jsgraphs.Edge(4, 6, 20.0));\ng.addEdge(new jsgraphs.Edge(4, 7, 5.0));\ng.addEdge(new jsgraphs.Edge(5, 2, 1.0));\ng.addEdge(new jsgraphs.Edge(5, 6, 13.0));\ng.addEdge(new jsgraphs.Edge(7, 5, 6.0));\ng.addEdge(new jsgraphs.Edge(7, 2, 7.0));  \n\n\nvar bf = new jsgraphs.BellmanFord(g, 0);\n\nfor(var v = 1; v < g.V; ++v){\n    if(bf.hasPathTo(v)){\n        var path = bf.pathTo(v);\n        console.log('=====path from 0 to ' + v + ' start==========');\n        for(var i = 0; i < path.length; ++i) {\n            var e = path[i];\n            console.log(e.from() + ' => ' + e.to() + ': ' + e.weight);\n        }\n        console.log('=====path from 0 to ' + v + ' end==========');\n        console.log('=====distance: '  + bf.distanceTo(v) + '=========');\n    }\n}\n```\n\n### Find the shortest paths using Topological Sort Shortest Paths\n\nThe sample code below show how to obtain the shortest paths from a starting point 0 on a weighted directed acylic graph using Topological Sort:\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.WeightedDiGraph(8);\ng.addEdge(new jsgraphs.Edge(0, 1, 5.0));\ng.addEdge(new jsgraphs.Edge(0, 4, 9.0));\ng.addEdge(new jsgraphs.Edge(0, 7, 8.0));\ng.addEdge(new jsgraphs.Edge(1, 2, 12.0));\ng.addEdge(new jsgraphs.Edge(1, 3, 15.0));\ng.addEdge(new jsgraphs.Edge(1, 7, 4.0));\ng.addEdge(new jsgraphs.Edge(2, 3, 3.0));\ng.addEdge(new jsgraphs.Edge(2, 6, 11.0));\ng.addEdge(new jsgraphs.Edge(3, 6, 9.0));\ng.addEdge(new jsgraphs.Edge(4, 5, 5.0));\ng.addEdge(new jsgraphs.Edge(4, 6, 20.0));\ng.addEdge(new jsgraphs.Edge(4, 7, 5.0));\ng.addEdge(new jsgraphs.Edge(5, 2, 1.0));\ng.addEdge(new jsgraphs.Edge(5, 6, 13.0));\ng.addEdge(new jsgraphs.Edge(7, 5, 6.0));\ng.addEdge(new jsgraphs.Edge(7, 2, 7.0));  \n\n\nvar bf = new jsgraphs.TopologicalSortShortestPaths(g, 0);\n\nfor(var v = 1; v < g.V; ++v){\n    if(bf.hasPathTo(v)){\n        var path = bf.pathTo(v);\n        console.log('=====path from 0 to ' + v + ' start==========');\n        for(var i = 0; i < path.length; ++i) {\n            var e = path[i];\n            console.log(e.from() + ' => ' + e.to() + ': ' + e.weight);\n        }\n        console.log('=====path from 0 to ' + v + ' end==========');\n        console.log('=====distance: '  + bf.distanceTo(v) + '=========');\n    }\n}\n```\n\n### Find the MaxFlow-MinCut using Ford-Fulkerson algorithm\n\nThe sample code below show how to obtain the MaxFlow-MinCut of a directed weighted graph using ford-fulkerson algorithm (Link: [HTML DEMO](https://rawgit.com/chen0040/js-graph-algorithms/master/examples/example-ford-fulkerson.html)):\n\n```javascript\nvar jsgraphs = require('js-graph-algorithms');\nvar g = new jsgraphs.FlowNetwork(8);\ng.addEdge(new jsgraphs.FlowEdge(0, 1, 10));\ng.addEdge(new jsgraphs.FlowEdge(0, 2, 5));\ng.addEdge(new jsgraphs.FlowEdge(0, 3, 15));\ng.addEdge(new jsgraphs.FlowEdge(1, 4, 9));\ng.addEdge(new jsgraphs.FlowEdge(1, 5, 15));\ng.addEdge(new jsgraphs.FlowEdge(1, 2, 4));\ng.addEdge(new jsgraphs.FlowEdge(2, 5, 8));\ng.addEdge(new jsgraphs.FlowEdge(2, 3, 4));\ng.addEdge(new jsgraphs.FlowEdge(3, 6, 16));\ng.addEdge(new jsgraphs.FlowEdge(4, 5, 15));\ng.addEdge(new jsgraphs.FlowEdge(4, 7, 10));\ng.addEdge(new jsgraphs.FlowEdge(5, 7, 10));\ng.addEdge(new jsgraphs.FlowEdge(5, 6, 15));\ng.addEdge(new jsgraphs.FlowEdge(6, 2, 6));\ng.addEdge(new jsgraphs.FlowEdge(6, 7, 10)); \n\ng.node(2).label = 'Hello';\ng.edge(0, 1).label = 'World';\n\nvar source = 0;\nvar target = 7;\nvar ff = new jsgraphs.FordFulkerson(g, source, target);\nconsole.log('max-flow: ' + ff.value);\n\nvar minCut = ff.minCut(g);\n\nfor(var i = 0; i < minCut.length; ++i) {\n    var e = minCut[i];\n    console.log('min-cut: (' + e.from() + \", \" + e.to() + ')');\n}\n```","maintainers":[{"name":"chen0040","email":"xs0040@gmail.com"}],"time":{"modified":"2022-06-19T05:35:36.239Z","created":"2017-05-27T12:37:37.308Z","1.0.5":"2017-05-27T12:37:37.308Z","1.0.6":"2017-05-27T12:46:44.968Z","1.0.7":"2017-05-27T12:59:28.754Z","1.0.8":"2017-05-28T08:25:13.809Z","1.0.9":"2017-05-31T01:45:02.933Z","1.0.10":"2017-06-09T15:35:04.387Z","1.0.11":"2017-06-09T15:41:20.974Z","1.0.13":"2017-08-28T07:36:26.465Z","1.0.14":"2017-08-29T00:32:54.392Z","1.0.15":"2017-09-09T05:15:43.137Z","1.0.16":"2017-09-09T05:17:09.296Z","1.0.17":"2017-11-28T22:52:42.908Z","1.0.18":"2017-11-28T22:59:14.048Z"},"homepage":"https://github.com/chen0040/js-graph-algorithms#readme","keywords":["graph","weighted graph","digraph","directed graph","connected components","strongly connected components","min cut","max flow","dijkstra","bellman-ford","minimum spanning tree","depth first search","breadth first search","directed cycles","topological sort","ford-fulkerson","prim","kruskal"],"repository":{"type":"git","url":"git+https://github.com/chen0040/js-graph-algorithms.git"},"contributors":[{"name":"Xianshun Chen","email":"xs0040@gmail.com"}],"author":{"name":"Xianshun Chen"},"bugs":{"url":"https://github.com/chen0040/js-graph-algorithms/issues"},"license":"MIT","readmeFilename":"README.md","users":{"meeh":true,"shiying":true}}