return grid;
}
-static pedge* agglomerative_ink_bundling_internal(int dim, SparseMatrix A, pedge* edges, int nneighbors, int *recurse_level, int MAX_RECURSE_LEVEL, double angle_param, double angle, double *current_ink, double *ink00, int *flag){
+static pedge* agglomerative_ink_bundling_internal(int dim, SparseMatrix A, pedge* edges, int nneighbors, int *recurse_level, int MAX_RECURSE_LEVEL, double angle_param, double angle, double *current_ink, double *ink00) {
int i, j, jj, k;
int *ia, *ja;
assert(A->m == A->n);
- *flag = 0;
-
start = clock();
grid = Agglomerative_Ink_Bundling_new(A, edges, angle_param, angle);
if (Verbose > 1)
A_mid = nearest_neighbor_graph(ne, MIN(nneighbors, ne), xx.data(), eps);
- agglomerative_ink_bundling_internal(dim, A_mid, mid_edges, nneighbors, recurse_level, MAX_RECURSE_LEVEL, angle_param, angle, current_ink, ink00, flag);
+ agglomerative_ink_bundling_internal(dim, A_mid, mid_edges, nneighbors, recurse_level, MAX_RECURSE_LEVEL, angle_param, angle, current_ink, ink00);
SparseMatrix_delete(A_mid);
/* patching edges with the new mid-section */
}
-pedge* agglomerative_ink_bundling(int dim, SparseMatrix A, pedge* edges, int nneighbor, int MAX_RECURSE_LEVEL, double angle_param, double angle, int *flag){
+pedge* agglomerative_ink_bundling(int dim, SparseMatrix A, pedge* edges, int nneighbor, int MAX_RECURSE_LEVEL, double angle_param, double angle) {
int recurse_level = 0;
double current_ink = -1, ink0;
pedge *edges2;
ink_count = 0;
- edges2 = agglomerative_ink_bundling_internal(dim, A, edges, nneighbor, &recurse_level, MAX_RECURSE_LEVEL, angle_param, angle, ¤t_ink, &ink0, flag);
+ edges2 = agglomerative_ink_bundling_internal(dim, A, edges, nneighbor, &recurse_level, MAX_RECURSE_LEVEL, angle_param, angle, ¤t_ink, &ink0);
if (Verbose > 1)
int k;
double step0 = 0.1, start = 0.0;
int maxit = 10;
- int flag;
assert(A->n == ne);
edges = (pedge*)MALLOC(sizeof(pedge)*ne);
} else if (method == METHOD_INK_AGGLOMERATE){
#ifdef HAVE_ANN
/* plan: merge a node with its neighbors if doing so improve. Form coarsening graph, repeat until no more ink saving */
- edges = agglomerative_ink_bundling(dim, A, edges, nneighbor, max_recursion, angle_param, angle, &flag);
- assert(!flag);
+ edges = agglomerative_ink_bundling(dim, A, edges, nneighbor, max_recursion, angle_param, angle);
#else
agerr (AGERR, "Graphviz built without approximate nearest neighbor library ANN; agglomerative inking not available\n");
edges = edges;