DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T V

⟦15edd2783⟧ TextFile

    Length: 1148 (0x47c)
    Types: TextFile
    Names: »V«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

generic
    type Item_Type is private;
    --| Component type of array to be sorted.

    with function "<=" (X, Y : Item_Type) return Boolean;
    --| Required to totally order item_type;

    type Index_Type is (<>);
    --| Index type of array to be sorted.

    type Sequence is array (Index_Type range <>) of Item_Type;
    --| Type of array to be sorted.

procedure Heap_Sort (S : in out Sequence);
--| Overview:
--| Heap sort is an O(n lg n) guaranteed time sorting algorithm.
--| This procedure provides heap sort for arrays of arbitrary index
--| and component type.

--| Notes:
--| Programmer: Ron Kownacki

--| Effects:
--|     Let s1 and s2 denote the value of s before and after an
--| invocation of heap_sort.  Then s1 and s2 have the following
--| properties:
--|   1. For i,j in s'range, i <= j implies that s2(i) <= s2(j).
--|   2. s2(s'first) through s2(s'last) is a permutation of
--|      s1(s'first) through s1(s'last).
--|
--| Requires:
--|     <= must form a total order over item_type.
--|
--| Algorithm:
--|     The algorithm is described in Knuth, vol 3, and Aho et al,
--| The Design and Analysis of Computer Algorithms.