Algolib
Data structures
Graphs
Data structures
Algorithms
Bellman Ford
BFS
BFS
Dijkstra
Edmonds-Karp
Floyd-Warshall
Kosaraju
Kruskal
Min-Cut
Prim
Tarjan
To Bipartite
Topological sort
Geometry
Mathematics
Optimization
Sorting
Strings
Trees
Simplex
Two-SAT
JSON
Constants
Shortcuts
Utility
Algolib
Graphs
Algorithms
BFS
View page source
BFS
template
<
class
G
>
class
BFS
Public Functions
inline
BFS
(
const
G
&
graph
,
const
std
::
vector
<
int
>
startVertice
)
inline
BFS
(
const
G
&
graph
,
const
int
startVertex
)
inline
int
distTo
(
const
int
vertex
)
const
Private Members
std
::
vector
<
int
>
m_dists