{"id":22940771,"url":"https://github.com/inductivecomputerscience/pbgraphs-java","last_synced_at":"2025-04-01T20:36:38.346Z","repository":{"id":144579172,"uuid":"203333661","full_name":"InductiveComputerScience/pbgraphs-java","owner":"InductiveComputerScience","description":"pbGraphs is a graph library for Java","archived":false,"fork":false,"pushed_at":"2019-08-20T09:44:34.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T13:27:47.031Z","etag":null,"topics":["directed-graphs","graph-algorithms","graph-datastructures","graph-theory","java","java-library","undirected-graphs"],"latest_commit_sha":null,"homepage":"https://repo.progsbase.com/repoviewer/no.inductive.libraries/DirectedGraphs/0.1.14/","language":"Java","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-20T08:30:10.000Z","updated_at":"2019-08-20T11:32:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"08d7f808-5554-47bf-a0f4-aeddfef4aab5","html_url":"https://github.com/InductiveComputerScience/pbgraphs-java","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/InductiveComputerScience%2Fpbgraphs-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InductiveComputerScience%2Fpbgraphs-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InductiveComputerScience%2Fpbgraphs-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InductiveComputerScience%2Fpbgraphs-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InductiveComputerScience","download_url":"https://codeload.github.com/InductiveComputerScience/pbgraphs-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709932,"owners_count":20821298,"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":["directed-graphs","graph-algorithms","graph-datastructures","graph-theory","java","java-library","undirected-graphs"],"created_at":"2024-12-14T13:30:58.337Z","updated_at":"2025-04-01T20:36:38.326Z","avatar_url":"https://github.com/InductiveComputerScience.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pbGraphs-java\npbGraphs is a graph library for Java.\n\n## Requirements\nJava 1.5+. By changing the use static imports to ordinary imports, it will work with Java 1.3+.\n\n## Dependencies\nThere are no dependencies.\n\n## Getting Started\nIt is easy to get started. Here are two alternatives:\n\n - Include the sources in your project.\n - Create a jar file and use it in your project.\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```\nboolean DirectedGraphsEqual(DirectedGraph a, DirectedGraph b)\n```\n\nReturn true of the two directed graphs are equal.\n\n### Graph Components\n```\nboolean GetGraphComponents(DirectedGraph g, NumberArrayReference 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```\nboolean TopologicalSort(DirectedGraph g, NumberArrayReference list)\n```\n\nPlaces the topological sort of the graph in `list`.\n\n### Searches\n\n* Depth-first Search\n```\nvoid DepthFirstSearch(DirectedGraph g, double start, NumberArrayReference list)\n```\n\nPlaces the depth-first sort ordering of the graph in `list`.\n\n* Breadth-first Search\n```\nvoid BreadthFirstSearch(DirectedGraph g, double start, NumberArrayReference list)\n```\n\nPlaces the breadth-first sort ordering of the graph in `list`.\n\n### Shortest Paths\n\n* Dijkstra's Algorithm\n```\nvoid DijkstrasAlgorithm(DirectedGraph g, double src, NumberArrayReference dist, BooleanArrayReference distSet, NumberArrayReference 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```\nboolean BellmanFordAlgorithm(DirectedGraph g, double src, NumberArrayReference dist, BooleanArrayReference distSet, NumberArrayReference 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```\nboolean FloydWarshallAlgorithm(DirectedGraph g, Distances 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```\nboolean PrimsAlgorithm(DirectedGraph g, Forest 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```\nboolean KruskalsAlgorithm(DirectedGraph g, Forest 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```\nboolean DirectedGraphContainsCycleDFS(DirectedGraph g)\n```\n\nReturn true if there are cycles in the graph `g`.\n\n* Cycle Counting\n```\ndouble DirectedGraphCountCyclesDFS(DirectedGraph g)\n```\n\nReturn the number of cycles in the graph `g`.\n\n* Get All Cyles\n```\nCycle [] DirectedGraphGetCyclesDFS(DirectedGraph 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-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finductivecomputerscience%2Fpbgraphs-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finductivecomputerscience%2Fpbgraphs-java/lists"}