public class Quicksort
extends java.lang.Object
This class implements the Quicksort algorithm. It lets sort an array of values from lowest to highest and vice versa basing on an option
| Modifier and Type | Field and Description |
|---|---|
static int |
HIGHEST_FIRST
Configuration tags.
|
static int |
LOWEST_FIRST
Configuration tags.
|
| Constructor and Description |
|---|
Quicksort() |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
sort(double[] vector,
int size,
int opt)
It sorts the values array basing on opt
|
public static final int LOWEST_FIRST
public static final int HIGHEST_FIRST
public static int[] sort(double[] vector,
int size,
int opt)
It sorts the values array basing on opt
vector - double values array to sortsize - number of elements to sortopt - equals to HIGHEST_FIRST to sort from highest to lowest, and equals to LOWEST_FIRST to
sort from lowest to highest