https://github.com/onyazuka/graphslib
Small object-oriented library for graphs and some useful algorithms.
https://github.com/onyazuka/graphslib
cpp graph graphs
Last synced: 17 days ago
JSON representation
Small object-oriented library for graphs and some useful algorithms.
- Host: GitHub
- URL: https://github.com/onyazuka/graphslib
- Owner: onyazuka
- Created: 2018-12-13T13:30:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-25T12:23:44.000Z (over 6 years ago)
- Last Synced: 2025-10-30T04:26:14.796Z (8 months ago)
- Topics: cpp, graph, graphs
- Language: C++
- Size: 40 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GraphsLib
Small object-oriented library for graphs and some useful algorithms.
Supported algorithms:
- BFS
- DFS
- Topological Sort
- Articulation points
- Bridges
- Cycle detection
- Undirected graph components split
- Directed graph strongly connected components split
- Eulerian path
- Eulerian circuit
- Minimal spanning tree: Kruskal algorithm
- Minimal spanning tree: Prim algorithm
- Shortest path: shortest path in acyclic directed graphs
- Shortest path: Dijkstra
- Shortest path: Bellman-Ford
- Shortest pathes: Floyd-Warshall
- Maximum flow problem: Ford-Fulkerson
Complexities
θ(V+E) - BFS, DFS, Topological Sort, Articulation points, Bridges, Cycle detection, Components, Eulerian,
directed acyclic graph shortest path
θ(ElgV) - Kruskal, Prim, Dijkstra
θ(EV) - Bellman-Ford
θ(V^3) - Floyd-Warshall
θ(E^2 V) - Ford-Fulkerson
Features
- Graph inner structure: adjacency list or adjacency matrix
- Undirected and directed graphs
- Copying of graphs, vertices, edges
- Adding of edges
- Adding of vertices
- Getting the edge by its vertices
- Vertex degrees
- Graph transposing
- Attributes: adding, deleting, getting, setting