#ifndef GCG_HYPERCOLGRAPH_H_
#define GCG_HYPERCOLGRAPH_H_
#include "matrixgraph.h"
#include "hypergraph.h"
#include "class_partialdecomp.h"
#include "class_detprobdata.h"
namespace gcg
{
template <class T>
class HypercolGraph: public gcg::MatrixGraph<T>
{
private:
Hypergraph<T> graph;
protected:
class function {
int diff;
public:
function(int i):diff(i) {}
int operator()(int i) { return i-diff;}
};
public:
HypercolGraph(
SCIP* scip,
Weights w
);
virtual ~HypercolGraph();
SCIP_RETCODE writeToFile(
int fd,
SCIP_Bool edgeweights
);
virtual int getNNodes();
virtual int getNEdges();
virtual std::vector<int> getNeighbors(
int i
)
{
return this->graph.getNeighbors(i);
}
virtual std::vector<int> getHyperedgeNodes(
int i
);
virtual SCIP_RETCODE readPartition(
const char* filename
)
{
SCIP_CALL( this->graph.readPartition(filename) );
return SCIP_OKAY;
}
virtual SCIP_RETCODE createFromMatrix(
SCIP_CONS** conss,
SCIP_VAR** vars,
int nconss_,
int nvars_
);
virtual SCIP_RETCODE createFromPartialMatrix(
DETPROBDATA* detprobdata,
PARTIALDECOMP* partialdec
);
virtual SCIP_RETCODE createDecompFromPartition(
DEC_DECOMP** decomp
);
virtual SCIP_RETCODE createPartialdecFromPartition(
PARTIALDECOMP** firstpartialdec,
PARTIALDECOMP** secondpartialdec,
DETPROBDATA* detprobdata
);
virtual SCIP_RETCODE createPartialdecFromPartition(
PARTIALDECOMP* oldpartialdec,
PARTIALDECOMP** firstpartialdec,
PARTIALDECOMP** secondpartialdec,
DETPROBDATA* detprobdata
);
};
}
#endif