public class DatumComparator extends java.lang.Object implements java.util.Comparator<Datum>
This class implements a specific type of comparison for datum objects. It compares the magnetic moment measurements by looking only at one of the orthogonal components of the magnetic moment. It also allows a correction (for e.g. sample orientation) to be applied before the comparison.
The intended use for this class is to determine the maximum extent of an orthogonal projection of a set of data (e.g. in a Zijderveld plot) in order to scale the plot appropriately.
Constructor and Description |
---|
DatumComparator(MeasurementAxis axis,
Correction corr)
Creates a comparator which will compare magnetic moments along
the specified axis after applying the specified correction.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(Datum datum1,
Datum datum2)
Compares the magnetic moments of the supplied datum objects
using the criteria specified in the constructor.
|
public DatumComparator(MeasurementAxis axis, Correction corr)
axis
- measurement axis along which to compare momentscorr
- correction to apply before comparisonpublic int compare(Datum datum1, Datum datum2)
compare
in interface java.util.Comparator<Datum>
datum1
- the first datum to be compareddatum2
- the second datum to be comparedDouble.compare(double, double)