gap.c
/***** prepare memory space **************************************************/
/***** Feel free to modify this subroutine. **********************************/
prepare memory space
Feel free to modify this subroutine.
prepare memory space Feel free to modify this subroutine .
void prepare_memory(Vdata *vdata, GAPdata *gapdata)
{
  int j;
  vdata->bestsol = (int *)  malloc_e(gapdata->n * sizeof(int));
  for(j=0; j<gapdata->n; j++){vdata->bestsol[j] = 0;}
  vdata->cost = 0;
  vdata->penal = 0;
}
void prepare_memory ( Vdata * vdata , GAPdata * gapdata ) { int j ; vdata -> bestsol = ( int * ) malloc_e ( gapdata -> n * sizeof ( int ) ) ; for ( j = 0 ; j < gapdata -> n ; j ++ ) { vdata -> bestsol [ j ] = 0 ; } vdata -> cost = 0 ; vdata -> penal = 0 ; }
prepare memory space
Feel free to modify this subroutine.
prepare memory space Feel free to modify this subroutine .
/* the next line is just to avoid confusion */