SSJ
3.2.1
Stochastic Simulation in Java
|
This provides an implementation of Comparator in which arrays of double
in \(d\) dimensions are compared by comparing their coordinate \(j\) in the natural order of real numbers, where \(j \in\{0,…,d-1\}\) is given in the constructor.
More...
Public Member Functions | |
DoubleArrayComparator (int j) | |
Constructs a comparator, where j is the coordinate used for the comparisons. More... | |
int | compare (double[] d1, double[] d2) |
Returns \(-1\), \(0\), or \(1\) depending on whether d1[j] is less than, equal to, or greater than d2[j] . More... | |
This provides an implementation of Comparator in which arrays of double
in \(d\) dimensions are compared by comparing their coordinate \(j\) in the natural order of real numbers, where \(j \in\{0,…,d-1\}\) is given in the constructor.
The method compare(d1, d2)
returns \(-1\), \(0\), or \(1\) depending on whether d1[j]
is less than, equal to, or greater than d2[j]
.
DoubleArrayComparator | ( | int | j | ) |
Constructs a comparator, where j
is the coordinate used for the comparisons.
j | index used for comparison |
int compare | ( | double [] | d1, |
double [] | d2 | ||
) |
Returns \(-1\), \(0\), or \(1\) depending on whether d1[j]
is less than, equal to, or greater than d2[j]
.
d1 | first array |
d2 | second array |