Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <list>
- #include<string>
- #include <iostream>
- using namespace std;
- struct vertex
- {
- int v;
- string label;
- };
- class Graph
- {
- private:
- int V;
- vertex *places;
- list <int> *adj;
- float **adj2;
- void DFSUtil(int v, bool visited[]);
- public:
- Graph(int);
- void addEdge(int u, int v);
- void addEdge2(int u, int v, float total);
- void printGraph();
- //void printGraph2();
- void DFS(int v);
- void BFS(int s);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement