ETHZ_Logo RAMSES_Logo_Right   RAMSES   RAMSES_Logo_Left Systems Ecology  
Start    search button      Modules:   A-Z   Function   Layer        QuickRefs:   DM   AuxLib   AuxLibE   SciLib   EasyMW   MW   ISIS   RMSLib

DEFINITION MODULE SortLib;

  (*******************************************************************

    Module  SortLib     (Version 0.1)

      Copyright (c) 1987-2006 by Olivier Roth and ETH Zurich.

    Purpose   Sorting of REALs by various methods.

    Remarks   --


    Programming

      o Design
        Olivier Roth              29/01/1987

      o Implementation
        Olivier Roth              29/01/1987


    ETH Zurich
    Systems Ecology
    CHN E 35.1
    Universitaetstrasse 16
    8092 Zurich
    SWITZERLAND

    URLs:
        <mailto:RAMSES@env.ethz.ch>
        <http://www.sysecol.ethz.ch>
        <http://www.sysecol.ethz.ch/SimSoftware/RAMSES>


    Last revision of definition:  02/08/1987  OR

  *******************************************************************)


  PROCEDURE QuickSortX ( VAR a: ARRAY OF REAL; n: CARDINAL );
  (***********************************************************)
  (*  Sorts an array a by the method of C.A.R. HOARE.        *)                      (*  Fast for large n.                                      *)
  (*  Algorithm from:                                        *)
  (*  Niklaus Wirth's "Algoritmen und Datenstrukturen",      *)
  (*  B.G. Teubner Stuttgart, 1983.                          *)
  (***********************************************************)


  PROCEDURE QuickSortXY ( VAR a, b: ARRAY OF REAL; n: CARDINAL );
  (***********************************************************)
  (*  Sorts an array a and at the same time the parallel     *)
  (*  array b by the method of C.A.R. HOARE.                 *)                      (*  Fast for large n.                                      *)
  (*  Algorithm from:                                        *)
  (*  Niklaus Wirth's "Algoritmen und Datenstrukturen",      *)
  (*  B.G. Teubner Stuttgart, 1983.                          *)
  (***********************************************************)


  PROCEDURE BinarySortX ( VAR a: ARRAY OF REAL; n: CARDINAL );
  (***********************************************************)
  (*  Sorts an array a by the method of binary insertion.    *)                      (*  Fast for small n.                                      *)
  (*  Algorithm from:                                        *)
  (*  Niklaus Wirth's "Algoritmen und Datenstrukturen",      *)
  (*  B.G. Teubner Stuttgart, 1983.                          *)
  (***********************************************************)


  PROCEDURE StrSelSortX ( VAR a: ARRAY OF REAL; n: CARDINAL );
  (***********************************************************)
  (*  Sorts an array a by the method of straight selection.  *)                      (*  Relatively fast for small n.                           *)
  (*  Algorithm from:                                        *)
  (*  Niklaus Wirth's "Algoritmen und Datenstrukturen",      *)
  (*  B.G. Teubner Stuttgart, 1983.                          *)
  (***********************************************************)


  PROCEDURE StrSelSortXY ( VAR a, b: ARRAY OF REAL; n: CARDINAL );
  (***********************************************************)
  (*  Sorts an array a and at the same time the parallel     *)
  (*  array b by the method of straight selection.           *)                      (*  Fast for small n.                                      *)
  (*  Algorithm from:                                        *)
  (*  Niklaus Wirth's "Algoritmen und Datenstrukturen",      *)
  (*  B.G. Teubner Stuttgart, 1983.                          *)
  (***********************************************************)



END SortLib.

  Contact RAMSES@env.ethz.ch Last updated: 25-Jul-2011 [Top of page]