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