{"id":22940778,"url":"https://github.com/inductivecomputerscience/pbgraphs-php","last_synced_at":"2025-10-09T06:39:11.773Z","repository":{"id":144579174,"uuid":"203374153","full_name":"InductiveComputerScience/pbgraphs-php","owner":"InductiveComputerScience","description":"pbGraphs-php is a Graph Library in PHP","archived":false,"fork":false,"pushed_at":"2019-08-20T12:52:00.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T03:41:48.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/InductiveComputerScience.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-20T12:43:22.000Z","updated_at":"2019-08-20T12:52:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"668d71c8-2c44-4748-a104-50ab97823cbd","html_url":"https://github.com/InductiveComputerScience/pbgraphs-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InductiveComputerScience/pbgraphs-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InductiveComputerScience%2Fpbgraphs-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InductiveComputerScience%2Fpbgraphs-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InductiveComputerScience%2Fpbgraphs-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InductiveComputerScience%2Fpbgraphs-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InductiveComputerScience","download_url":"https://codeload.github.com/InductiveComputerScience/pbgraphs-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InductiveComputerScience%2Fpbgraphs-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000839,"owners_count":26082951,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-12-14T13:31:02.352Z","updated_at":"2025-10-09T06:39:11.752Z","avatar_url":"https://github.com/InductiveComputerScience.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pbgraphs-php\npbGraphs-php is a Graph Library in PHP\n\n## Requirements\nPHP 5+.\n\n## Dependencies\nThere are no dependencies.\n\n## Getting Started\nIt is easy to get started. Simply include the sources in your project. Check out test.php in the source directory for an example of how to use it.\n\n## Avaialble in 12 different programming languages\npbGraphs-java has been implemented with [progsbase](https://www.progsbase.com), so the library is available for 12 different programming languages.\n\nTry [all functions online](https://repo.progsbase.com/repoviewer/no.inductive.libraries/DirectedGraphs/0.1.14/) and see the implementations in different languages.\n\n## Functions\n\n### Graph Equality\n```\nfunction DirectedGraphsEqual($a, $b)\n```\n\nReturns true of the two directed graphs are equal.\n\n### Graph Components\n```\nfunction GetGraphComponents($g, $componentMembership)\n```\n\nPlaces the list of strongly connected components in componentMembership. Returns false if graphs does not quality as undirected.\n\n### Topological Sort\n```\nfunction TopologicalSort($g, $list)\n```\n\nPlaces the topological sort of the graph in `list`.\n\n### Searches\n\n* Depth-first Search\n```\nfunction DepthFirstSearch($g, $start, $list)\n```\n\nPlaces the depth-first sort ordering of the graph in `list`.\n\n* Breadth-first Search\n```\nfunction BreadthFirstSearch($g, $start, $list)\n```\n\nPlaces the breadth-first sort ordering of the graph in `list`.\n\n### Shortest Paths\n\n* Dijkstra's Algorithm\n```\nfunction DijkstrasAlgorithm($g, $src, $dist, $distSet, $prev)\n```\n\nPerforms Dijkstra's algorithm on the graph `g` from `src`. Whether nodes are reachable is placed in `distSet`, the shortest distances in `dist`, and the previous node in the shortest paths in `prev`.\n\n* Bellman-Ford Algorithm\n```\nfunction BellmanFordAlgorithm($g, $src, $dist, $distSet, $prev)\n```\n\nPerforms the Bellman-Ford algorithm on the graph `g` from `src`. Whether nodes are reachable is placed in `distSet`, the shortest distances in `dist`, and the previous node in the shortest paths in `prev`.\n\n\n* Floyd-Warshall Algorithm\n```\nfunction FloydWarshallAlgorithm($g, $distances)\n```\n\nPerforms the Floyd-Warshall algorithm on the graph `g`. The shortest distances between each pair of nodes are placed in `distances`.\n\n### Minimum Spanning Trees\n\n* Prim's Algorithm\n```\nfunction PrimsAlgorithm($g, $forest)\n```\n\nPerforms the Prim's algorithm on the graph `g`. All minimum spanning trees of the graph are placed in `forest`. Returns false if graphs does not quality as undirected.\n\n\n* Kruskal's Algorithm\n```\nfunction KruskalsAlgorithm($g, $forest)\n```\n\nPerforms the Kruskal's algorithm on the graph `g`. All minimum spanning trees of the graph are placed in `forest`. Returns false if graphs does not quality as undirected.\n\n### Cycles\n\n* Cycle Detection\n```\nfunction DirectedGraphContainsCycleDFS($g)\n```\n\nReturn true if there are cycles in the graph `g`.\n\n* Cycle Counting\n```\nfunction DirectedGraphCountCyclesDFS($g)\n```\n\nReturn the number of cycles in the graph `g`.\n\n* Get All Cyles\n```\nfunction \u0026DirectedGraphGetCyclesDFS($g)\n```\n\nReturns the list of cycles in the graph `g`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finductivecomputerscience%2Fpbgraphs-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finductivecomputerscience%2Fpbgraphs-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finductivecomputerscience%2Fpbgraphs-php/lists"}