biclique.h 1.5 KB
#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