Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## applications
Class MergeSort

    java.lang.Object
      |
      +--applications.MergeSort

public class MergeSort
extends java.lang.Object

Constructor Summary
`MergeSort()`

Method Summary
`static void` | `main(java.lang.String[] args)` test program
`static void` | `merge(java.lang.Comparable[] c, java.lang.Comparable[] d, int startOfFirst, int endOfFirst, int endOfSecond)` merge two adjacent segments from c to d
`static void` | `mergePass(java.lang.Comparable[] x, java.lang.Comparable[] y, int segmentSize)` merge adjacent segments from x to y
`static void` | `mergeSort(java.lang.Comparable[] a)` sort the elements a[0 : a.length - 1] using the merge sort method

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MergeSort

    public MergeSort()

Method Detail

### mergeSort

    public static void mergeSort(java.lang.Comparable[] a)

  sort the elements a[0 : a.length - 1] using the merge sort method

### mergePass

    public static void mergePass(java.lang.Comparable[] x,
                                 java.lang.Comparable[] y,
                                 int segmentSize)

  merge adjacent segments from x to y

### merge

    public static void merge(java.lang.Comparable[] c,
                             java.lang.Comparable[] d,
                             int startOfFirst,
                             int endOfFirst,
                             int endOfSecond)

  merge two adjacent segments from c to d

### main

    public static void main(java.lang.String[] args)

  test program

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD