forked from manoelstilpen/clique_problem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraph.hpp
More file actions
42 lines (30 loc) · 761 Bytes
/
Graph.hpp
File metadata and controls
42 lines (30 loc) · 761 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
#ifndef GRAPH_HPP
#define GRAPH_HPP
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
class Graph{
private:
int nVertex;
int nEdge;
vector<int> nAdjacencies; // number of adjacencies per vertex
vector< vector<char> > adjacency; // adjacency matrix
vector< vector<int> > neighbors;
public:
Graph();
Graph(string);
vector<char> operator[](const int& i){
return (adjacency[i]);
}
void loadGraph(string filePath);
void generateComplement();
void revertComplement();
int getNVertex();
int getNEdge();
int getNAdjacencyOf(int);
vector<int>::iterator getNeighborsOf(int);
vector<int>::iterator getNeighborsReverseOf(int);
};
#endif