SSJ
V. 2.4.

umontreal.iro.lecuyer.util
Class OneDimSort

java.lang.Object
  extended by umontreal.iro.lecuyer.util.OneDimSort
All Implemented Interfaces:
MultiDimSort

public class OneDimSort
extends Object
implements MultiDimSort

This class implements a MultiDimSort that simply sorts the arrays according to one dimension specified in the constructor. The sort uses method sort from class Arrays.


Constructor Summary
OneDimSort(int i)
          Constructs a OneDimSort that will sort according to coordinate i.
 
Method Summary
 int dimension()
          Returns the coordinate used in the sort.
 void sort(double[][] a)
          Sorts the entire array.
 void sort(double[][] a, int iMin, int iMax)
          Sorts the subarray of a made of the elements with indices from iMin to iMax-1.
<T extends MultiDimComparable<? super T>>
void
sort(T[] a)
          Sorts the entire array.
<T extends MultiDimComparable<? super T>>
void
sort(T[] a, int iMin, int iMax)
          Sorts the subarray of a made of the elements with indices from iMin to iMax-1.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneDimSort

public OneDimSort(int i)
Constructs a OneDimSort that will sort according to coordinate i.

Method Detail

sort

public <T extends MultiDimComparable<? super T>> void sort(T[] a,
                                                           int iMin,
                                                           int iMax)
Description copied from interface: MultiDimSort
Sorts the subarray of a made of the elements with indices from iMin to iMax-1.

Specified by:
sort in interface MultiDimSort
Parameters:
a - array to sort
iMin - index of first element to sort
iMax - index of last element to sort is iMax - 1

sort

public <T extends MultiDimComparable<? super T>> void sort(T[] a)
Description copied from interface: MultiDimSort
Sorts the entire array.

Specified by:
sort in interface MultiDimSort
Parameters:
a - array to sort

sort

public void sort(double[][] a,
                 int iMin,
                 int iMax)
Description copied from interface: MultiDimSort
Sorts the subarray of a made of the elements with indices from iMin to iMax-1.

Specified by:
sort in interface MultiDimSort
Parameters:
a - array to sort
iMin - index of first element to sort
iMax - index of last element to sort is iMax - 1

sort

public void sort(double[][] a)
Description copied from interface: MultiDimSort
Sorts the entire array.

Specified by:
sort in interface MultiDimSort
Parameters:
a - array to sort

dimension

public int dimension()
Returns the coordinate used in the sort.

Specified by:
dimension in interface MultiDimSort
Returns:
coordinate used in the sort

SSJ
V. 2.4.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.