#include <neatogen/matrix_ops.h>
#include <common/memory.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
static double p_iteration_threshold = 1e-3;
-int
-power_iteration(double **square_mat, int n, int neigs, double **eigs,
+bool power_iteration(double **square_mat, int n, int neigs, double **eigs,
double *evals, int initialize)
{
/* compute the 'neigs' top eigenvectors of 'square_mat' using power iteration */
#pragma once
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
double ***CC);
extern void mult_sparse_dense_mat_transpose(vtx_data *, double **, int,
int, float ***);
- extern int power_iteration(double **, int, int, double **, double *, int);
+ extern bool power_iteration(double **, int, int, double **, double *, int);
/*****************************
#include <neatogen/matrix_ops.h>
#include <neatogen/pca.h>
#include <neatogen/closest.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
free(DD);
}
-boolean
-iterativePCA_1D(double **coords, int dim, int n, double *new_direction)
-{
+bool iterativePCA_1D(double **coords, int dim, int n, double *new_direction) {
vtx_data *laplacian;
float **mat1 = NULL;
double **mat = NULL;
#pragma once
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#include <neatogen/defs.h>
extern void PCA_alloc(DistType **, int, int, double **, int);
- extern boolean iterativePCA_1D(double **, int, int, double *);
+ extern bool iterativePCA_1D(double **, int, int, double *);
#ifdef __cplusplus
}