{"id":19959231,"url":"https://github.com/username0x0a/swiftydijkstra","last_synced_at":"2026-02-28T20:02:05.344Z","repository":{"id":63921184,"uuid":"81746660","full_name":"username0x0a/SwiftyDijkstra","owner":"username0x0a","description":"Simple objective implementation of Dijkstra algorithm (shortest path search) written in Swift","archived":false,"fork":false,"pushed_at":"2020-04-25T22:34:29.000Z","size":41,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-20T10:39:59.291Z","etag":null,"topics":["dijkstra","dijkstra-algorithm","dijkstra-swift","shortest-path-problem","shortest-paths","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/username0x0a.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":"2017-02-12T18:20:36.000Z","updated_at":"2024-06-14T12:17:16.000Z","dependencies_parsed_at":"2023-01-14T14:15:19.807Z","dependency_job_id":null,"html_url":"https://github.com/username0x0a/SwiftyDijkstra","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/username0x0a%2FSwiftyDijkstra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/username0x0a%2FSwiftyDijkstra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/username0x0a%2FSwiftyDijkstra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/username0x0a%2FSwiftyDijkstra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/username0x0a","download_url":"https://codeload.github.com/username0x0a/SwiftyDijkstra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252259305,"owners_count":21719659,"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":["dijkstra","dijkstra-algorithm","dijkstra-swift","shortest-path-problem","shortest-paths","swift"],"created_at":"2024-11-13T01:46:59.885Z","updated_at":"2026-02-28T20:02:05.294Z","avatar_url":"https://github.com/username0x0a.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftyDijkstra\n\nExample _Dijkstra_ algorithm (shortest path problem) implementation written in Swift.\n\n## Usage\n\n![Example usage](https://raw.githubusercontent.com/username0x0a/SwiftyDijkstra/master/example.png)\n\n```swift\nimport Foundation\nimport SwiftyDijkstra\n\n// Define the nodes\n\nlet Brno = Node(\"Brno\")\nlet Praha = Node(\"Praha\")\nlet Ostrava = Node(\"Ostrava\")\nlet Pardubice = Node(\"Pardubice\")\nlet Kolin = Node(\"Kolin\")\nlet Plzen = Node(\"Plzen\")\n\n// Define the graph edges\n\nvar edges = [\n\tEdge(from: Ostrava, to: Brno, cost: 180),\n\tEdge(from: Praha, to: Ostrava, cost: 420),\n\tEdge(from: Pardubice, to: Brno, cost: 110),\n\tEdge(from: Pardubice, to: Praha, cost: 90),\n\tEdge(from: Pardubice, to: Plzen, cost: 140),\n\tEdge(from: Pardubice, to: Ostrava, cost: 290),\n\tEdge(from: Plzen, to: Praha, cost: 70),\n]\n\n// Initialize the graph itself\n\nvar G = Graph(edges: edges)\n\n// Look for shortest paths and print'em\n\nprint(G.shortestPath(from: Praha, to: Ostrava))\n// outputs [Praha, Pardubice, Ostrava]\nprint(G.shortestPath(from: Ostrava, to: Plzen))\n// outputs [Ostrava, Pardubice, Plzen]\nprint(G.shortestPath(from: Ostrava, to: Ostrava))\n// outputs [Ostrava]\nprint(G.shortestPath(from: Brno, to: Kolin))\n// outputs []\n\n```\n\n## License\n\nDijkstra example is released under the MIT license. See the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusername0x0a%2Fswiftydijkstra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusername0x0a%2Fswiftydijkstra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusername0x0a%2Fswiftydijkstra/lists"}