graph.hpp

Notation: (numbers of vertex), (numbers of edges)

Tree

  • DfsTour
  • EulerTour
  • LCA
  • Prim: Minimum Spanning Tree
  • LiuZhu: Minimum tree diagram
  • TopSort
  • EulerPath

link/cut Tree, dsu on tree need case-by-case analysis.

Shortest Path

  • Floyd
  • BellmanFord
  • Dijkstra
  • spfa

Connectivity

  • Scc: Strongly Connected Components
  • twoSAT
  • cutVertex
  • CutEdge

Flow

  • Dinic: S-T max-Flow
  • HLPP: S-T max-Flow
  • Stoer-Wagner: Global minimum cut of undirected graph( implement)
  • Flow: minimum cost maximum flow

Mixed

  • circle3count: count in undirected graph