@@ -366,7 +366,7 @@ |
} |
} |
|
- public Bulletin17CResults readC17outputFile( String path ) throws FileNotFoundException { |
+ public Bulletin17CResults readC17outputFile( String path , String skewResultType) throws FileNotFoundException { |
Bulletin17CResults finalResult = new Bulletin17CResults(); |
|
boolean foundFreqValues = false; |
@@ -381,6 +381,16 @@ |
} else if ( line.isEmpty() ) { |
foundFreqValues = false; |
foundWYValues = false; |
+ } else if ( line.startsWith( "Moments," ) ) { |
+ String[] tokens = line.split( "," ); |
+ //double mean = Double.parseDouble( tokens[ 3 ] ); |
+ //double variance = Double.parseDouble( tokens[ 3 ] ); |
+ double resultSkewness = Double.parseDouble( tokens[ 3 ] ); |
+ if (skewResultType.equalsIgnoreCase("station")) { |
+ stationSkew = resultSkewness; |
+ }else if (skewResultType.equalsIgnoreCase("weighted")) { |
+ weightedGenSkew = resultSkewness; |
+ } |
} else if ( foundFreqValues ) { |
String[] tokens = line.split( "," ); |
Bulletin17CFreqResult res = new Bulletin17CFreqResult(); |
@@ -411,10 +421,10 @@ |
|
public void readC17outputFiles() throws FileNotFoundException, IOException { |
String path = directory + File.separator + "c17Station.csv"; |
- this.stationResult = readC17outputFile( path ); |
+ this.stationResult = readC17outputFile( path , "station"); |
|
path = directory + File.separator + "c17Weighted.csv"; |
- this.weightedResult = readC17outputFile( path ); |
+ this.weightedResult = readC17outputFile( path , "weighted"); |
} |
|
public void run() throws IOException, Exception { |