biclique.h
1.5 KB
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
46
47
48
49
50
51
52
53
54
#ifndef DEF_HIPCOMP
#define DEF_HIPCOMP
#include <vector>
#include <tuple>
#include "boip.h"
#include "boipsolution.h"
class BicliqueChr : public Boip
{
public:
BicliqueChr(int coef1, int coef2, float lambdaMin, float lambdaMax, float U2, unsigned int ncores,
const std::vector < unsigned int > &verticesId,
const std::vector < float > &verticesW1,
const std::vector < float > &verticesW2,
const std::vector < std::vector < unsigned int > > &NvBs,
const std::vector < std::pair < unsigned int, unsigned int > > &E2);
BicliqueChr(const BicliqueChr& that);
~BicliqueChr();
void add_bj_ct(BoipChrSolution sol);
int solve(BoipChrSolution& s);
BicliqueChr& operator=(const BicliqueChr& that);
private:
std::vector < std::vector < int > > varVC_; // vector to store the decision variables for each vertex and color
std::vector < int > varColorUsed_; // vector to store the decision variable for each color
std::vector < unsigned int > verticesId_;
std::vector < float > verticesW1_;
std::vector < float > verticesW2_;
std::vector < std::pair < unsigned int, unsigned int > > E2_; // Edges of the graph G2
unsigned int k_; // Maximum number of color to use
std::vector < std::tuple < unsigned int, unsigned int, unsigned int, float, unsigned int > > vertices; //vector to store the vertices
std::vector < std::vector < unsigned int > > NvB; //vector to store the non-adjacent vertices
};
#endif