SSJ
3.3.1
Stochastic Simulation in Java
|
This class implements a MultiDimSortComparable that simply sorts the objects according to a given sorting coordinate \(j \ge0\) specified in the constructor. More...
Public Member Functions | |
OneDimSort (int j, int d) | |
Constructs a OneDimSort object that will sort the MultiDimComparable<T> objects according to coordinate \(j\). More... | |
OneDimSort (int j) | |
Constructs a OneDimSort that will sort the objects with respect to their coordinate \(j\). More... | |
void | sort (T[] a, int iMin, int iMax) |
void | sort (T[] a) |
void | sort (double[][] a, int iMin, int iMax) |
void | sort (double[][] a) |
int | getSortCoordinate () |
Returns the coordinate \(j\) used for sorting. More... | |
int | dimension () |
Returns the dimension \(d\) of the states to be sorted. More... | |
String | toString () |
Returns a String containing information about this object. More... | |
This class implements a MultiDimSortComparable that simply sorts the objects according to a given sorting coordinate \(j \ge0\) specified in the constructor.
One must have \(j \in\{0,…,d-1\}\) where \(d\) is the dimension of the MultiDimComparable<T> objects to be sorted. The sort uses the method java.util.Arrays.sort from class Arrays. For example, to sort objects based on the first coordinate, one should use OneDimSort(0)
. It is also possible to specify in the constructor the dimension \(d\) (dimState
) of the objects to be sorted.
CachedPointSet
?OneDimSort | ( | int | j, |
int | d | ||
) |
Constructs a OneDimSort object that will sort the MultiDimComparable<T> objects according to coordinate \(j\).
The sorted objects are assumed to have dimension d
.
OneDimSort | ( | int | j | ) |
Constructs a OneDimSort that will sort the objects with respect to their coordinate \(j\).
The dimension returned by dimension() will then be \(d=j+1\).
int dimension | ( | ) |
Returns the dimension \(d\) of the states to be sorted.
int getSortCoordinate | ( | ) |
Returns the coordinate \(j\) used for sorting.
String toString | ( | ) |
Returns a String
containing information about this object.
String