32 for (i = 0; i < n; i++) {
37 for (
size_t j = 1; j <
graph[i].nedges; j++) {
44#define hierarchy_cg_tol 1e-3
53 double tol = hierarchy_cg_tol;
55 float *old_ewgts =
graph[0].ewgts;
57 construct_b(
graph, n, b);
61 for (i = 0; i < n; i++) {
68 for (i = 0; i < n; i++) {
69 graph[i].ewgts = uniform_weights;
71 for (
size_t j = 1; j <
graph[i].nedges; j++) {
72 uniform_weights[j] = 1;
74 uniform_weights +=
graph[i].nedges;
83 for (i = 0; i < n; i++) {
84 graph[i].ewgts = old_ewgts;
85 old_ewgts +=
graph[i].nedges;
Memory allocation wrappers that exit on failure.
static void * gv_calloc(size_t nmemb, size_t size)
int conjugate_gradient(vtx_data *A, double *x, double *b, int n, double tol, int max_iterations)
Agraph_t * graph(char *name)
void init_vec_orth1(int n, double *vec)
static int nedges
total no. of edges used in routing