int n, /* Number of nodes */
int nedges_graph, /* Number of edges */
double** d_coords, /* Coordinates of nodes (output layout) */
+ node_t** nodes, /* Original nodes */
int dim, /* Dimemsionality of layout */
int smart_ini, /* smart initialization */
int model, /* difference model */
}
}
if (!directionalityExist) {
- return stress_majorization_kD_mkernel(graph, n, nedges_graph, d_coords, dim, smart_ini, model, maxi);
+ return stress_majorization_kD_mkernel(graph, n, nedges_graph, d_coords, nodes, dim, smart_ini, model, maxi);
}
/******************************************************************
double* y;
if (dim>2) {
/* the dim==2 case is handled below */
- stress_majorization_kD_mkernel(graph, n, nedges_graph, d_coords+1, dim-1, smart_ini, model, 15);
+ stress_majorization_kD_mkernel(graph, n, nedges_graph, d_coords+1, nodes, dim-1, smart_ini, model, 15);
/* now copy the y-axis into the (dim-1)-axis */
for (i=0; i<n; i++) {
d_coords[dim-1][i] = d_coords[1][i];
compute_hierarchy(graph, n, abs_tol, relative_tol, y, &ordering, &levels, &num_levels);
if (num_levels<=1) {
/* no hierarchy found, use faster algorithm */
- return stress_majorization_kD_mkernel(graph, n, nedges_graph, d_coords, dim, smart_ini, model, maxi);
+ return stress_majorization_kD_mkernel(graph, n, nedges_graph, d_coords, nodes, dim, smart_ini, model, maxi);
}
if (levels_gap>0) {
}
}
else {
- initLayout(graph, n, dim, d_coords);
+ initLayout(graph, n, dim, d_coords, nodes);
compute_hierarchy(graph, n, abs_tol, relative_tol, NULL, &ordering, &levels, &num_levels);
}
if (n == 1) return 0;
int n, /* Number of nodes */
int nedges_graph, /* Number of edges */
double **d_coords, /* Coordinates of nodes (output layout) */
+ node_t **nodes, /* Original nodes */
int dim, /* Dimemsionality of layout */
int model, /* difference model */
int maxi, /* max iterations */
float maxEdgeLen = 0;
double max = 1;
- initLayout(graph, n, dim, d_coords);
+ initLayout(graph, n, dim, d_coords, nodes);
if (n == 1)
return 0;