TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
Wrapper class for storing a graph. More...
Public Member Functions | |
Graph (const int V) | |
Constructs a graph. | |
void | add_edge (int src, int dst, int weight) |
Adds an edge to the graph. | |
Public Attributes | |
int | vertexNum = 0 |
std::vector< std::vector< int > > | edges {} |
Wrapper class for storing a graph.
Definition at line 35 of file dijkstra_greedy.cpp.
|
inlineexplicit |
Constructs a graph.
V | number of vertices of the graph |
Definition at line 44 of file dijkstra_greedy.cpp.
|
inline |
Adds an edge to the graph.
src | the graph the edge should be added to |
dst | the position where the edge should be added to |
weight | the weight of the edge that should be added |
Definition at line 68 of file dijkstra_greedy.cpp.
std::vector<std::vector<int> > greedy_algorithms::dijkstra::Graph::edges {} |
Definition at line 38 of file dijkstra_greedy.cpp.
int greedy_algorithms::dijkstra::Graph::vertexNum = 0 |
Definition at line 37 of file dijkstra_greedy.cpp.