An open API service indexing awesome lists of open source software.

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.

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