kClistCore.c
unsigned long long *onepass(sparse *g,unsigned kmax){
	unsigned e,i;
	unsigned *merge,*size,*ck;
	unsigned long long *nck;

	merge=malloc((kmax-2)*g->core*sizeof(unsigned));
	size=malloc((kmax-2)*sizeof(unsigned));
	ck=malloc(kmax*sizeof(unsigned));
	nck=calloc(g->n2,sizeof(unsigned long long));

	for(e=0; e<g->e2; e++){
		ck[0]=g->edges[e].s;
		ck[1]=g->edges[e].t;
		size[0]=merging(&(g->adj[g->cd[ck[0]]]),g->d[ck[0]],&(g->adj[g->cd[ck[1]]]),g->d[ck[1]],merge);
		recursion(kmax,3,merge,size,g,ck,nck);
	}

	free(merge);
	free(size);
	free(ck);

	return nck;
}
//one pass over all k-cliques
one pass over all k-cliques
one pass over all k - cliques
unsigned long long *onepass(sparse *g,unsigned kmax){
	unsigned e,i;
	unsigned *merge,*size,*ck;
	unsigned long long *nck;
	merge=malloc((kmax-2)*g->core*sizeof(unsigned));
	size=malloc((kmax-2)*sizeof(unsigned));
	ck=malloc(kmax*sizeof(unsigned));
	nck=calloc(g->n2,sizeof(unsigned long long));
	for(e=0; e<g->e2; e++){
		ck[0]=g->edges[e].s;
		ck[1]=g->edges[e].t;
		size[0]=merging(&(g->adj[g->cd[ck[0]]]),g->d[ck[0]],&(g->adj[g->cd[ck[1]]]),g->d[ck[1]],merge);
		recursion(kmax,3,merge,size,g,ck,nck);
	}
	free(merge);
	free(size);
	free(ck);
	return nck;
}
unsigned long long * onepass ( sparse * g , unsigned kmax ) { unsigned e , i ; unsigned * merge , * size , * ck ; unsigned long long * nck ; merge = malloc ( ( kmax - 2 ) * g -> core * sizeof ( unsigned ) ) ; size = malloc ( ( kmax - 2 ) * sizeof ( unsigned ) ) ; ck = malloc ( kmax * sizeof ( unsigned ) ) ; nck = calloc ( g -> n2 , sizeof ( unsigned long long ) ) ; for ( e = 0 ; e < g -> e2 ; e ++ ) { ck [ 0 ] = g -> edges [ e ] . s ; ck [ 1 ] = g -> edges [ e ] . t ; size [ 0 ] = merging ( & ( g -> adj [ g -> cd [ ck [ 0 ] ] ] ) , g -> d [ ck [ 0 ] ] , & ( g -> adj [ g -> cd [ ck [ 1 ] ] ] ) , g -> d [ ck [ 1 ] ] , merge ) ; recursion ( kmax , 3 , merge , size , g , ck , nck ) ; } free ( merge ) ; free ( size ) ; free ( ck ) ; return nck ; }
one pass over all k-cliques
one pass over all k - cliques