Skip to content

Commit

Permalink
feat: fix typo and package name
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Nov 2, 2023
1 parent d04112a commit 95ea78b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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;

/**
* <p>
* Constructor for DataSmoothor.
* </p>
*/
public DataSmoothor() {}
double sum = 0;
double fac = 0;

/**
* <p>
Expand All @@ -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];
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -26,7 +26,6 @@
*/
public class WettedWallColumnSampleCreator extends SampleCreator {
WettedWallDataReader reader;
DataSmoothor smoothor;
double[] time;
double[] pressure;
double[] inletLiquidTemperature;
Expand Down Expand Up @@ -111,37 +110,37 @@ public void setSampleValues() {
* smoothData.
* </p>
*/
public void smoothData() {
public void smoothData() {ss
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);
Expand Down

0 comments on commit 95ea78b

Please sign in to comment.