hp->key = hd_hil_s_from_xy(pi, order);
- if (dtsearch(xlp->hdx, hp) != 0)
+#if 0
+ if (dtsearch(xlp->hdx, hp) != 0) {
+ free(hp);
continue;
+ }
+#endif
if (!(dtinsert(xlp->hdx, hp)))
return -1;
}
return 0;
}
+static void xlhdxunload(XLabels_t * xlp)
+{
+ int size=dtsize(xlp->hdx), freed=0;
+ while(dtsize(xlp->hdx) ) {
+ Void_t*vp=dtfinger(xlp->hdx);
+ assert(vp);
+ if(vp) {
+ dtdetach(xlp->hdx, vp);
+ free(vp);
+ freed++;
+ }
+ }
+ assert(size==freed);
+}
+
static int xlspdxload(XLabels_t * xlp)
{
HDict_t *op=0;
return r;
if ((r = xlspdxload(xlp)) < 0)
return r;
+ xlhdxunload(xlp);
return dtclose(xlp->hdx);
}
real *val = NULL;
SparseMatrix B = NULL;
int *vset = NULL, nvset, ncov, j;
- int *cluster, *clusterp, ncluster;
+ int *cluster=NULL, *clusterp=NULL, ncluster;
assert(A->m == A->n);
*cA = NULL;
if (jcn) FREE(jcn);
if (val) FREE(val);
if (B) SparseMatrix_delete(B);
+
+ if(cluster) FREE(cluster);
+ if(clusterp) FREE(clusterp);
}
void Multilevel_coarsen(SparseMatrix A, SparseMatrix *cA, SparseMatrix D, SparseMatrix *cD, real *node_wgt, real **cnode_wgt,