Skip to content
Snippets Groups Projects
Commit d4cf4ff8 authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Cleared the meaning of applyAbsToValues

parent 0bdae9e7
Branches
No related tags found
No related merge requests found
......@@ -159,7 +159,7 @@ abstract class BenchmarkBase {
final String absDiffFile) {
final int[] differenceData = Utils.getDifference(originalData, transformedData);
final int[] absDifferenceData = Utils.applyAbsToValues(differenceData);
final int[] absDifferenceData = Utils.asAbsoluteValues(differenceData);
final String diffFilePath = getFileNamePathIntoOutDir(diffFile);
final String absDiffFilePath = getFileNamePathIntoOutDir(absDiffFile);
......
......@@ -68,7 +68,7 @@ public class Utils {
return difference;
}
public static int[] applyAbsToValues(int[] values) {
public static int[] asAbsoluteValues(int[] values) {
int[] absValues = new int[values.length];
for (int i = 0; i < values.length; i++) {
absValues[i] = Math.abs(values[i]);
......@@ -76,6 +76,12 @@ public class Utils {
return absValues;
}
public static void applyAbsFunction(int[] values) {
for (int i = 0; i < values.length; i++) {
values[i] = Math.abs(values[i]);
}
}
public static double calculateMse(final int[] difference) {
double sum = 0.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment