fr.cnes.sirius.patrius.tools.ephemerisComparator
Class ComparisonData

java.lang.Object
  extended by fr.cnes.sirius.patrius.tools.ephemerisComparator.Data<Double>
      extended by fr.cnes.sirius.patrius.tools.ephemerisComparator.ComparisonData
All Implemented Interfaces:
Serializable

public class ComparisonData
extends Data<Double>

This class represents a set of results from a comparison of data objects

It contains a table of the deviations computed by the DataComparator. It provides some tools to the user. It can compute the mean and maximum deviation on every column. It can also build a ThresholdData object, by comparing all the deviations to a set of given thresholds.

Since:
1.0
Version:
$Id: ComparisonData.java 17581 2017-05-10 12:47:31Z bignon $
Author:
Philippe Pavero
See Also:
Data, Serialized Form
Concurrency :
not thread-safe
Concurrency comment :
this class is not thread safe due to setThresholds(ArrayList)

Constructor Summary
ComparisonData(ArrayList<ArrayList<Double>> columns)
          Instantiates a new ComparisonData object.
ComparisonData(ArrayList<ArrayList<Double>> columns, ArrayList<Double> thrshld)
          this constructor initialises the columns and the thresholds.
 
Method Summary
 ThresholdsData compareToThresholds()
          Computes the margin of the data with respect to its thresholds.
 ArrayList<Double> getMaxDeviations()
          gets the max of all the columns in a list.
 ArrayList<Double> getMeanDeviations()
          gets the mean of all the columns in a list.
 ArrayList<Double> getStandardDeviations()
          gets the standard deviation of all the columns in a list.
 double getThreshold(int columnIndex)
          Gets the threshold related to a column.
 void setThreshold(int columnIndex, double v)
          Sets the threshold related to a column.
 void setThresholds(ArrayList<Double> thrshlds)
          Sets the threshold related to a column.
 
Methods inherited from class fr.cnes.sirius.patrius.tools.ephemerisComparator.Data
extractData, getColumn, getColumnNumber, getLine, getLineNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparisonData

public ComparisonData(ArrayList<ArrayList<Double>> columns)
Instantiates a new ComparisonData object. Uses the constructor from Data and initialises the thresholds to +Infinity

Parameters:
columns - the columns to put in the attribute
Throws:
EphemerisComparatorRuntimeException - when columns is null
Since:
1.0

ComparisonData

public ComparisonData(ArrayList<ArrayList<Double>> columns,
                      ArrayList<Double> thrshld)
this constructor initialises the columns and the thresholds.

Parameters:
columns - the columns to put in the attribute
thrshld - the corresponding thresholds. There should be as many thresholds as columns. The list can be null, in which case the thresholds are put to +Infinity. If one of the thresholds is null, its value is put to +Infinity too.
Throws:
EphemerisComparatorRuntimeException - when columns is null
EphemerisComparatorRuntimeException - when thresholds does not have the same dimension as columns
Since:
1.0
Method Detail

getThreshold

public final double getThreshold(int columnIndex)
Gets the threshold related to a column.

Parameters:
columnIndex - the index of the threshold
Returns:
the threshold associated to this column
Since:
1.0

setThreshold

public final void setThreshold(int columnIndex,
                               double v)
Sets the threshold related to a column.

Parameters:
columnIndex - the index of the threshold
v - the value of threshold
Since:
1.0

setThresholds

public final void setThresholds(ArrayList<Double> thrshlds)
Sets the threshold related to a column.

Parameters:
thrshlds - the list of thresholds
Since:
1.0

compareToThresholds

public final ThresholdsData compareToThresholds()
Computes the margin of the data with respect to its thresholds.

Returns:
a Data object that contains the margin of the data with respect to the thresholds. The margin is positive if there is still room for the value to increase, which means that the value is acceptable. On the opposite, if the value is unacceptable, that is to say above the threshold, the margin will be negative.
Since:
1.0

getMeanDeviations

public final ArrayList<Double> getMeanDeviations()
gets the mean of all the columns in a list. Only computes them once.

Returns:
returnList which is a copy of the member meanDeviation
Since:
1.0

getMaxDeviations

public final ArrayList<Double> getMaxDeviations()
gets the max of all the columns in a list. Only computes them once.

Returns:
returnList which is a copy of the member maxDeviation
Since:
1.0

getStandardDeviations

public final ArrayList<Double> getStandardDeviations()
gets the standard deviation of all the columns in a list. Only computes them once.

Returns:
returnList which is a copy of the member sigmaDeviation
Since:
1.0


Copyright © 2017 CNES. All Rights Reserved.