47 float *old_weights = graph[0].
ewgts;
58 for (i = 0; i < dim; i++)
59 coords[i] = storage + i * n;
72 bfs(node, graph, n, coords[0], &Q);
75 for (i = 0; i < n; i++) {
76 dist[i] = coords[0][i];
77 if (dist[i] > max_dist) {
84 for (i = 1; i < dim; i++) {
88 bfs(node, graph, n, coords[i], &Q);
91 for (j = 0; j < n; j++) {
92 dist[j] =
MIN(dist[j], coords[i][j]);
93 if (dist[j] > max_dist) {
103 if (reweight_graph) {
114 for (i = 0; i < dim; i++) {
116 for (j = 0; j < n; j++) {
120 for (j = 0; j < n; j++) {
void restore_old_weights(vtx_data *graph, int n, float *old_weights)
void center_coordinate(DistType **coords, int n, int dim)
void bfs(int vertex, vtx_data *graph, int n, DistType *dist, Queue *Q)
void dijkstra(int vertex, vtx_data *graph, int n, DistType *dist)
void mkQueue(Queue *qp, int size)
Agraph_t * graph(char *name)
void compute_new_weights(vtx_data *graph, int n)
void embed_graph(vtx_data *graph, int n, int dim, DistType ***Coords, int reweight_graph)
Agnode_t * node(Agraph_t *g, char *name)
double dist(Site *s, Site *t)