}
}
- power_iteration(DD, dim, new_dim, eigs, evals, true);
+ power_iteration(DD, dim, new_dim, eigs, evals, TRUE);
for (j = 0; j < new_dim; j++) {
for (i = 0; i < n; i++) {
free(DD);
}
-bool
+boolean
iterativePCA_1D(double **coords, int dim, int n, double *new_direction)
{
vtx_data *laplacian;
free(mat1);
/* Compute direction */
- return power_iteration(mat, dim, 1, &new_direction, &eval, true);
+ return power_iteration(mat, dim, 1, &new_direction, &eval, TRUE);
/* ?? When is mat freed? */
}
#include "defs.h"
extern void PCA_alloc(DistType **, int, int, double **, int);
- extern bool iterativePCA_1D(double **, int, int, double *);
+ extern boolean iterativePCA_1D(double **, int, int, double *);
#endif
int num_levels = e->num_levels;
int i, j;
float new_place_i;
- bool converged = false;
+ boolean converged = FALSE;
float upper_bound, lower_bound;
int node;
int left, right;
}
for (counter = 0; counter < max_iterations && !converged; counter++) {
- converged = true;
+ converged = TRUE;
lower_bound = -1e9; /* no lower bound for first level */
for (left = 0; left < n; left = right) {
int best_i;
int *ordering = e->ordering;
int *levels = e->levels;
int num_levels = e->num_levels;
- bool converged = false;
+ boolean converged = FALSE;
float *g = e->fArray1;
float *old_place = e->fArray2;
float *d = e->fArray4;
for (counter = 0; counter < max_iterations && !converged; counter++) {
float alpha;
float numerator = 0, denominator = 0, r;
- converged = true;
+ converged = TRUE;
/* find steepest descent direction */
for (i = 0; i < e->n; i++) {
old_place[i] = place[i];
e->lev[u]), w = 2;
float avgPos = sum / w;
float pos;
- bool finished;
+ boolean finished;
do {
- finished = true;
+ finished = TRUE;
if (ui < endOfLevel) {
u = ordering[ui];
pos = place[u] - levels_gap * e->lev[u];
w++;
sum += pos;
avgPos = sum / w;
- finished = false;
+ finished = FALSE;
}
}
w++;
sum += pos;
avgPos = sum / w;
- finished = false;
+ finished = FALSE;
}
}
} while (!finished);
prev_stress = stress;
#endif
if (test > quad_prog_tol) {
- converged = false;
+ converged = FALSE;
}
}
#ifdef CONMAJ_LOGGING
int *levels = e->levels;
int num_levels = e->num_levels;
float new_place_i;
- bool converged = false;
+ boolean converged = FALSE;
float upper_bound, lower_bound;
int node;
int left, right;
gap = e->fArray4;
for (counter = 0; counter < max_iterations && !converged; counter++) {
- converged = true;
+ converged = TRUE;
lower_bound = -1e9; /* no lower bound for first level */
for (left = 0; left < n; left = right) {
int best_i;