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

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

public class RawDataComparator
extends DataComparator<Double>
implements Serializable

this class is used to compare two sets of data, possibly using thresholds.

It can compute both absolute and relative deviation between the elements of the Data objects.

Since:
1.0
Version:
$Id: RawDataComparator.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 the attribute "relative" which can change

Constructor Summary
RawDataComparator()
           
 
Method Summary
 ComparisonData computeAbsoluteDeviation(Data<Double> data1, Data<Double> data2, boolean positive)
          Computes the absolute deviation between the elements of two Data object.
protected static double computeAbsoluteDeviation(double x, double y, boolean positive)
          Computes the absolute deviation between two double precision values.
 ComparisonData computeRelativeDeviation(Data<Double> data1, Data<Double> data2, boolean positive)
          Computes the relative deviation between the elements of two Data object.
protected static double computeRelativeDeviation(double x, double y, double eps)
          Computes the relative deviation between two double precision values.
 
Methods inherited from class fr.cnes.sirius.patrius.tools.ephemerisComparator.DataComparator
computeComparison
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawDataComparator

public RawDataComparator()
Method Detail

computeAbsoluteDeviation

public final ComparisonData computeAbsoluteDeviation(Data<Double> data1,
                                                     Data<Double> data2,
                                                     boolean positive)
Computes the absolute deviation between the elements of two Data object.

Parameters:
data1 - the first data set
data2 - the second data set
positive - true if absolute value of deviations, false otherwise
Returns:
a Data object that contains the deviations
Since:
1.0

computeRelativeDeviation

public final ComparisonData computeRelativeDeviation(Data<Double> data1,
                                                     Data<Double> data2,
                                                     boolean positive)
Computes the relative deviation between the elements of two Data object.

Parameters:
data1 - the first data set
data2 - the second data set
positive - true if absolute value of deviations, false otherwise
Returns:
a Data object that contains the deviations
Since:
1.0

computeAbsoluteDeviation

protected static final double computeAbsoluteDeviation(double x,
                                                       double y,
                                                       boolean positive)
Computes the absolute deviation between two double precision values.

Parameters:
x - the first value
y - the second value
positive - true if absolute value of deviations, false otherwise
Returns:
a Data object that contains the deviations
Since:
1.0

computeRelativeDeviation

protected static final double computeRelativeDeviation(double x,
                                                       double y,
                                                       double eps)
Computes the relative deviation between two double precision values. If one of the values is NaN or infinite, the method returns NaN.

Parameters:
x - the first value
y - the second value
eps - the threshold under which a number is considered 0
Returns:
a Data object that contains the deviations
Since:
1.0


Copyright © 2017 CNES. All Rights Reserved.