4 int diamtr_ (int64_t *n, int64_t *e2, int64_t *adj, int64_t *
5 xadj, int64_t *mask, int64_t *ls, int64_t *xls, int64_t *hlevel, int64_t *snode, int64_t *nc)
10 static int64_t node, i, j, enode, depth, width, hsize, istop, jstop, istrt, jstrt,
degree, mindeg, ewidth, sdepth;
70 for (i = 1; i <= i__1; ++i)
74 degree = xadj[i + 1] - xadj[i];
87 rootls_ (n, snode, &i__1, e2, &adj[1], &xadj[1], &mask[1], &ls[1], &xls[1],
92 *nc = xls[sdepth + 1] - 1;
102 istop = xls[sdepth + 1] - 1;
104 for (i = istrt; i <= i__1; ++i)
108 hlevel[hsize] = node;
109 xls[node] = xadj[node + 1] - xadj[node];
117 isorti_ (&hsize, &hlevel[1], n, &xls[1]);
124 degree = xls[hlevel[1]];
126 for (i = 2; i <= i__1; ++i)
129 if (xls[node] != degree)
133 hlevel[hsize] = node;
142 for (i = 1; i <= i__1; ++i)
148 rootls_ (n, &node, &ewidth, e2, &adj[1], &xadj[1], &mask[1], &ls[1], &
149 xls[1], &depth, &width);
180 rootls_ (n, &enode, &i__1, e2, &adj[1], &xadj[1], &mask[1], &ls[1], &
181 xls[1], &depth, &width);
186 for (i = 1; i <= i__1; ++i)
189 jstop = xls[i + 1] - 1;
191 for (j = jstrt; j <= i__2; ++j)
int diamtr_(int64_t *n, int64_t *e2, int64_t *adj, int64_t *xadj, int64_t *mask, int64_t *ls, int64_t *xls, int64_t *hlevel, int64_t *snode, int64_t *nc)
Purpose: Find nodes which define a pseudo-diameter of a graph and store distances from end node...
int rootls_(int64_t *, int64_t *root, int64_t *maxwid, int64_t *, int64_t *adj, int64_t *xadj, int64_t *mask, int64_t *ls, int64_t *xls, int64_t *depth, int64_t *width)
void degree(int root, int adj_num, int adj_row[], int adj[], int mask[], int deg[], int *iccsze, int ls[], int node_num)
int isorti_(int64_t *nl, int64_t *list, int64_t *, int64_t *key)