44 float *old_weights =
graph[0].ewgts;
49 for (i = 0; i <
dim; i++)
50 coords[i] = storage + i * n;
65 for (i = 0; i < n; i++) {
66 dist[i] = coords[0][i];
67 if (
dist[i] > max_dist) {
74 for (i = 1; i <
dim; i++) {
81 for (j = 0; j < n; j++) {
83 if (
dist[j] > max_dist) {
104 for (i = 0; i <
dim; i++) {
106 for (j = 0; j < n; j++) {
110 for (j = 0; j < n; j++) {
Memory allocation wrappers that exit on failure.
static void * gv_calloc(size_t nmemb, size_t size)
void bfs(int vertex, vtx_data *graph, int n, DistType *dist)
void embed_graph(vtx_data *graph, int n, int dim, DistType ***Coords, int reweight_graph)
void center_coordinate(DistType **coords, int n, int dim)
static double dist(int dim, double *x, double *y)
Agraph_t * graph(char *name)
void compute_new_weights(vtx_data *graph, int n)
void restore_old_weights(vtx_data *graph, int n, float *old_weights)