1DLAMRG(1) LAPACK routine (version 3.1) DLAMRG(1)
2
3
4
6 DLAMRG - create a permutation list which will merge the elements of A
7 (which is composed of two independently sorted sets) into a single set
8 which is sorted in ascending order
9
11 SUBROUTINE DLAMRG( N1, N2, A, DTRD1, DTRD2, INDEX )
12
13 INTEGER DTRD1, DTRD2, N1, N2
14
15 INTEGER INDEX( * )
16
17 DOUBLE PRECISION A( * )
18
20 DLAMRG will create a permutation list which will merge the elements of
21 A (which is composed of two independently sorted sets) into a single
22 set which is sorted in ascending order.
23
24
26 N1 (input) INTEGER
27 N2 (input) INTEGER These arguements contain the respective
28 lengths of the two sorted lists to be merged.
29
30 A (input) DOUBLE PRECISION array, dimension (N1+N2)
31 The first N1 elements of A contain a list of numbers which are
32 sorted in either ascending or descending order. Likewise for
33 the final N2 elements.
34
35 DTRD1 (input) INTEGER
36 DTRD2 (input) INTEGER These are the strides to be taken through
37 the array A. Allowable strides are 1 and -1. They indicate
38 whether a subset of A is sorted in ascending (DTRDx = 1) or
39 descending (DTRDx = -1) order.
40
41 INDEX (output) INTEGER array, dimension (N1+N2)
42 On exit this array will contain a permutation such that if B( I
43 ) = A( INDEX( I ) ) for I=1,N1+N2, then B will be sorted in
44 ascending order.
45
46
47
48 LAPACK routine (version 3.1) November 2006 DLAMRG(1)