15 #ifndef MAD_CLIQUER_INCLUDED
16 #define MAD_CLIQUER_INCLUDED
40 int * clique_countPtr = (
int*) opts->
user_data;
64 int * clique_countPtr = (
int*) opts->
user_data;
97 const double * weights){
100 for(i = 0; i < gSource->
n; i++) {
102 for (j = 0; j < gSource->
n; j++) {
130 const int * vertWeight){
131 memcpy(g->
weights, vertWeight, g->
n *
sizeof(
int));
162 printf(
"size=%d, weight=%d: ",
174 vector<int> & clique) {
206 string gfilename =
"dimacs_g.";
207 string wfilename =
"dimacs_w.";
213 string cmd =
"C:\\cygwin\\home\\magala\\COIN\\coin-Decomp\\TempFix\\qualex-ms\\qualex-ms ";
215 string cmd =
"~/COIN/coin-Decomp/TempFix/qualex-ms/qualex-ms ";
217 cmd += gfilename +
" -w" + wfilename;
218 printf(
"\ncmd = %s", cmd.c_str());
229 string filename =
"dimacs_g.";
231 ofstream os(filename.c_str());
234 for(i = 0; i < g->
n; i++) {
235 for (j = 0; j <= i; j++) {
237 os <<
"e " << i+1 <<
" " << j+1 << endl;
245 string filename =
"dimacs_g.";
248 ifstream is(filename.c_str());
251 is.getline(dummy,1000);
252 is.getline(dummy,1000);
268 const double * weight){
269 string filename =
"dimacs_w.";
271 ofstream os(filename.c_str());
273 for(i = 0; i < n_verts; i++) {
274 os << weight[i] << endl;
#define SET_CONTAINS_FAST(s, a)
#define SET_CONTAINS(s, a)
void readDimacsSolution(vector< int > &ind)
void cliquePopulateVector(const int index, vector< int > &clique)
int clique_find_all(graph_t *g, int min_weight, int max_weight, int maximal, clique_options *opts)
void delEdge(graph_t *g, const int i, const int j)
int graph_edge_count(graph_t *g)
int clique_unweighted_find_all(graph_t *g, int min_size, int max_size, int maximal, clique_options *opts)
void cliqueUnweightedFindAll(graph_t *g, int minWeight, int maxWeight, int maximal)
static void set_free(set_t s)
void graph_print(graph_t *g)
void printGraphDimacs(graph_t *g)
int * getVertWeight(graph_t *g)
void cliquePrintAll(graph_t *g)
void printGraph(graph_t *g)
graph_t * graph_new(int n)
void addEdge(graph_t *g, const int i, const int j)
void cliqueFindOne(graph_t *g, int minWeight, int maxWeight, int maximal)
graph_t * graphNew(const int n_verts)
#define CoinAssertHint(expression, hint)
int(* user_function)(set_t, graph_t *, clique_options *)
set_t clique_find_single(graph_t *g, int min_weight, int max_weight, int maximal, clique_options *opts)
void graphFree(graph_t *g)
static int record_clique_func(set_t s, graph_t *g, clique_options *opts)
#define GRAPH_DEL_EDGE(g, i, j)
const double DecompEpsilon
static int set_size(set_t s)
static int graph_subgraph_weight(graph_t *g, set_t s)
int getNumVertices(graph_t *g)
MAD_Cliquer(const int n_verts)
static set_t set_duplicate(set_t s)
clique_options * clique_default_options
string UtilIntToStr(const int i)
void cliqueFindOneQualex(vector< int > &ind)
static int set_clique_func(set_t s, graph_t *g, clique_options *opts)
#define GRAPH_ADD_EDGE(g, i, j)
void copyGraphNonPos(graph_t *gDest, const graph_t *gSource, const double *weights)
void graph_free(graph_t *g)
#define CoinAssert(expression)
void cliquePrint(graph_t *g, set_t s)
void setVertWeight(graph_t *g, const int *vertWeight)
void cliqueFindAll(graph_t *g, int minWeight, int maxWeight, int maximal)
void printWeightDimacs(const int n_verts, const double *weight)