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.
Data
,
Serialized FormConstructor and Description |
---|
RawDataComparator() |
Modifier and Type | Method and Description |
---|---|
ComparisonData |
computeAbsoluteDeviation(Data<Double> data1,
Data<Double> data2,
boolean positive)
Computes the absolute deviation between the elements of two Data object.
|
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.
|
static double |
computeRelativeDeviation(double x,
double y,
double eps)
Computes the relative deviation between two double precision values.
|
computeComparison
public final ComparisonData computeAbsoluteDeviation(Data<Double> data1, Data<Double> data2, boolean positive)
data1
- the first data setdata2
- the second data setpositive
- true if absolute value of deviations, false otherwisepublic final ComparisonData computeRelativeDeviation(Data<Double> data1, Data<Double> data2, boolean positive)
data1
- the first data setdata2
- the second data setpositive
- true if absolute value of deviations, false otherwisepublic static final double computeAbsoluteDeviation(double x, double y, boolean positive)
x
- the first valuey
- the second valuepositive
- true if absolute value of deviations, false otherwisepublic static final double computeRelativeDeviation(double x, double y, double eps)
x
- the first valuey
- the second valueeps
- the threshold under which a number is considered 0Copyright © 2019 CNES. All Rights Reserved.