src/cluster.c
@@ -42,12 +42,13 @@ do{ n--; } while(cstlist->cluster[n]==NULL && n>i); if(i<=n) break; cstlist->cluster[i]=cstlist->cluster[n]; cstlist->cluster[n]=NULL; } } cstlist->cluster=(ts_cluster **)realloc(cstlist->cluster,n*sizeof(ts_cluster *)); cstlist->n=n; return TS_SUCCESS; } @@ -94,8 +95,12 @@ /* This is a stub function. User should check whether the vertex is clustering or not. */ ts_bool is_clusterable(ts_vertex *vtx){ return 1; if(fabs(vtx->c)>1e-6){ return 1; } else { return 0; } }