Advertisement
Guest User

GraphLEClass

a guest
Jun 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #pragma once
  2. #include <list>
  3. #include<string>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. struct vertex
  8. {
  9. int v;
  10. string label;
  11. };
  12.  
  13. class Graph
  14. {
  15. private:
  16. int V;
  17. vertex *places;
  18. list <int> *adj;
  19. float **adj2;
  20. void DFSUtil(int v, bool visited[]);
  21.  
  22. public:
  23. Graph(int);
  24. void addEdge(int u, int v);
  25. void addEdge2(int u, int v, float total);
  26. void printGraph();
  27. //void printGraph2();
  28. void DFS(int v);
  29. void BFS(int s);
  30. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement