diff --git a/src/ansi_c_implementation/NLMSvariants.c b/src/ansi_c_implementation/NLMSvariants.c index 679574c..45935b3 100644 --- a/src/ansi_c_implementation/NLMSvariants.c +++ b/src/ansi_c_implementation/NLMSvariants.c @@ -20,19 +20,6 @@ Created by Stefan Friese on 26.04.2018 typedef SSIZE_T ssize_t; #endif -typedef struct { - double *weights; - unsigned windowSize; - unsigned samplesCount; - double learnrate; -} mldata_t; - -enum fileHeader{ - LOCAL_MEAN_HEADER, - DIRECT_PREDECESSOR_HEADER, - DIFFERENTIAL_PREDECESSOR_HEADER -}; - double *xSamples; mldata_t *mlData = NULL; // Machine learning point_t *points = NULL; // Graphing diff --git a/src/ansi_c_implementation/nlms_types.h b/src/ansi_c_implementation/nlms_types.h index 4380c3f..6e4feae 100644 --- a/src/ansi_c_implementation/nlms_types.h +++ b/src/ansi_c_implementation/nlms_types.h @@ -1,6 +1,14 @@ +/* * machine learning * */ +typedef struct { + double *weights; + unsigned windowSize; + unsigned samplesCount; + double learnrate; +} mldata_t; + /* *svg graph building* */ -typedef struct { +typedef struct { // Axis x,y double xVal[7]; double yVal[7]; }point_t; @@ -10,12 +18,13 @@ typedef struct { unsigned char red, green, blue; }colorChannel_t; -typedef struct { +typedef struct { // Storage for image data int x, y; colorChannel_t *data; -}imagePixel_t; +}imagePixel_t; -enum fileSuffix_t{ // used in conjunction with mkFileName() +/** file handling* */ +enum fileSuffix_t{ // Used in conjunction with mkFileName() PURE_WEIGHTS, USED_WEIGHTS, DIRECT_PREDECESSOR, @@ -25,4 +34,9 @@ enum fileSuffix_t{ // used in conjunction with mkFileName() DIFFERENTIAL_PREDECESSOR }; +enum fileHeader{ + LOCAL_MEAN_HEADER, + DIRECT_PREDECESSOR_HEADER, + DIFFERENTIAL_PREDECESSOR_HEADER +}; diff --git a/src/cpp_implementation/NLMSvariants.cpp b/src/cpp_implementation/NLMSvariants.cpp index 679574c..45935b3 100644 --- a/src/cpp_implementation/NLMSvariants.cpp +++ b/src/cpp_implementation/NLMSvariants.cpp @@ -20,19 +20,6 @@ Created by Stefan Friese on 26.04.2018 typedef SSIZE_T ssize_t; #endif -typedef struct { - double *weights; - unsigned windowSize; - unsigned samplesCount; - double learnrate; -} mldata_t; - -enum fileHeader{ - LOCAL_MEAN_HEADER, - DIRECT_PREDECESSOR_HEADER, - DIFFERENTIAL_PREDECESSOR_HEADER -}; - double *xSamples; mldata_t *mlData = NULL; // Machine learning point_t *points = NULL; // Graphing diff --git a/src/cpp_implementation/nlms_types.h b/src/cpp_implementation/nlms_types.h index 4380c3f..6e4feae 100644 --- a/src/cpp_implementation/nlms_types.h +++ b/src/cpp_implementation/nlms_types.h @@ -1,6 +1,14 @@ +/* * machine learning * */ +typedef struct { + double *weights; + unsigned windowSize; + unsigned samplesCount; + double learnrate; +} mldata_t; + /* *svg graph building* */ -typedef struct { +typedef struct { // Axis x,y double xVal[7]; double yVal[7]; }point_t; @@ -10,12 +18,13 @@ typedef struct { unsigned char red, green, blue; }colorChannel_t; -typedef struct { +typedef struct { // Storage for image data int x, y; colorChannel_t *data; -}imagePixel_t; +}imagePixel_t; -enum fileSuffix_t{ // used in conjunction with mkFileName() +/** file handling* */ +enum fileSuffix_t{ // Used in conjunction with mkFileName() PURE_WEIGHTS, USED_WEIGHTS, DIRECT_PREDECESSOR, @@ -25,4 +34,9 @@ enum fileSuffix_t{ // used in conjunction with mkFileName() DIFFERENTIAL_PREDECESSOR }; +enum fileHeader{ + LOCAL_MEAN_HEADER, + DIRECT_PREDECESSOR_HEADER, + DIFFERENTIAL_PREDECESSOR_HEADER +};