72 for(
i = 0;
i <
nV;
i++ )
81 weight = weights[
V[
i]];
84 satdeg =
gsd[
i].satdeg;
122 for(
i = 0 ;
i <
nV;
i++ )
126 if( weights[
V[
i]] > maxweight)
129 maxweight = weights[
V[
i]];
154 head.next =
pgsd->lcitv;
161 if(
pnc->itv.inf <
pciv->itv.inf )
171 else if(
pnc->itv.inf <=
pciv->itv.sup )
173 if(
pnc->itv.sup >
pciv->itv.sup )
201 if(
apciv->itv.sup < (
pciv->itv.inf - 1) )
224 pgsd->lcitv = head.next;
293 range = weights[node];
302 debugMessage(
"---------------coloring-----------------\n");
303 debugMessage(
"1. node choosen: vindex=%d, vertex=%d, satdeg=%d, range=%d)\n",
331 debugMessage(
" nodeVindex=%d, node=%d, weight=%d, satdegold=%d -> ",
363 for(
i = 0 ;
i <
nV-1;
i++ )
374 range = weights[node];
378 debugMessage(
"%d. node choosen: vindex=%d, vertex=%d, satdeg=%d, range=%d, growclique=%u, weight=%d)\n",
395 debugMessage(
"current node not adjacend to current clique (weight:%d) -> starting new clique\n",
437 debugMessage(
"node satdeg: %d, clique weight: %d -> stop growing clique\n",
466 if( lcitv->itv.inf != 1 )
469 dif = lcitv->itv.inf - 1 ;
493 if( lcitv->next !=
NULL )
497 min = lcitv->next->itv.inf - lcitv->itv.sup - 1;
523 debugMessage(
" nodeVindex=%d, node=%d, weight=%d, satdegold=%d -> ",
584 debugMessage(
"------------coloringend-----------------\n");
assert(minobj< SCIPgetCutoffbound(scip))
memory allocation routines
#define BMSallocChunkMemory(mem, ptr)
struct BMS_ChkMem BMS_CHKMEM
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMScopyMemoryArray(ptr, source, num)
#define BMSfreeChunkMemory(mem, ptr)
#define BMSclearMemoryArray(ptr, num)
#define BMSclearChunkMemory(mem)
#define TCLIQUE_GETWEIGHTS(x)
#define TCLIQUE_GETNNODES(x)
#define TCLIQUE_SELECTADJNODES(x)
struct TCLIQUE_Graph TCLIQUE_GRAPH
static int getMaxWeightIndex(TCLIQUE_GETNNODES((*getnnodes)), TCLIQUE_GETWEIGHTS((*getweights)), TCLIQUE_GRAPH *tcliquegraph, int *V, int nV)
static void updateNeighbor(BMS_CHKMEM *mem, NBC *pgsd, LIST_ITV *pnc)
static int getMaxSatdegIndex(int *V, int nV, NBC *gsd, TCLIQUE_Bool *iscolored, const TCLIQUE_WEIGHT *weights)
TCLIQUE_WEIGHT tcliqueColoring(TCLIQUE_GETNNODES((*getnnodes)), TCLIQUE_GETWEIGHTS((*getweights)), TCLIQUE_SELECTADJNODES((*selectadjnodes)), TCLIQUE_GRAPH *tcliquegraph, BMS_CHKMEM *mem, int *buffer, int *V, int nV, NBC *gsd, TCLIQUE_Bool *iscolored, TCLIQUE_WEIGHT *apbound, int *clique, int *nclique, TCLIQUE_WEIGHT *weightclique)
coloring part of algorithm for maximum cliques
struct _LIST_ITV LIST_ITV