opale.mathtools
Class Sort

java.lang.Object
  |
  +--opale.mathtools.Sort
Direct Known Subclasses:
InsertionSort

public abstract class Sort
extends java.lang.Object

Sort is the superclass of sorting methods.

Since:
Opale-Mathtools 0.11
Author:
O.C.

Constructor Summary
Sort()
           
 
Method Summary
static double getMax(int n, double[] tab)
          Gets the maximum element of an array of double
static double getMin(int n, double[] tab)
          Gets the minimum element of an array of double
abstract  void sort(int n, double[] tab)
          Abstract method to sort an array 'tab' into ascending numerical order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sort

public Sort()
Method Detail

getMax

public static final double getMax(int n,
                                  double[] tab)
Gets the maximum element of an array of double
Parameters:
int - n, the size of the array.
double[] - tab, the array.
Returns:
double, the maximum.

getMin

public static final double getMin(int n,
                                  double[] tab)
Gets the minimum element of an array of double
Parameters:
int - n, the size of the array.
double[] - tab, the array.
Returns:
double, the minimum.

sort

public abstract void sort(int n,
                          double[] tab)
Abstract method to sort an array 'tab' into ascending numerical order.
Parameters:
int - n, the size of the array.
double[] - tab, the array.