30 for (i = 0; i < n; i++) {
35 for (
size_t j = 1; j <
graph[i].nedges; j++) {
42#define hierarchy_cg_tol 1e-3
51 double tol = hierarchy_cg_tol;
53 float *old_ewgts =
graph[0].ewgts;
55 construct_b(
graph, n, b);
59 for (i = 0; i < n; i++) {
66 for (i = 0; i < n; i++) {
67 graph[i].ewgts = uniform_weights;
69 for (
size_t j = 1; j <
graph[i].nedges; j++) {
70 uniform_weights[j] = 1;
72 uniform_weights +=
graph[i].nedges;
81 for (i = 0; i < n; i++) {
82 graph[i].ewgts = old_ewgts;
83 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