Skip to content

onyazuka/GraphsLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Small object-oriented library for graphs and some useful algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published