From 1e251e4dfba4b5e184e4453fc5596396890d9d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:30:00 +0100 Subject: [PATCH] feat: fix typo and package name --- .../{DataSmoothor.java => DataSmoother.java} | 34 +++++++------- .../WettedWallColumnSampleCreator.java | 45 +++++++++---------- 2 files changed, 40 insertions(+), 39 deletions(-) rename src/main/java/neqsim/statistics/dataAnalysis/dataSmoothing/{DataSmoothor.java => DataSmoother.java} (87%) diff --git a/src/main/java/neqsim/statistics/dataAnalysis/dataSmoothing/DataSmoothor.java b/src/main/java/neqsim/statistics/dataAnalysis/dataSmoothing/DataSmoother.java similarity index 87% rename from src/main/java/neqsim/statistics/dataAnalysis/dataSmoothing/DataSmoothor.java rename to src/main/java/neqsim/statistics/dataAnalysis/dataSmoothing/DataSmoother.java index 680086635e..9268922734 100644 --- a/src/main/java/neqsim/statistics/dataAnalysis/dataSmoothing/DataSmoothor.java +++ b/src/main/java/neqsim/statistics/dataAnalysis/dataSmoothing/DataSmoother.java @@ -1,10 +1,10 @@ /* - * DataSmoothor.java + * DataSmoother.java * * Created on 31. januar 2001, 21:27 */ -package neqsim.statistics.dataAnalysis.dataSmoothing; +package neqsim.statistics.dataanalysis.datasmoothing; import Jama.Matrix; @@ -16,20 +16,22 @@ * @author Even Solbraa * @version $Id: $Id */ -public class DataSmoothor { - double[] nonSmoothedNumbers, smoothedNumbers, cCoef; - int nl = 0, nr = 0, ld = 0, m = 0, mm = 0, imj = 0, kk = 0; +public class DataSmoother { + double[] nonSmoothedNumbers; + double[] smoothedNumbers; + double[] cCoef; + int nl = 0; + int nr = 0; + int ld = 0; + int m = 0; + int mm = 0; + int imj = 0; + int kk = 0; int[] index; double[][] a; double[] b; - double sum = 0, fac = 0; - - /** - *
- * Constructor for DataSmoothor. - *
- */ - public DataSmoothor() {} + double sum = 0; + double fac = 0; /** *@@ -42,7 +44,7 @@ public DataSmoothor() {} * @param ld a int * @param m a int */ - public DataSmoothor(double[] nonSmoothedNumbers, int nl, int nr, int ld, int m) { + public DataSmoother(double[] nonSmoothedNumbers, int nl, int nr, int ld, int m) { this.nonSmoothedNumbers = new double[nonSmoothedNumbers.length]; this.smoothedNumbers = new double[nonSmoothedNumbers.length]; this.cCoef = new double[nonSmoothedNumbers.length]; @@ -165,9 +167,9 @@ public double[] getSmoothedNumbers() { * * @param args an array of {@link java.lang.String} objects */ - public static void main(String args[]) { + public static void main(String[] args) { double[] numbers = {10, 11, 12, 13, 14, 15, 15.5, 15, 19, 14, 14, 13, 12, 12, 11, 10, 9, 8}; - DataSmoothor test = new DataSmoothor(numbers, 3, 3, 0, 4); + DataSmoother test = new DataSmoother(numbers, 3, 3, 0, 4); Matrix data = new Matrix(test.getSmoothedNumbers(), 1); data.print(10, 2); test.runSmoothing(); diff --git a/src/main/java/neqsim/statistics/experimentalSampleCreation/sampleCreator/wettedWallColumnSampleCreator/WettedWallColumnSampleCreator.java b/src/main/java/neqsim/statistics/experimentalSampleCreation/sampleCreator/wettedWallColumnSampleCreator/WettedWallColumnSampleCreator.java index e05491b68f..8184637dad 100644 --- a/src/main/java/neqsim/statistics/experimentalSampleCreation/sampleCreator/wettedWallColumnSampleCreator/WettedWallColumnSampleCreator.java +++ b/src/main/java/neqsim/statistics/experimentalSampleCreation/sampleCreator/wettedWallColumnSampleCreator/WettedWallColumnSampleCreator.java @@ -7,7 +7,7 @@ package neqsim.statistics.experimentalSampleCreation.sampleCreator.wettedWallColumnSampleCreator; import Jama.Matrix; -import neqsim.statistics.dataAnalysis.dataSmoothing.DataSmoothor; +import neqsim.statistics.dataanalysis.datasmoothing.DataSmoother; import neqsim.statistics.experimentalEquipmentData.ExperimentalEquipmentData; import neqsim.statistics.experimentalEquipmentData.wettedWallColumnData.WettedWallColumnData; import neqsim.statistics.experimentalSampleCreation.readDataFromFile.wettedWallColumnReader.WettedWallColumnDataObject; @@ -26,7 +26,6 @@ */ public class WettedWallColumnSampleCreator extends SampleCreator { WettedWallDataReader reader; - DataSmoothor smoothor; double[] time; double[] pressure; double[] inletLiquidTemperature; @@ -115,33 +114,33 @@ public void smoothData() { Matrix data = new Matrix(pressure, 1); data.print(10, 2); - smoothor = new DataSmoothor(pressure, 10, 10, 0, 2); - smoothor.runSmoothing(); - smoothedPressure = smoothor.getSmoothedNumbers(); + DataSmoother smoother = new DataSmoother(pressure, 10, 10, 0, 2); + smoother.runSmoothing(); + smoothedPressure = smoother.getSmoothedNumbers(); - smoothor = new DataSmoothor(inletLiquidTemperature, 10, 10, 0, 2); - smoothor.runSmoothing(); - smoothedInletLiquidTemperature = smoothor.getSmoothedNumbers(); + smoother = new DataSmoother(inletLiquidTemperature, 10, 10, 0, 2); + smoother.runSmoothing(); + smoothedInletLiquidTemperature = smoother.getSmoothedNumbers(); - smoothor = new DataSmoothor(outletLiquidTemperature, 10, 10, 0, 2); - smoothor.runSmoothing(); - smoothedOutletLiquidTemperature = smoothor.getSmoothedNumbers(); + smoother = new DataSmoother(outletLiquidTemperature, 10, 10, 0, 2); + smoother.runSmoothing(); + smoothedOutletLiquidTemperature = smoother.getSmoothedNumbers(); - smoothor = new DataSmoothor(columnWallTemperature, 10, 10, 0, 2); - smoothor.runSmoothing(); - smoothedColumnWallTemperature = smoothor.getSmoothedNumbers(); + smoother = new DataSmoother(columnWallTemperature, 10, 10, 0, 2); + smoother.runSmoothing(); + smoothedColumnWallTemperature = smoother.getSmoothedNumbers(); - smoothor = new DataSmoothor(inletTotalGasFlowRate, 10, 10, 0, 2); - smoothor.runSmoothing(); - smoothedInletTotalGasFlowRate = smoothor.getSmoothedNumbers(); + smoother = new DataSmoother(inletTotalGasFlowRate, 10, 10, 0, 2); + smoother.runSmoothing(); + smoothedInletTotalGasFlowRate = smoother.getSmoothedNumbers(); - smoothor = new DataSmoothor(co2SupplyRate, 10, 10, 0, 2); - smoothor.runSmoothing(); - smoothedCo2SupplyRate = smoothor.getSmoothedNumbers(); + smoother = new DataSmoother(co2SupplyRate, 10, 10, 0, 2); + smoother.runSmoothing(); + smoothedCo2SupplyRate = smoother.getSmoothedNumbers(); - smoothor = new DataSmoothor(inletLiquidFlowRate, 10, 10, 0, 2); - smoothor.runSmoothing(); - smoothedInletLiquidFlowRate = smoothor.getSmoothedNumbers(); + smoother = new DataSmoother(inletLiquidFlowRate, 10, 10, 0, 2); + smoother.runSmoothing(); + smoothedInletLiquidFlowRate = smoother.getSmoothedNumbers(); data = new Matrix(smoothedPressure, 1); data.print(10, 2);