-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraph.hpp
More file actions
45 lines (28 loc) · 675 Bytes
/
Graph.hpp
File metadata and controls
45 lines (28 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// Created by cpepi on 29-Oct-21.
//
#ifndef CSCE_629_GRAPH_HPP
#define CSCE_629_GRAPH_HPP
#include <set>
#include <queue>
#include "VertexHeap.hpp"
#include "Random.hpp"
#include "EdgeHeap.hpp"
class Graph {
private:
int n_edges;
Random *random;
int max_neighbours;
std::set<int> connected[N];
std::queue<Vertex> adjacency_list[N];
public:
Graph(int min_neighbours_to_connect, int max_neighbours_to_connect);
void print();
int get_number_of_edges();
void add_edge(int v, int w);
std::queue<Vertex> *get_adjacency_list();
private:
void connect_graph();
void generate_graph();
};
#endif //CSCE_629_GRAPH_HPP