public class Sorting extends Object
Allows to sort a column quickly, Using a generic version of C.A.R Hoare's Quick Sort algorithm.
Constructor and Description |
---|
Sorting(double[] array,
boolean copyArray)
Construct an ascending order.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getIndex()
Get the ascending order of all lines.
|
int |
getIndex(int i)
Get the ascending order of one line.
|
static int[] |
invertIndex(int[] ind) |
static void |
main(String[] args) |
public Sorting(double[] array, boolean copyArray)
array
- Array to sort.copyArray
- Specify if the sort is made directly : true -> array is
modified (useful for big arrays !), false -> array is copied
and not modified (more memory used).public static int[] invertIndex(int[] ind)
public int getIndex(int i)
i
- Line number.public int[] getIndex()
public static void main(String[] args)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics