From 71bd11c6e92e0be8a2b9553c46bb86b09a29c6cf Mon Sep 17 00:00:00 2001 From: gurkenhabicht Date: Tue, 22 May 2018 16:22:12 +0200 Subject: [PATCH] updated --- src/ansi_c_implementation/nlms_types.h | 4 ++-- src/cpp_implementation/NLMSvariants.cpp | 13 ------------- src/cpp_implementation/nlms_types.h | 4 ++-- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/ansi_c_implementation/nlms_types.h b/src/ansi_c_implementation/nlms_types.h index 6e4feae..1cdbdda 100644 --- a/src/ansi_c_implementation/nlms_types.h +++ b/src/ansi_c_implementation/nlms_types.h @@ -24,7 +24,7 @@ typedef struct { // Storage for image data }imagePixel_t; /** file handling* */ -enum fileSuffix_t{ // Used in conjunction with mkFileName() +enum fileSuffix_t{ // Used in conjunction with MkFileName() PURE_WEIGHTS, USED_WEIGHTS, DIRECT_PREDECESSOR, @@ -34,7 +34,7 @@ enum fileSuffix_t{ // Used in conjunction with mkFileName() DIFFERENTIAL_PREDECESSOR }; -enum fileHeader{ +enum fileHeader{ // Used in conjunction with MkFilename() LOCAL_MEAN_HEADER, DIRECT_PREDECESSOR_HEADER, DIFFERENTIAL_PREDECESSOR_HEADER diff --git a/src/cpp_implementation/NLMSvariants.cpp b/src/cpp_implementation/NLMSvariants.cpp index 3197ffd..0147157 100644 --- a/src/cpp_implementation/NLMSvariants.cpp +++ b/src/cpp_implementation/NLMSvariants.cpp @@ -11,7 +11,6 @@ Created by Stefan Friese on 26.04.2018 #include #include #include -//#include // DBL_MAX #include "nlms_types.h" // added types #define RGB_COLOR 255 @@ -247,11 +246,7 @@ void localMean ( mldata_t *mlData, point_t points[] ) { deviation /= xErrorLength; // Deviation printf("mean:%lf, devitation:%lf\t\tlocal Mean\n", mean, deviation); - // write in file - //mkFileName(fileName, sizeof(fileName), RESULTS); - //FILE *fp2 = fopen(fileName, "w"); fprintf(fp4, "\nQuadratische Varianz(x_error): %f\nMittelwert:(x_error): %f\n\n", deviation, mean); // Write to logfile - //fclose(fp2); free(localWeights); fclose(fp4); @@ -333,12 +328,8 @@ void directPredecessor( mldata_t *mlData, point_t points[]) { } deviation /= xErrorLength; // Deviation printf("mean:%lf, devitation:%lf\t\tdirect Predecessor\n", mean, deviation); - // write in file - //mkFileName(fileName, sizeof(fileName), RESULTS); - //FILE *fp2 = fopen(fileName, "wa"); fprintf(fp3, "\nQuadratische Varianz(x_error): %f\nMittelwert:(x_error): %f\n\n", deviation, mean); fclose(fp3); - //fclose(fp2); free(localWeights); } @@ -414,11 +405,7 @@ void differentialPredecessor ( mldata_t *mlData, point_t points[] ) { deviation /= xErrorLength; printf("mean:%lf, devitation:%lf\t\tdifferential Predecessor\n", mean, deviation); - // write in file - //mkFileName(fileName, sizeof(fileName), RESULTS); - //FILE *fp2 = fopen(fileName, "wa"); fprintf(fp6, "\nQuadratische Varianz(x_error): %f\nMittelwert:(x_error): %f\n\n", deviation, mean); - //fclose(fp2); fclose(fp6); free(localWeights); diff --git a/src/cpp_implementation/nlms_types.h b/src/cpp_implementation/nlms_types.h index 6e4feae..1cdbdda 100644 --- a/src/cpp_implementation/nlms_types.h +++ b/src/cpp_implementation/nlms_types.h @@ -24,7 +24,7 @@ typedef struct { // Storage for image data }imagePixel_t; /** file handling* */ -enum fileSuffix_t{ // Used in conjunction with mkFileName() +enum fileSuffix_t{ // Used in conjunction with MkFileName() PURE_WEIGHTS, USED_WEIGHTS, DIRECT_PREDECESSOR, @@ -34,7 +34,7 @@ enum fileSuffix_t{ // Used in conjunction with mkFileName() DIFFERENTIAL_PREDECESSOR }; -enum fileHeader{ +enum fileHeader{ // Used in conjunction with MkFilename() LOCAL_MEAN_HEADER, DIRECT_PREDECESSOR_HEADER, DIFFERENTIAL_PREDECESSOR_HEADER