int nedges;
int *edges;
DistType *edist;
- bool free_mem;
+ boolean free_mem;
} dist_data;
static double compute_stressf(float **coords, float *lap, int dim, int n)
double *b;
double L_ij;
double old_stress, new_stress;
- bool converged;
+ boolean converged;
/*************************************************
** Computation of full, dense, unrestricted k-D **
b = N_GNEW(n, double);
old_stress = compute_stress(coords, Dij, dim, n);
- for (converged = false, iterations = 0;
+ for (converged = FALSE, iterations = 0;
iterations < n_iterations && !converged; iterations++) {
/* Axis-by-axis optimization: */
}
b[i] += degree * coords[k][i];
}
- conjugate_gradient_f(lap, coords[k], b, n, conj_tol, n, true);
+ conjugate_gradient_f(lap, coords[k], b, n, conj_tol, n, TRUE);
}
if ((converged = (iterations % 2 == 0))) { /* check for convergence every two iterations */
double *b;
double L_ij;
double old_stress, new_stress;
- bool converged;
+ boolean converged;
/*************************************************
Layout initialization
distances[i].edist = N_GNEW(n - 1, DistType);
distances[i].nedges = n - 1;
nedges += n - 1;
- distances[i].free_mem = true;
+ distances[i].free_mem = TRUE;
index = CenterIndex[i];
for (j = 0; j < i; j++) {
distances[i].edges[j] = j;
available_space = (dist_bound + 1) * n;
storage1 = N_GNEW(available_space, int);
storage2 = N_GNEW(available_space, DistType);
- distances[i].free_mem = true;
+ distances[i].free_mem = TRUE;
} else {
- distances[i].free_mem = false;
+ distances[i].free_mem = FALSE;
}
distances[i].edges = storage1;
distances[i].edist = storage2;
b = N_GNEW(n, double);
old_stress = compute_stress1(coords, distances, dim, n), new_stress;
- for (converged = false, iterations = 0;
+ for (converged = FALSE, iterations = 0;
iterations < n_iterations && !converged; iterations++) {
/* Axis-by-axis optimization: */
double *b_restricted;
double L_ij;
double old_stress, new_stress;
- bool converged;
+ boolean converged;
for (i = 0; i < subspace_dim; i++) {
subspace[i] = d_storage + i * n;
distances[i].edist = N_GNEW(n - 1, DistType);
distances[i].nedges = n - 1;
nedges += n - 1;
- distances[i].free_mem = true;
+ distances[i].free_mem = TRUE;
index = CenterIndex[i];
for (j = 0; j < i; j++) {
distances[i].edges[j] = j;
available_space = (dist_bound + 1) * n;
storage1 = N_GNEW(available_space, int);
storage2 = N_GNEW(available_space, DistType);
- distances[i].free_mem = true;
+ distances[i].free_mem = TRUE;
} else {
- distances[i].free_mem = false;
+ distances[i].free_mem = FALSE;
}
distances[i].edges = storage1;
distances[i].edist = storage2;
b = N_GNEW(n, double);
b_restricted = N_GNEW(subspace_dim, double);
old_stress = compute_stress1(coords, distances, dim, n);
- for (converged = false, iterations = 0;
+ for (converged = FALSE, iterations = 0;
iterations < n_iterations && !converged; iterations++) {
/* Axis-by-axis optimization: */
b_restricted);
conjugate_gradient_f(matrix, directions[k], b_restricted,
subspace_dim, conj_tol, subspace_dim,
- false);
+ FALSE);
right_mult_with_vector_transpose(subspace, n, subspace_dim,
directions[k], coords[k]);
}
int step;
float val;
double old_stress, new_stress;
- bool converged;
+ boolean converged;
float **b;
float *tmp_coords;
float *dist_accumulator;
start_timer();
}
- for (converged = false, iterations = 0;
+ for (converged = FALSE, iterations = 0;
iterations < maxi && !converged; iterations++) {
/* First, construct Laplacian of 1/(d_ij*|p_i-p_j|) */