-
Notifications
You must be signed in to change notification settings - Fork 3
/
Matrix.h
32 lines (26 loc) · 789 Bytes
/
Matrix.h
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
#ifndef MATRIX_H
#define MATRIX_H
#include <iostream> //std::cout/cin, srand48, drand48
#include <vector> //std::vector
#include "Link.h"
#include "Clique.h"
class Matrix
{
public:
Matrix(std::vector <Link> links);
std::vector <Clique> generateScheduling();
/* Display Functions */
void displayCM();
private:
void setCompatible(int x, int y);
void generateAllCliques();
void generateCompatibilities();
void generateSubCliques(Clique largeClique);
bool isUnique(Clique potentialClique);
bool isCompatible(int x, int y);
bool isCompatibleWithExisting(int x, Clique existing);
bool** CM; //compat matrix
std::vector <Clique> CL; //all of the cliques
std::vector <Link> LS; //all the links
};
#endif