{"id":25469856,"url":"https://github.com/thinkphp/node-dijkstra","last_synced_at":"2025-11-04T17:30:35.122Z","repository":{"id":20609182,"uuid":"23890300","full_name":"thinkphp/node-dijkstra","owner":"thinkphp","description":"Algorithm's Dijkstra Shortest Finder for NodeJS","archived":false,"fork":false,"pushed_at":"2014-09-13T08:06:51.000Z","size":152,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T17:43:53.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.org/package/dijkstra-edsger","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinkphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-10T20:08:49.000Z","updated_at":"2017-10-24T23:04:26.000Z","dependencies_parsed_at":"2022-08-31T04:42:11.367Z","dependency_job_id":null,"html_url":"https://github.com/thinkphp/node-dijkstra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2Fnode-dijkstra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2Fnode-dijkstra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2Fnode-dijkstra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2Fnode-dijkstra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkphp","download_url":"https://codeload.github.com/thinkphp/node-dijkstra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239436871,"owners_count":19638382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-18T08:31:03.516Z","updated_at":"2025-11-04T17:30:35.073Z","avatar_url":"https://github.com/thinkphp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-dijkstra\n\nDijkstra's algorithm, conceived by computer scientist Edsger Dijkstra, is a graph search algorithm that solves in single-source\nshortest path problem for a graph with non-negative edge path costs, producing a shortest path tree. \n\n![Screenshot](http://farm6.staticflickr.com/5572/15142640541_6ea1eb3d48.jpg)\n\n## Installation\n\n```\n\n$ npm install node-dijkstra\n\n```\n\n\n```\n$ mkdir myApp\n$ cd myApp\n$ npm install dijkstra-edsger\n$ touch app.js \n```\n\n## Sample Code\n\n```\n\nvar Dijkstra = require('dijkstra-edsger');\n\nvar road = [[1, 2, 1],\n            [1, 3, 9],\n            [1, 5, 3],\n            [2, 4, 3],\n            [2, 3, 7],\n            [4, 3, 2],\n            [4, 1, 1],\n            [5, 2, 4],\n            [5, 4, 2]]\n\nvar start = 1, \n    end   = 3;\n\nvar dij = new Dijkstra(start, end, road );\n\nconsole.log(\"Cost = \" + dij.getCost() )\n\nconsole.log(\"Shortest path from the node \"+ start + \" to \"+ end + \" -\u003e \"+ dij.getShortestPath() )\n\n```\n\n## References\n\n  http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkphp%2Fnode-dijkstra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkphp%2Fnode-dijkstra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkphp%2Fnode-dijkstra/lists"}