Commit e042674e authored by Alexander David Hellwig's avatar Alexander David Hellwig
Browse files

Updated HelperA.h

parent ccaffb6f
Pipeline #57079 failed with stage
in 32 seconds
#ifndef HELPERA_H
#define HELPERA_H
#define _GLIBCXX_USE_CXX11_ABI 0
#include <iostream>
#include "armadillo.h"
#include <stdarg.h>
......@@ -24,7 +23,7 @@ return eigenValues;
static mat getKMeansClusters(mat A, int k){
mat clusters;
printf("cluster centroid calculation done\n");
/*printf("cluster centroid calculation done\n");
std::ofstream myfile;"data after cluster.txt");
myfile << A;
......@@ -33,14 +32,14 @@ std::ofstream myfile;
std::ofstream myfile2;"cluster centroids.txt");
myfile2 << clusters;
mat indexedData=getKMeansClustersIndexData(A.t(), clusters);
std::ofstream myfile3;
/*std::ofstream myfile3;"data after index.txt");
myfile3 << indexedData;
return indexedData;
......@@ -77,12 +76,8 @@ static double getEuclideanDistance(mat A, int colIndexA, mat B, int colIndexB){
static mat getSqrtMat(mat A){
for(int i=0;i<A.n_rows;++i){
double curVal = A(i,i);
A(i,i) = sqrt(curVal);
return A;
cx_mat result=sqrtmat(A);
return real(result);
static mat getSqrtMatDiag(mat A){
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment