Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMAM2Middleware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Middleware
Commits
e042674e
Commit
e042674e
authored
Jun 21, 2018
by
Alexander David Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated HelperA.h
parent
ccaffb6f
Pipeline
#57079
failed with stage
in 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
src/test/resources/results/CMakeCppOnly/src/cpp/HelperA.h
src/test/resources/results/CMakeCppOnly/src/cpp/HelperA.h
+6
-11
No files found.
src/test/resources/results/CMakeCppOnly/src/cpp/HelperA.h
View file @
e042674e
#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
;
kmeans
(
clusters
,
A
.
t
(),
k
,
random_subset
,
20
,
true
);
printf
(
"cluster centroid calculation done
\n
"
);
/*
printf("cluster centroid calculation done\n");
std::ofstream myfile;
myfile.open("data after cluster.txt");
myfile << A;
...
...
@@ -33,14 +32,14 @@ std::ofstream myfile;
std::ofstream myfile2;
myfile2.open("cluster centroids.txt");
myfile2 << clusters;
myfile2
.
close
();
myfile2.close();
*/
mat
indexedData
=
getKMeansClustersIndexData
(
A
.
t
(),
clusters
);
std
::
ofstream
myfile3
;
/*
std::ofstream myfile3;
myfile3.open("data after index.txt");
myfile3 << indexedData;
myfile3.close();
*/
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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment