if (!qt) return;
dim = qt->dim;
l = qt->l;
- if (l){
- while (l){
- check_or_realloc_arrays(dim, nsuper, nsupermax, center, supernode_wgts, distances);
- if (node_data_get_id(SingleLinkedList_get_data(l)) != nodeid){
- coord = node_data_get_coord(SingleLinkedList_get_data(l));
- for (i = 0; i < dim; i++){
- (*center)[dim*(*nsuper)+i] = coord[i];
- }
- (*supernode_wgts)[*nsuper] = node_data_get_weight(SingleLinkedList_get_data(l));
- (*distances)[*nsuper] = point_distance(pt, coord, dim);
- (*nsuper)++;
+ while (l) {
+ check_or_realloc_arrays(dim, nsuper, nsupermax, center, supernode_wgts, distances);
+ if (node_data_get_id(SingleLinkedList_get_data(l)) != nodeid){
+ coord = node_data_get_coord(SingleLinkedList_get_data(l));
+ for (i = 0; i < dim; i++){
+ (*center)[dim*(*nsuper)+i] = coord[i];
}
- l = SingleLinkedList_get_next(l);
+ (*supernode_wgts)[*nsuper] = node_data_get_weight(SingleLinkedList_get_data(l));
+ (*distances)[*nsuper] = point_distance(pt, coord, dim);
+ (*nsuper)++;
}
+ l = SingleLinkedList_get_next(l);
}
if (qt->qts){